Restricting number of CPUs

Barry Brimer lists at brimer.org
Tue Apr 10 20:47:27 UTC 2007


Quoting "Young, Mike" <Mike.Young at atosorigin.com>:

> Hello,
>
> We have 4 CPUs installed in a server, but would like to limit it to only 2,
> since an application is priced per CPU.  Rather than taking the CPUs out of
> the box physically, is there a way to lower the CPU count - maybe in
> /etc/sysctl.conf?

To limit the entire system to a certain number of CPUs, add "maxcpus=X" to your
kernel line in your grub.conf (without the quotes) and replace "X" with the
number of CPUs you want the kernel to see.

<http://kbase.redhat.com/faq/FAQ_80_602.shtm>

To limit an application to a certain number of CPUs, use the taskset program
included in RHEL.

<http://kbase.redhat.com/faq/FAQ_43_3918.shtm>

HTH,
Barry




More information about the redhat-list mailing list