Linux多核CPU控制启动核数
2010-11-11 16:46
288 查看
修改/boot/grub/grub.conf,在kernel行最后加入 maxcpus=n (n为需要启动的核数)
例如原来的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/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-164.el5.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/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet maxcpus=4
initrd /initrd-2.6.18-164.el5.img
则reboot后启动的核数为4
例如原来的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/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-164.el5.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/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet maxcpus=4
initrd /initrd-2.6.18-164.el5.img
则reboot后启动的核数为4
相关文章推荐
- Linux芯片级移植与底层驱动(基于3.7.4内核) --SMP多核启动以及CPU热插拔驱动
- Linux芯片级移植与底层驱动(基于3.7.4内核) --SMP多核启动以及CPU热插拔驱动
- Linux芯片级移植与底层驱动(基于3.7.4内核) --SMP多核启动以及CPU热插拔驱动 推荐
- 如何利用多核CPU来加速你的Linux命令 — awk, sed, bzip2, grep, wc等
- Linux 多核下绑定硬件中断到不同 CPU(IRQ Affinity)
- Linux系统下,CPU信息详解(cpuinfo,多核,多线程)
- 在Linux下怎样让top命令启动之后就按内存使用排序(或CPU使用排序)?
- 如何利用多核CPU来加速你的Linux命令 — awk, sed, bzip2, grep, wc等(转)
- Linux下CGroup进行CPU、内存等资源控制
- 『阿男的Linux内核世界』*多核CPU是如何启动的?*
- 如何利用多核CPU来加速你的Linux命令 — awk, sed, bzip2, grep, wc等
- linux下top命令如何查看内存及多核CPU的方法
- Linux 下多核CPU知识
- Linux启动及控制服务进程
- Linux 下多核CPU相关知识
- Linux如何控制 CPU 利用率
- linux下控制CPU不降频命令
- linux top命令查看内存及多核CPU的使用讲述【转】
- Linux下实用的查看内存和多核CPU状态命令---转
- C++ openmp并行程序在多核linux上如何最大化使用cpu