Xenserver VM의 vCPU 관리하기
작성자 : 서진우 (alang@clunix.com)
먼저 해당 서버의 CPU 정보를 확인한다.
# xe host-cpu-info
——————————————————————————–
cpu_count : 12
socket_count: 2
vendor: GenuineIntel
speed: 2000.024
modelname: Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
family: 6
model: 45
stepping: 7
flags: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc nonstop_tsc aperfmperf pni pclmulqdq vmx est ssse3 sse4_1 sse4_2 x2apic popcnt aes hypervisor ida arat tpr_shadow vnmi flexpriority ept vpid
features: 17bee3ff-bfebfbff-00000001-2c100800
features_after_reboot: 17bee3ff-bfebfbff-00000001-2c100800
physical_features: 17bee3ff-bfebfbff-00000001-2c100800
maskable: full
——————————————————————————-
각 VM에 core 를 할당한다.
# xe vm-param-set platform:cores-per-socket=6 VCPUs-max=6 VCPUs-at-startup=6 uuid=<VM-UUID>
or
순서 중요
# xe vm-param-set platform:cores-per-socket=6 uuid=<VM-UUID>
# xe vm-param-set VCPUs-max=6 uuid=<VM-UUID>
# xe vm-param-set VCPUs-at-startup=6 uuid=<VM-UUID>
실제 적용 예)
# xe vm-param-set platform:cores-per-socket=6 VCPUs-max=6 VCPUs-at-startup=6 uuid=ff15652c-85b6-6226-a92c-92cae4f96a27
만일 특정 VM에 특정 CPU를 할당하고자 할때는 아래 방법을 이용한다.
# xe vm-param-set uuid=<vm-uuid> VCPUs-params:mask=0,1,2,3,4,5,6,7,8,9,10,11
실제 적용 예)
# xe vm-param-set uuid=ff15652c-85b6-6226-a92c-92cae4f96a27 VCPUs-params:mask=0,1,2,3,4,5
할당된 vCPU 현황 모니터링은 아래와 같이 수행할 수 있다.
# xl vcpu-list
————————————————————————————-
Name ID VCPU CPU State Time(s) CPU Affinity
Domain-0 0 0 7 r– 13619.9 any cpu
Domain-0 0 1 9 r– 15863.2 any cpu
Domain-0 0 2 10 r– 11772.1 any cpu
Domain-0 0 3 6 -b- 12907.0 any cpu
Win7k-09 63 0 5 r– 18.1 0-5
Win7k-09 63 1 0 -b- 4.0 0-5
Win7k-09 63 2 1 -b- 6.3 0-5
Win7k-09 63 3 2 -b- 6.4 0-5
Win7k-09 63 4 3 -b- 7.9 0-5
Win7k-09 63 5 4 -b- 5.9 0-5
Win7k-01 64 0 11 r– 0.6 any cpu
Win7k-01 64 1 – –p 0.0 any cpu
————————————————————————————-
Issue :
– VCPUs-params:mask를 지정해 주지 않으니깐 vcpu를 많이 주더라도 GuestOS상에서는 2개만
인식하는 증세 발견 ..
5 Responses
… [Trackback]
[…] Read More here to that Topic: nblog.syszone.co.kr/archives/8941 […]
… [Trackback]
[…] Read More to that Topic: nblog.syszone.co.kr/archives/8941 […]
… [Trackback]
[…] Read More to that Topic: nblog.syszone.co.kr/archives/8941 […]
… [Trackback]
[…] Read More on that Topic: nblog.syszone.co.kr/archives/8941 […]
… [Trackback]
[…] Read More Information here on that Topic: nblog.syszone.co.kr/archives/8941 […]