ubuntu下kvm的磁盘io性能优化步骤

1、virsh shutdown wcltest2

2、virsh edit wcltest2

<driver name='qemu' type='qcow2'/>
<source file='/kvm-data/kvm/wcltest2_os_disk.qcow2'/>
<backingStore/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>

 磁盘优化:

<driver name='qemu' type='qcow2' cache='none' io='native'/>
<target dev='vda' bus='virtio'/>
同时删除
<address type='drive' controller='0' bus='0' target='0' unit='0'/>

3、ubuntu下安装sysbench1.0

wget https://github.com/akopytov/sysbench/archive/1.0.zip -O "sysbench-1.0.zip"
unzip sysbench-1.0.zip
apt-get install automake -y
apt-get install libtool -y
./autogen.sh
./configure --without-mysql
备注( --without-mysql 不编译测试mysql的相关环境)
make
make install

4、io测试随机读写

sysbench --test=fileio --num-threads=50 --file-total-size=2G --file-test-mode=rndrw prepare  准备测试
sysbench --test=fileio --num-threads=50 --file-total-size=2G --file-test-mode=rndrw run 开始测试
sysbench --test=fileio --num-threads=50 --file-total-size=2G --file-test-mode=rndrw cleanup 清除测试文件

物理机执行结果:

File operations:
reads/s: 469.90
writes/s: 312.81
fsyncs/s: 1000.35 Throughput:
read, MiB/s: 7.34
written, MiB/s: 4.89 General statistics:
total time: 10.1041s
total number of events: 18024 Latency (ms):
min: 0.00
avg: 27.86
max: 1047.11
95th percentile: 153.02
sum: 502103.21 Threads fairness:
events (avg/stddev): 360.4800/49.51
execution time (avg/stddev): 10.0421/0.03

 kvm优化前执行结果:File operations:

    reads/s:                      243.34
writes/s: 162.23
fsyncs/s: 513.40 Throughput:
read, MiB/s: 3.80
written, MiB/s: 2.53 General statistics:
total time: 10.1048s
total number of events: 9290 Latency (ms):
min: 0.00
avg: 54.13
max: 769.09
95th percentile: 297.92
sum: 502877.36 Threads fairness:
events (avg/stddev): 185.8000/65.60
execution time (avg/stddev): 10.0575/0.02

 kvm优化后结果:

File operations:
reads/s: 438.57
writes/s: 289.51
fsyncs/s: 911.55 Throughput:
read, MiB/s: 6.85
written, MiB/s: 4.52 General statistics:
total time: 10.1056s
total number of events: 16577 Latency (ms):
min: 0.01
avg: 30.30
max: 311.64
95th percentile: 123.28
sum: 502289.90 Threads fairness:
events (avg/stddev): 331.5400/28.37
execution time (avg/stddev): 10.0458/0.02

 结论:

kvm优化的io随机读写性能达到接近物理机的磁盘io性能

最新文章

  1. 使用maven来管理java项目
  2. Activity生命周期(深入理解)
  3. 小试ildasm,ilasm,ilspy
  4. LoadRunner 12.02 安装教程及中文语言包安装
  5. 明白何谓Margin Collapse
  6. Web开发新时代
  7. Nginx负载均衡和LVS负载均衡的比较分析
  8. 配置开发支持高并发TCP连接的Linux应用程序全攻略
  9. .NET DLL 保护措施应用实例(百度云批量保存工具)
  10. Extjs 4.2.0 MVC 架构
  11. linux中的ps命令用法。
  12. PLSQL的一些事儿
  13. java.lang.NoSuchMethodError:android.content.Context.getDrawable
  14. android 监听返回键
  15. 嵌入式C语言位运算之清位置位
  16. 启发式合并&amp;线段树合并/分裂&amp;treap合并&amp;splay合并
  17. 17秋 软件工程 第六次作业 Beta冲刺 Scrum2
  18. 使用js实现登录随机验证码的效果
  19. android之ExpandableListView 无法展开
  20. codeforces水题100道 第三题 Codeforces Beta Round #47 A. Domino piling (math)

热门文章

  1. netsh wlan start hostednetwork
  2. photonView 空指针异常
  3. [转]两种高性能I/O设计模式(Reactor/Proactor)的比较
  4. binlog配置和使用
  5. JAVA 1.5 并发之 BlockingQueue
  6. ABP源码学习目录
  7. Ajax效果--个人收藏
  8. &lt;table&gt;的使用以及确定取消按钮的设置
  9. [51nod1116]K进制下的大数
  10. sklearn保存模型