2

CentOS 6.x | OpenVZ

I have an openvz VPS host and would like to measure disk read/write speed. Historically, on other physical systems, I've ran hdparm to collect this information. I haven't been able to get hdparm to work on my openvz host (presumably because of the simfs file system -- maybe something else though).

I've tried the quick-and-dirty method of dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync and while that works, I'm not quite confident that its accurate. Is there a better way to collect this information?

2
  • take a look on those commands: unix.stackexchange.com/questions/86875/… iotop iostat and strace
    – vfbsilva
    Dec 30, 2013 at 16:48
  • hdparm isn't a particularly good test outside a VM, either. A proper benchmarking tool like Bonnie++ does the job right inside a VM or outside. Dec 30, 2013 at 20:10

2 Answers 2

3

In addition to using a tool such as iotop or iostat you could use a benchmarking tool such as Bonnie++.

Also a example similar to yours, using dd is shown here in this SeverFault Q&A titled: How can I test hd performance on an OpenVZ container?, so your approach of using dd is reasonable, and probably fine.

$ time (dd if=/dev/zero of=/tmp/test bs=64k count=16k > /dev/null; sync)

Example

From my OpenVZ host.

$ time (dd if=/dev/zero of=/tmp/test bs=32k count=16k > /dev/null; sync)
16384+0 records in
16384+0 records out
536870912 bytes (537 MB) copied, 2.47096 seconds, 217 MB/s

real    0m18.122s
user    0m0.014s
sys 0m4.717s

From an OpenVZ guest.

$ time (dd if=/dev/zero of=/tmp/test bs=32k count=16k > /dev/null; sync)
16384+0 records in
16384+0 records out
536870912 bytes (537 MB) copied, 5.53431 seconds, 97.0 MB/s

real    0m23.786s
user    0m0.034s
sys 0m5.430s
0

Hyper-v core server linux VM performance specs ;-)

[root@centos7-serv01 vfio]# time (dd if=/dev/zero of=/tmp/test bs=64k count=16k > /dev/null; sync)
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 1.07525 s, 999 MB/s

real    0m1.137s
user    0m0.005s
sys     0m0.753s
[root@centos7-serv01 vfio]# time (dd if=/dev/zero of=/tmp/test bs=64k count=32k > /dev/null; sync)
32768+0 records in
32768+0 records out
2147483648 bytes (2.1 GB) copied, 2.09945 s, 1.0 GB/s

real    0m2.214s
user    0m0.013s
sys     0m1.575s
[root@centos7-serv01 vfio]# time (dd if=/dev/zero of=/tmp/test bs=64k count=128k > /dev/null; sync)
131072+0 records in
131072+0 records out
8589934592 bytes (8.6 GB) copied, 8.51182 s, 1.0 GB/s

real    0m8.657s
user    0m0.047s
sys     0m5.993s

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .