views:

339

answers:

5

I have server with two quad core processors, installed windows 2003 standard edition. I want to test an application on a machine with single quad core processor and I want to use this machine so how can I disable one of two processors?

I prefer a software solution but if the only solution is a hardware no problem.

+4  A: 

Quick and dirty: Use task manager, select the process, and use the affinity bits to disable any cores you like for that process.

Very useful for debugging, too.

SPWorley
That is what I want, thanks
Ahmed Said
+1  A: 

You can set the "Affinity" of a running process / application to only execute on one core:

Go to task manager, select the process in question, right click and select "Set Affinity", then choose just one core.

Calanus
A: 

The solution will normally use to test the application which need rely on these kind of requirements is VMware (or equivelant virtual machine software e.g. Vitrual Box etc.)

This is a proper solution for test an application rely on the hardware environment as you can allocate the CPUs and Memory.

Shuoling Liu
Upvoted from -1. VMs is one of the most important tools any programmer has when checking across multiple configurations.
Daniel Goldberg
+1  A: 

Or you can try it from the application itself (if appropriate) with Process.ProcessorAffinity.

jerryjvl
A: 

Edit boot.ini, add /NUMCPU=1, and reboot. This will instruct Windows to ignore all but one core/CPU.

Johannes Passing