Saturday, December 17, 2005

Disabling CPUs on Linux- Part Two

If the server is supporting Hyperthreading, Linux implements the following mechanism:
  • First all the physical CPU's are enabled and then
  • then the logical CPU's are enabled
This means that all the possible combinations can be enabled by specifying the maxcpu parameter in the boot command mentioned in the earlier post. For instance if the server has more than one physical CPU it is not possible to test one physical CPU with Hyperthreading enabled.

It goes without saying that it is necessary to be careful when limiting the number of CPUs to always create symmetric configurations. What this means is that should be avoided that some physical processors have Hyperthreading enabled and others not. This can can lead to very difficult to analyze queueing effects and perturbation.


Doug Burns said...


Please keep up the good work. Your blog has been useful to me on at least one occasion and is always interesting.



tbragin said...


Do you know if this also goes for dual-core cpus? So if I have 2 dual-core processors and I set maxcpus=2, am I getting two cores from one processor or 2 processors with one core each?