Chinaunix

标题: KVM上下文切换巨高怎么调优 [打印本页]

作者: ppm    时间: 2009-09-07 11:07
标题: KVM上下文切换巨高怎么调优
rhel5.4,跑kvm虚拟机,虚拟2003、2008、win7等几个windows的系统,装了redhat最新的for win的驱动,但是性能不怎么好,比如网络只有2、3M的流量,各位有什么办法?
曾经尝试的办法:
1,增加kvm进程的优先级,增大cpu时间片,无效。
2,绑定kvm的进程到固定的cpu,也是无效。


[root@rhel54 ~]# 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

[root@rhel54 ~]#
作者: ppm    时间: 2009-09-07 11:08
标题: 回复 #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>
作者: ppm    时间: 2009-09-07 11:12
标题: KVM上下文切换巨高怎么调优
驱动和下载

1.JPG (46.28 KB, 下载次数: 14)

1.JPG

2.JPG (25.82 KB, 下载次数: 20)

2.JPG

作者: attiseve    时间: 2009-09-07 13:03
新版本的没有试过,老版本的甚至是不用半虚拟化网卡,10M没问题
作者: leaf1981    时间: 2009-09-09 16:35
host 测试速度怎样

手动设置Guest的网卡速率试下
作者: wheel    时间: 2010-01-06 20:47
. 虚拟网络模块的性能差异
虚拟网络模块         网络传输速度(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)        稳定




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2