Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
take a look on those commands: unix.stackexchange.com/questions/86875/… iotop iostat and strace –  vfbsilva Dec 30 '13 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. –  Warren Young Dec 30 '13 at 20:10

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.