멀티코어 linux에서 코어를 할당하는 방법:
taskset -pc
{해당 process를 기동할 core 번호} process-pid
예) taskset -pc 0
{process-pid}
만약 cloud상의 VM상에서
이와 같이 특정 core에 할당한 후에는 해당 VM을 reboot하여야 하며,
isolcpus 옵션이 grub.conf 파일에 추가되어서 VM이 생성되어야 한다.
<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/VolGroup-lv_root
# initrd
/initrd-[generic-]version.img
#boot=/dev/xvda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title
CentOS (2.6.32-431.3.1.el6.x86_64)
root (hd0,0)
kernel
/vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root
rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD console=hvc0 KEYTABLE=us
rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto
rd_LVM_LV=VolGroup/lv_root rd_NO_DM rhgb quiet isolcpus=0
initrd
/initramfs-2.6.32-431.3.1.el6.x86_64.img
title CentOS
(2.6.32-358.14.1.el6.x86_64)
root (hd0,0)
kernel
/vmlinuz-2.6.32-358.14.1.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root
rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD console=hvc0 KEYTABLE=us
rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto
rd_LVM_LV=VolGroup/lv_root rd_NO_DM rhgb quiet isolcpus=0
initrd
/initramfs-2.6.32-358.14.1.el6.x86_64.img
title CentOS
(2.6.32-279.2.1.el6.x86_64)
root (hd0,0)
kernel
/vmlinuz-2.6.32-279.2.1.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root
rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD console=hvc0 KEYTABLE=us
rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto
rd_LVM_LV=VolGroup/lv_root rd_NO_DM rhgb quiet isolcpus=0
initrd
/initramfs-2.6.32-279.2.1.el6.x86_64.img
title CentOS
(2.6.32-279.el6.x86_64)
root (hd0,0)
kernel
/vmlinuz-2.6.32-279.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS
LANG=en_US.UTF-8 rd_NO_MD console=hvc0 KEYTABLE=us rd_LVM_LV=VolGroup/lv_swap
SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root rd_NO_DM
rhgb quiet isolcpus=0
initrd
/initramfs-2.6.32-279.el6.x86_64.img