免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4241 | 回复: 5
打印 上一主题 下一主题

KVM上下文切换巨高怎么调优 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-07 11:07 |只看该作者 |倒序浏览
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 ~]#

论坛徽章:
0
2 [报告]
发表于 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>

论坛徽章:
0
3 [报告]
发表于 2009-09-07 11:12 |只看该作者

KVM上下文切换巨高怎么调优

驱动和下载

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

1.JPG

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

2.JPG

论坛徽章:
0
4 [报告]
发表于 2009-09-07 13:03 |只看该作者
新版本的没有试过,老版本的甚至是不用半虚拟化网卡,10M没问题

论坛徽章:
0
5 [报告]
发表于 2009-09-09 16:35 |只看该作者
host 测试速度怎样

手动设置Guest的网卡速率试下

论坛徽章:
0
6 [报告]
发表于 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)        稳定
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP