NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD block vs raw disk I/O





On 11/08/2018 17:09, Martin Husemann wrote:

Don't think I had to tweak anything special on the host or in virtual
box.

No but one thing you do have to tweak on Linux if using dd to benchmark disk performance is the command line parameters. By default dd on linux doesn't actually wait for the data to be flushed to disk so it can give a falsely fast performance reading.

Just did some virtual box testing on my system here:

This is an Ubuntu 16.04 VM with SATA virtual disks. No filesystem encryption on ext4:

$dd if=/dev/zero of=dummy bs=1M count=320
320+0 records in
320+0 records out
335544320 bytes (336 MB, 320 MiB) copied, 0.143756 s, 2.3 GB/s

There is no way my disk is actually that fast :). Quick check of the linux dd man page says to use conv=fdatasync to wait for the data to be written:

$ dd if=/dev/zero of=dummy bs=1M count=320 conv=fdatasync
320+0 records in
320+0 records out
335544320 bytes (336 MB, 320 MiB) copied, 2.51853 s, 133 MB/s

Much more realistic.

For comparison NetBSD 7.0-STABLE with PIIX4 IDE virtual disk as I don't have a NetBSD 8 VM.
Filesystem BSD FFS mounted rw,log
$ dd if=/dev/zero of=dummy bs=1m count=320 msgfmt=human
320+0 records in
320+0 records out
335544320 bytes (320MB) transfered in 2.318 secs (144755962 bytes/sec - 138MB/sec)

Pretty much exactly the same. As I understand it the NetBSD dd doesn't have a conf=fdatasync parameter as its the default behaviour.

This performance is pretty much in line with what I'd expect the IO performance of the underlying disk to be.

Mike



Home | Main Index | Thread Index | Old Index