1. Àӽ÷Πcore °¹¼ö Á¶Á¤(ÀçºÎÆà ¾øÀÌ Á¶Á¤ÇÒ ¼ö ÀÖÀ¸³ª, ÀçºÎÆà ÈÄ ¿ø·¡´ë·Î µ¹¾Æ¿È)
# CPU È®ÀÎ
[root@hostname ~]# cat /sys/devices/system/cpu/online
0-23
[root@hostname ~]# cat /sys/devices/system/cpu/offline
24-31
[root@hostname ~]# cd /sys/devices/system/cpu/
[root@hostname cpu]# ls -al
ÇÕ°è 0
drwxr-xr-x 28 root root 0 2016-04-11 09:19 .
drwxr-xr-x 14 root root 0 2016-04-11 09:19 ..
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu0
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu1
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu10
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu11
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu12
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu13
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu14
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu15
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu16
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu17
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu18
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu19
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu2
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu20
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu21
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu22
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu23
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu3
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu4
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu5
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu6
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu7
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu8
drwxr-xr-x 8 root root 0 2016-04-11 09:20 cpu9
drwxr-xr-x 3 root root 0 2016-05-18 10:59 cpufreq
drwxr-xr-x 2 root root 0 2016-05-18 10:59 cpuidle
-r--r--r-- 1 root root 4096 2016-04-12 00:00 kernel_max
-r--r--r-- 1 root root 4096 2016-05-18 10:59 offline
-r--r--r-- 1 root root 4096 2016-04-11 09:19 online
-r--r--r-- 1 root root 4096 2016-04-12 00:00 possible
-r--r--r-- 1 root root 4096 2016-04-12 00:00 present
-rw-r--r-- 1 root root 4096 2016-04-11 09:20 sched_mc_power_savings
-rw-r--r-- 1 root root 4096 2016-04-11 09:20 sched_smt_power_savings
[root@hostname cpu]#
[root@hostname cpu]# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 24
On-line CPU(s) list: 0-23
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 44
Stepping: 2
CPU MHz: 1600.000
BogoMIPS: 6664.09
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 12288K
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23
[root@bnpsvrdev01 cpu]#
[root@hostname cpu]# grep "processor" /proc/cpuinfo
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
processor : 8
processor : 9
processor : 10
processor : 11
processor : 12
processor : 13
processor : 14
processor : 15
processor : 16
processor : 17
processor : 18
processor : 19
processor : 20
processor : 21
processor : 22
processor : 23
Àӽ÷ΠCPU Core °¹ ¼ö Á¶Á¤
[root@hostname cpu]# echo 0 > /sys/devices/system/cpu/cpu23/online
[root@hostname cpu]# echo 0 > /sys/devices/system/cpu/cpu22/online
ȤÀº
[root@hostname ~]# chcpu -d 23
CPU 23 disabled
[root@hostname ~]# chcpu -d 22
CPU 22 disabled
* µÎ ¸í·É¾î ¸ðµÎ /sys/devices/system/cpu/cpu23/online À̶ó´Â ASSCI TEXT ÆÄÀÏÀÇ ³»¿ëÀ» 1 ¿¡¼ 0 À¸·Î º¯°æÇÔÀ¸·Î
CPU Core »óŸ¦ Offline À¸·Î º¯°æÇÑ´Ù.
¿µ±¸ÀûÀ¸·Î CPU Core °¹ ¼ö Á¶Á¤
[root@hostname ~]# cat /etc/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/mapper/vg_bnp-LogVol00
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux 6 (2.6.32-573.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-573.el6.x86_64 ro root=/dev/mapper/vg_bnp-LogVol00 rd_NO_LUKS LANG=ko_KR.UTF-8 rd_NO_MD rd_LVM_LV=vg_bnp/LogVol00 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_bnp/LogVol02 rd_NO_DM rhgb quiet maxcpus=8
initrd /initramfs-2.6.32-573.el6.x86_64.img
[root@bnpsvrdev01 ~]#
* /etc/grub.conf ¼³Á¤ÆÄÀÏ¿¡¼ kernel ºÎºÐ¿¡ maxcpus=N ±¸¹®À» »ðÀÔÇÏ¿© ºÎÆà ½Ã º¯°æÇÏ°Ô²û Á¶Á¤ÇÑ´Ù.
ÀÌ ¹æ¹ýÀº ÃÖÃÊ 1ȸ ÀçºÎÆÃÀÌ ÇÊ¿äÇÏ´Ù.
Ãâó: http://woorilife.tistory.com/55 [¿ì¸®µéÀÇ »î]