《LINUX學(xué)習(xí):KVM libvirt的CPU熱添加》要點(diǎn):
本文介紹了LINUX學(xué)習(xí):KVM libvirt的CPU熱添加,希望對(duì)您有用。如果有疑問,可以聯(lián)系我們。
1、CentOS7.3:
需求:說明:默認(rèn)有兩個(gè)cpu,由于壓力較大的情況下,必要在線添加一個(gè)1個(gè)cpu
添加cpu前,查看cpu信息
[root@localhost ~]# cat /proc/cpuinfo?
processor: 0
vendor_id: GenuineIntel
cpu family: 6
model: 58
model name: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
stepping: 9
microcode: 0x1
cpu MHz: 2494.342
cache size: 4096 KB
physical id: 0
siblings: 1
core id: 0
cpu cores: 1
apicid: 0
initial apicid: 0
fpu: yes
fpu_exception: yes
cpuid level: 13
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon rep_good nopl pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm fsgsbase tsc_adjust smep
bogomips: 4988.68
clflush size: 64
cache_alignment: 64
address sizes: 42 bits physical, 48 bits virtual
power management:
在線添加cpu信息:
virsh setvcpus CentOS-7.3-X86_64 2 --live? ? (將cpu的在線個(gè)數(shù)調(diào)整為3個(gè))
添加落后行比對(duì):
[root@localhost ~]# cat /proc/cpuinfo
processor: 0
vendor_id: GenuineIntel
cpu family: 6
model: 58
model name: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
stepping: 9
microcode: 0x1
cpu MHz: 2494.342
cache size: 4096 KB
physical id: 0
siblings: 1
core id: 0
cpu cores: 1
apicid: 0
initial apicid: 0
fpu: yes
fpu_exception: yes
cpuid level: 13
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon rep_good nopl pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm fsgsbase tsc_adjust smep
bogomips: 4988.68
clflush size: 64
cache_alignment: 64
address sizes: 42 bits physical, 48 bits virtual
power management:
processor: 1
vendor_id: GenuineIntel
cpu family: 6
model: 58
model name: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
stepping: 9
microcode: 0x1
cpu MHz: 2494.342
cache size: 4096 KB
physical id: 1
siblings: 1
core id: 0
cpu cores: 1
apicid: 1
initial apicid: 1
fpu: yes
fpu_exception: yes
cpuid level: 13
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon rep_good nopl pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm fsgsbase tsc_adjust smep
bogomips: 4988.68
clflush size: 64
cache_alignment: 64
address sizes: 42 bits physical, 48 bits virtual
power management:
[root@localhost ~]# cat /proc/interrupts?
? ? ? ? ? CPU0? ? ? CPU1? ? ? ?
? 0:? ? ? ? 679? ? ? ? ? 0? IO-APIC-edge? ? ? timer
? 1:? ? ? ? 10? ? ? ? ? 0? IO-APIC-edge? ? ? i8042
? 6:? ? ? ? ? 3? ? ? ? ? 0? IO-APIC-edge? ? ? floppy
? 8:? ? ? ? ? 0? ? ? ? ? 0? IO-APIC-edge? ? ? rtc0
? 9:? ? ? ? ? 1? ? ? ? ? 0? IO-APIC-fasteoi? acpi
?10:? ? ? ? 28? ? ? ? ? 0? IO-APIC-fasteoi? ehci_hcd:usb1, uhci_hcd:usb2
?11:? ? ? 2930? ? ? ? ? 0? IO-APIC-fasteoi? uhci_hcd:usb3, uhci_hcd:usb4, virtio3
?12:? ? ? ? 15? ? ? ? ? 0? IO-APIC-edge? ? ? i8042
?14:? ? ? 3348? ? ? ? ? 0? IO-APIC-edge? ? ? ata_piix
?15:? ? ? ? ? 0? ? ? ? ? 0? IO-APIC-edge? ? ? ata_piix
?24:? ? ? ? ? 0? ? ? ? ? 0? PCI-MSI-edge? ? ? virtio0-config
?25:? ? ? 1707? ? ? ? ? 0? PCI-MSI-edge? ? ? virtio0-input.0
?26:? ? ? ? ? 1? ? ? ? ? 0? PCI-MSI-edge? ? ? virtio0-output.0
?27:? ? ? ? ? 0? ? ? ? ? 0? PCI-MSI-edge? ? ? virtio2-config
?28:? ? ? 5807? ? ? ? ? 0? PCI-MSI-edge? ? ? virtio2-req.0
?29:? ? ? ? ? 0? ? ? ? ? 0? PCI-MSI-edge? ? ? virtio1-config
?30:? ? ? ? ? 3? ? ? ? ? 0? PCI-MSI-edge? ? ? virtio1-virtqueues
NMI:? ? ? ? ? 0? ? ? ? ? 0? Non-maskable interrupts
LOC:? ? ? 74004? ? ? ? 208? Local timer interrupts
SPU:? ? ? ? ? 0? ? ? ? ? 0? Spurious interrupts
PMI:? ? ? ? ? 0? ? ? ? ? 0? Performance monitoring interrupts
IWI:? ? ? 5362? ? ? ? ? 6? IRQ work interrupts
RTR:? ? ? ? ? 0? ? ? ? ? 0? APIC ICR read retries
RES:? ? ? ? 20? ? ? ? 61? Rescheduling interrupts
CAL:? ? ? ? ? 0? ? ? ? 89? Function call interrupts
TLB:? ? ? ? ? 0? ? ? ? ? 3? TLB shootdowns
TRM:? ? ? ? ? 0? ? ? ? ? 0? Thermal event interrupts
THR:? ? ? ? ? 0? ? ? ? ? 0? Threshold APIC interrupts
DFR:? ? ? ? ? 0? ? ? ? ? 0? Deferred Error APIC interrupts
MCE:? ? ? ? ? 0? ? ? ? ? 0? Machine check exceptions
MCP:? ? ? ? 12? ? ? ? ? 1? Machine check polls
ERR:? ? ? ? ? 0
MIS:? ? ? ? ? 0
PIN:? ? ? ? ? 0? ? ? ? ? 0? Posted-interrupt notification event
PIW:? ? ? ? ? 0? ? ? ? ? 0? Posted-interrupt wakeup event
2、Win2012:
setvcpus win2012 2 --live
不必要進(jìn)行激活操作,系統(tǒng)會(huì)自動(dòng)識(shí)別新的CPU
3、注意事變
a、KVM虛擬化不能在線減少CPU,cpu熱添加技術(shù)適合不能停機(jī)但是cpu性能嚴(yán)重不敷的場景
b、CPU熱添加的技術(shù)對(duì)宿主機(jī)以及虛擬機(jī)操作系統(tǒng)版本要求較高
c、CPU熱添加,總數(shù)不能大于最大CPU個(gè)數(shù)
?<vcpu placement='auto' current=‘1’>4</vcpu>
本文永遠(yuǎn)更新鏈接地址:
歡迎參與《LINUX學(xué)習(xí):KVM libvirt的CPU熱添加》討論,分享您的想法,維易PHP學(xué)院為您提供專業(yè)教程。
轉(zhuǎn)載請(qǐng)注明本頁網(wǎng)址:
http://www.snjht.com/jiaocheng/13016.html