Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to run some benchmarks on Windows 7. These benchmarks have to do with hyper-threading on a multi-core CPU. For this, I want to ensure that only the benchmarks are running on their own logical processor. Is there any way to tell Windows to not schedule anything on there certain logical processors, unless I allow it explicitly for a process?

Doing this manually in the task manager, one process at a time, is not an option. I want to be able to do this repeatedly (I will be running many benchmarks many times). I know how to programmatically set the affinity for the current running process.

Is there any configuration that can allow me to set the default affinity for all processes?

share|improve this question
1  
Might be better off stopping "system things" so they dont get in the way and increasing the priority and setting affinity for the benchmarks themselves, so other fuctions will only be able to use the leftover one. What do you do when the benchmark itself relies heavily ON various functions you park to the side? could effect results? EX: many benches for Disk I/O are using caches even when that is supposedly bypassing them. –  Psycogeek Oct 23 '11 at 13:48
    
There was an old program for XP that I used for this purpose, not sure if it can be found for download now...tomshardware.com/reviews/bang-dual-processing-buck,815-3.html –  Moab Oct 23 '11 at 15:29
    
I have a copy of "THG task assignment manager" if you would like to try it on W7. –  Moab Oct 23 '11 at 15:34

3 Answers 3

Process Lasso supports this! It comes with a free and paid version, CPU affinities is always free...

Just fill in a * in the Name match field, which will target all processes.

I think you can then add your programs to have another affinity, the order in which you enter the rules might matter. Also, you can tick More strictly enforce default affinities at the bottom.

enter image description here

share|improve this answer
    
I use a similar utility for Folding@home. –  surfasb Oct 23 '11 at 18:25

If you go into task manager processes and right click on the process you should be able to select the affinity.

enter image description here

To disable a core you can use msconfig. I don't think you can enable it on a per-process basis.

share|improve this answer
    
OK, I should've been clearer. I want to set the affinity of all processes to use only logical processors 0 and 1, and enable only the processes that I want to to use 2 and 3. Doing manually for each process is not an option. –  Nathan Fellman Oct 23 '11 at 12:12
    
@NathanFellman Yeah, I realized that after I posted. Have you tried disabling them with msconfig->system configuration->advanced? –  Pubby Oct 23 '11 at 12:14
    
no, I don't know how to do that :-) –  Nathan Fellman Oct 23 '11 at 12:15
    
@NathanFellman I saw it from this: en.kioskea.net/faq/616-multicore-cpu-how-to-disable-a-core Never done it so not sure if it will work in your situation. –  Pubby Oct 23 '11 at 12:16
  1. Open your start menu
  2. type msconfig, and hit enter
  3. Go to the tab marked as boot
  4. Highlight the OS of your choice, and hit advanced options.
  5. Check number of processors, and use however many you want.

enter image description here

share|improve this answer
    
But will this allow me to assign only certain processes to the "disabled" processors? It seems to me that this will keep all of the processes off of the processor I want to keep clear, including my benchmark. –  Nathan Fellman Oct 23 '11 at 13:15
    
@NathanFellman I'm actually not entirely sure - perhaps you could test that? –  Simon Sheehan Oct 23 '11 at 13:30
    
@NathanFellman: /NUMPROC=number sets the number of processors that Windows will run at startup. With this switch, you can force a multiprocessor system to use only the quantity of processors (number) that you specify. This switch can help you troubleshoot performance problems and defective CPUs. — See Support. This does mean that the processors can't be used anymore once you limit them. –  Tom Wijsman Oct 23 '11 at 13:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.