KVM上下文切換巨高怎麼調優
rhel5.4,跑kvm虛擬機,虛擬2003、2008、win7等幾個windows的系統,裝了redhat最新的for win的驅動,但是性能不怎麼好,比如網路只有2、3M的流量,各位有什麼辦法?
曾經嘗試的辦法:
1,增加kvm進程的優先順序,增大cpu時間片,無效。
2,綁定kvm的進程到固定的cpu,也是無效。
# vmstat 2
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
2 0 1404112 4279460 1046700 1451132 0 1 5 9 33 15 1 5 94 0 0
1 0 1404112 4279584 1046700 1451132 0 0 0 8 1069 30117 0 5 94 0 0
3 0 1404112 4279956 1046700 1451132 0 0 0 0 1078 31087 1 5 94 0 0
2 0 1404112 4279940 1046704 1451128 0 0 0 42 1069 26446 1 4 95 0 0
1 0 1404112 4280064 1046704 1451132 0 0 0 0 1072 27809 0 5 94 0 0
2 0 1404112 4280196 1046704 1451132 0 0 0 0 1077 31259 1 5 94 0 0
1 0 1404112 4280212 1046712 1451124 0 0 0 18 1068 25392 0 3 96 0 0
2 0 1404112 4280336 1046712 1451132 0 0 0 128 1099 30253 1 4 95 0 0
#
《解決方案》
回復 #1 ppm 的帖子
windows2003的配置文件。
<domain type='kvm'>
<name>vmwin01</name>
<uuid>1a7ecce7-9672-2929-f215-213034807353</uuid>
<memory>4194304</memory>
<currentMemory>2097152</currentMemory>
<vcpu>4</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='cdrom'>
<source file='/root/1.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
<disk type='block' device='disk'>
<source dev='/dev/datavg/vmwin01'/>
<target dev='hda' bus='virtio'/>
</disk>
<interface type='bridge'>
<mac address='00:e0:3c:9d:32:d4'/>
<source bridge='kvmbr0'/>
<model type='virtio'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/3'/>
<target port='0'/>
</serial>
<console type='pty' tty='/dev/pts/3'>
<source path='/dev/pts/3'/>
<target port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
<sound model='ac97'/>
</devices>
</domain>
《解決方案》
KVM上下文切換巨高怎麼調優
驅動和下載
《解決方案》
新版本的沒有試過,老版本的甚至是不用半虛擬化網卡,10M沒問題
《解決方案》
host 測試速度怎樣
手動設置Guest的網卡速率試下
《解決方案》
. 虛擬網路模塊的性能差異
虛擬網路模塊 網路傳輸速度(ssh) 客戶機操作系統 網路狀態
rtl8029 200-300KB/s SLES10SP2 (kernel 2.6.16-60) 不穩定
e1000 4.8-5.4MB/s SLES10SP2 (kernel 2.6.16-60) 穩定
virtio 10.6-11.1MB/s SLES11 (kernel 2.6.27-19) 穩定