linux cpu多核运行,LINUX在多核环境下,如果控制使用的CPU数目

进入/boot/grub

修改grub.conf

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE:  You have a /boot partition.  This means that

#          all kernel and initrd paths are relative to /boot/, eg.

#          root (hd0,0)

#          kernel /vmlinuz-version ro root=/dev/sda2

#          initrd /initrd-version.img

#boot=/dev/sda

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title Red Hat AS4 (2.6.9-67.ELsmp)

root (hd0,0)

kernel /vmlinuz-2.6.9-67.ELsmp ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.9-67.ELsmp.img

title Red Hat AS4-up (2.6.9-67.EL)

root (hd0,0)

kernel /vmlinuz-2.6.9-67.EL ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.9-67.EL.img

为:

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE:  You have a /boot partition.  This means that

#          all kernel and initrd paths are relative to /boot/, eg.

#          root (hd0,0)

#          kernel /vmlinuz-version ro root=/dev/sda2

#          initrd /initrd-version.img

#boot=/dev/sda

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title Red Hat AS4 (2.6.9-67.ELsmp)

root (hd0,0)

kernel /vmlinuz-2.6.9-67.ELsmp ro root=LABEL=/ rhgb quiet maxcpus=1

initrd /initrd-2.6.9-67.ELsmp.img

title Red Hat AS4-up (2.6.9-67.EL)

root (hd0,0)

&nbs