Tuesday, January 22, 2008

How to Disable Multicore feature?

How to use only one core of a multi-core CPU?

Yes! Sometimes you want to use only one core because some games and applications run poorly on multi-core CPUs. There are a number of ways to do this.

I - The easiest way (non-permanent method):

1 - Run the game or application.
2 - Press Alt+Tab to get out of the application (or any other way that you know).
3 - Open the Windows Task Manager by pressing Ctrl+Shift+Esc.
4 - In the Task Manager window select Applications tab which shows a list of applications currently running. Right click on your game or application and press G button (or select Go To Process).
5 - As you can see we're now in the Processes tab of the Task Manager and your application's process is selected. Right click on it and select Set Affinity.
6 - Processor Affinity window opens and you can select on which cores you desire your application to run. Select one and press OK.

This method works well and it's easy too but it's got a problem: You have to do this every time that you run your application. And there's another problem: For some games and full-screen applications this would cause an error since you've left their environment. So, What's the answer? The answer is method II.


II - The permanent method:

1 - Download Imagecfg (Rapidshare mirror Imagecfg).
2 - Copy the file to Windows\system32\.
3 - Find your game or application's executable file (You should be able to find it in the folder in which you've installed it) and write down it's path. (For example C:\Program files\My app.exe)
4 - Make a backup copy of the exe file (just in case).
5 - Open command prompt by going to Start -> Run and entering cmd.
6 - Type the following (use your app's exe path in the quotations instead of your path) :
imagecfg -a 0x1 " your path"

(For example: imagecfg -a 0x1 " C:\Program files\My app.exe"

(Note: If didn't work type these:
imagecfg -u " your path"
imagecfg -a 0x1 " your path"
)

Now every time you start the application it will automatically use only one core. If it caused a problem, replace the modified exe file with the backup copy .
But still it may not be enough as games like Broken Sword: The Angel of Death have problems with multi-cores and the methods above won't work for them. Anyway, we've got one last trick up our sleeve, that is, methods III and IV .



(Note: before reading items III and IV and as one of the commenters has mentioned, there's an easier and less hardcore way to get the same result as those items. Follow this:
Open the Start menu, click on Run, type in msconfig and press OK. In the System Configuration window go to Boot (Start in XP) tab and click on Advanced Options button. There you can see an option for choosing how many cores you want active. Restart your computer.)

III - Brute force technique (Windows Vista only):

(Check out the Note above!)

In this method you force Vista to boot only on one core as if you have a single core CPU. Don't worry, as it is easily revertible.

1 - Open command prompt by going to Start -> Run and entering cmd.
(You might need administrator privileges for this so I suggest to open cmd like this: Go to C:\Windows\System32 and look for a file named: cmd.exe (or just cmd), right click on it and choose "Run as administrator")
2 - Type: bcdedit /set onecpu on
3 - Reboot the system.

To check, when the system comes up, open Task Manager and click on Performance tab. You can see only one CPU there!

To revert back to multi-core simply type the following in cmd:
bcdedit /set onecpu off

And reboot the system. You are back to the multi world!

This last method only works under Vista. Doing the same thing under XP is explained in method IV.


IV - Brute force technique (Windows XP approach):

(Check out the Note before section III!)

Here you force XP to use only one core as if you have a single core CPU. You can revert back later if you want.

1 - Open boot.ini file. If you don't know how to do this follow the steps below:
- Right click on My Computer and select Properties.
- Go to Advanced tab and in the Startup and Recovery section click on Settings button.
- Startup and Recovery window opens, click Edit button in System startup section.
- That's it, you've opened the boot.ini file.
2 - If you have one Windows XP installed on your system, the boot.ini content is something similar to this:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect


Don't mind the values in parentheses. All you have to do is to add a simple switch to it. The switch is /onecpu. The content of boot.ini with the added switch in bold is shown below:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /onecpu


Congratulation! We're done. Just save the file and reboot your system. The next time you boot your XP it only uses one core. To make sure, open Task Manager and click on Performance tab. You can see only one CPU there!

To revert back to multi-core, open boot.ini and delete the /onecpu switch and reboot.

Methods III and IV need a restart to take effect. I don't know of a way to do this without a restart. But still, I'm no expert or anything and the info you see here are things that I've put together off the net and tried myself off course. But I thought it would be nice to have them all in one place. Hope it helped.

22 comments:

Nhexima said...

This post was immensely helpful for me. Thanks so much!

Anonymous said...

Hmm, if it is a quad core problem then surely THQ should fix it. :/

But i'll give your suggestions a whirl.

Tim said...

Alright, I'm no developer but I'm a gear-head when it comes to PCs and related componentry...

I have a specialized application here that runs on a single core no matter what system it is running on. The developers obviously haven't optimized it to share the load and there's nothing I can do about that.

If I force the OS to report only one core I don't suppose it will distribute the load across all eight cores, will it?

I need to milk as much performance out of this app/hardware as I can... right now the simulations that it is running (nothing graphical) takes up to or over one hour each. This is a purpose built box that has been stripped of everything except this one app and only the essentials that XP needs to boot and be just usable enough to execute the application.

Thanks.

Asus P6T Deluxe
Intel Core i7 @ 3.2GHz (quad HT)
3GB DDR3 RAM
Intel 32GB SSD
XP Pro (for now)

Masoud said...

To Tim:
In this method the OS only sees one of the cores and doesn't report all of them as one, so I doubt you get any extra performance out of it.

Anonymous said...

Ok that worked, and oddly enough it booted up winXP pro sp2 within 20 seconds while normally it takes longer.
Used option 4 to play BS4 btw :)

Rachel said...

Hi I recently set my computer to use only one core of a multi-core CPU using the "III - Brute force technique" for vista (Typing bcdedit /set onecpu on in the command prompt) It was so I could play a game called Broken Sword: The Angel of Death. But I tried to revert back to multi-core by typing "bcdedit /set onecpu off"
and it wont change back. It keeps on saying "The boot configuration data store could not be opened. Access is denied" I don’t know what to do now, any suggestions? Any help would be greatly appreciated thanks.

Masoud said...

To Rachel:
You probably need Administrator privileges to be able to run that command. Just go here:
C:\Windows\System32
and look for a file named:
cmd.exe
Right click on it and choose "Run as administrator". now run the bcdedit thing. Hope it works.

Rachel said...

To Masoud
Hi, thanks SO much for replying to my comment so quickly, I really appreciate it. I thought it would take days for a reply. YEY! what you said to do totally worked! i did as you said and then typed in the same "BCDEDIT /SET ONECPU OFF" command and this time it said it was successful. I'm guessing that running my computer with only one core of a multi-core CPU forever was probaly not a good thing to do? I hope I did it right and that i did it on the right cmd.exe. Is there a way to check I've done it correctly? To see how many core CPU's I'm using now?
Thanks again for the help best wishes Rachel

Masoud said...

To Rachel:
Hey Rachel,
I forgot to mention that you had to restart your computer immediately after that command or it would get stuck with one core forever! Just kidding but if you haven't restarted yet, do it.
Now on to business. To check how many cores are active, press: Ctrl+Shift+Esc
and the Windows Task Manager window pops up. Now go to Performance tab and there you can find under CPU Usage History, the number of cores you have (one graph for each core).
Hope you have many!
Best, Masoud

Rachel said...

Hey! don’t scare me like that! I totally freaked when I read the start of your post! before I read you were kidding, that’s mean lol. Na but thanks for replying again, Looks like I did it correctly. I did as you said and looked on the task manager and I’m back to 4 core CPU's WOO! Hopefully that will fix the problems I was having with my other game. Thanks for all the help you’re a star!
All the best, Rachel

Praveen said...

Hi Masoud,
I have a 4-core PC. Can i disable two cores by adding the switch /twocore??????

Masoud said...

To Praveen:
Hi Praveen,
I don't know why you want 2 cores active but that's not my business, is it ;)
OK, here it goes:

In Windows XP instead of using /onecpu use /NUMPROC=2

In Vista you need Administrator privileges to run bcdedit. So, open cmd like this:
go to C:\Windows\System32
and look for a file named:
cmd.exe (or just cmd)
Right click on it and choose "Run as administrator"
Now enter the following command:
bcdedit /set numproc 2

Hope it did it.

Praveen said...

Hi Masoud,
Thx a lot...
It worked....

Kiko said...

Hi,

Any idea how to disable only the first core of Phenom X4 in Win XP? It's defective and I have to set affinity for each aplication from the task manager.

The number of cores option in boot.ini starts to reduce the cores from last to first. But I need exactly the first one disabled.

Thanks!

Masoud said...

To Kiko:

Hey,

Unfortunately I don't know a way to do that. The /onecpu and /numproc tags are the only ones dealing with the number of processors and don't get more detailed. Maybe you could do something in BIOS to fix it.
Good luck.

Anonymous said...

Hey I found yet another way to disable multiple cores


Open the start menu, click on Run,type in msconfig and click on OK

In the System Configuration window click on the start sub menu and the on Advanced Options button.

In the second window that appear, you should be provide with an option for enabling and disabling the number of processors you want to use.

Validate your entry by clicking on OK.

Restart your PC and it should be fine.

Masoud said...

@Hey I found yet another way to disable multiple cores ...

That's true, but I didn't feel like updating the article before. Maybe I should.

Anonymous said...

Nice post and this enter helped me alot in my college assignement. Gratefulness you on your information.

Peter said...

Hi !

I have just Installed Broken Sword 4, and have the black textures problem, so I am here :) I got multicore (4) CPU, but also Windows 7, for which I didnt find solution. Can you help me with that?

Thank you in advance !

Masoud said...

@Peter
Hi. Have you tried the method in Note just before section III?

Peter said...

Yes, but that didn't work. Luckily , i found the solution myself. Broken Sword 4 does not like multicore ... :P Now its working smooth and fine.

But thank you for your answer! :)

Peter said...

I read the note more closely, ad mine is just the same, with 1 tep different. I still couldnt get your solution working, BUT on my brother's PC, it worked! ( he has Win7 too) well, interesting :)

Thank you once more ! :)