How to limit the number of cpus in Ubuntu 11.04
Is there a way to limit the number of cpus used at boot time? I have a four core machine and would like to limit the number of cpus to obtain stat开发者_JS百科s on a multi-threaded program.
Do you need to have this at boot time? Rather than simply pinning a certain process at a certain time to a number of CPUs?
If you can do the latter, then look in to CPU affinity under linux. There's different utilities that will let you do that for specific processes.
You might be able to do that via a BIOS setting but that is motherboard specific.
精彩评论