首页 > 代码库 > KVM下raw和qcow2格式磁盘文件IO测试

KVM下raw和qcow2格式磁盘文件IO测试

1. Host OS 环境

  • CPU: Intel Xeon E5620 2.40GHz
  • MEM: 16GB
  • DISK: 500GB SATA
  • OS: CentOS5.7 64bit

2. Guest OS 环境

  • CPU: 2 core
  • MEM: 8GB
  • DISK: 50GB raw/qcow2 virtio
  • OS: Ubuntu 10.04.3 Server 64bit

3. 测试工具

Bonnie++ 1.96

测试命令:bonnie -b -u root -d /root/tmpfile/

4. 测试结果

Host OS
Version  1.96       ------Sequential Output------ --Sequential Input- --Random-Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CPjsjcloud20   32088M   763  97 61169  13 34234   6  1541  78 110327   7 284.7  11Latency             39625us    7351ms    3251ms   24187us     102ms     190msVersion  1.96       ------Sequential Create------ --------Random Create--------jsjcloud20          -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP                 16    56   0 +++++ +++    57   0    57   0 +++++ +++    57   0Latency              1016ms     895us     258ms     233ms      15us     233ms
Guest OS : raw virtio
Version  1.96       ------Sequential Output------ --Sequential Input- --Random-Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CPhadoop1         16G   739  96  28405  7 18972   5  3841  96 83858  13 188.9  12Latency             13992us     873ms   6533ms    18113us   93496ms     291msVersion  1.96       ------Sequential Create------ --------Random Create--------hadoop1             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP                 16    38   0 +++++ +++    53   0    38   0 +++++ +++    53   0Latency               358ms     815us    1683ms     192ms    2205us    1733ms
Guest OS : qcow2 virtio
Version  1.96       ------Sequential Output------ --Sequential Input- --Random-Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CPhadoop2         16G   599  89  2601   1 11303   6  3168  94 45889   7 156.6 2191Latency             18105us   20413ms    8228ms   61058us     144ms     316msVersion  1.96       ------Sequential Create------ --------Random Create--------hadoop2             -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP                 16    37   0 +++++ +++    49   0    37   0 +++++ +++    53   0Latency               338ms     743us    1797ms     421ms    2768us    1329ms
综合
 字符写block写重写字符读block读随机访问
Host76361169342341541110327284.7
raw virtio7392840518972384183858188.9
qcow2 virtio599260111303316845889156.6