Is it possible to disable a CPU, not a core? I want to do a test to verify if the performance could make a big difference or not.
I'm using Ubuntu 10.10.
|
Is it possible to disable a CPU, not a core? I want to do a test to verify if the performance could make a big difference or not. I'm using Ubuntu 10.10. |
||||
|
|
|
Besides doing this in your BIOS grub has an option called You can edit this option in when selecting your grub boot option by adding
Choose 'e' and you get to a command line where you can add options. You can also create permanent boot option in grub by making a copy of your current boot option and add You can verify running on 1 cpu by issuing:
processor : 0 processor : 1 And the 2nd line should disappear after booting with 1 CPU. |
|||||||||||||||||||||
|
|
You can dynamically disable CPUs via
and to re-enable, use:
|
|||||
|
|
You can always unplug the CPU from its socket. It's brute force, but you're guaranteed to get the test you want, and you don't have to worry if the kernel/BIOS/whatever switch is really doing what you hope it's doing. My company has large installations of server farms in various locations around the world. In our lab we'll sometimes remove CPUs from sockets for just such a test. There's an interesting variation on this test that you can do with multi-CPU NUMA systems. On those types of motherboards you can remove all of the memory DIMMs that are controlled by one physical CPU. The system will still boot just fine, and you can then run tests with your application pinned to various cores which will allow you to measure the affects of "local" or "remote" memory. |
|||||
|
|
Would like to see the performance of a multithreaded application along with number of cores? If that is the case, you can use taskset utility. I guess that you have a NUMA machine. You can install numactl utility and by using it you can find which cores corresponding to which CPU. For example, your machine has two quad-core CPUS (chips). By using taskset utility you can make cores of one CPU as a set and allocate these to your application. Then your application uses only one CPU/Chip (four cores). Please let me know if you need more information. |
|||
|
|