0

I am running a DD benchmark but the obtained results are not matching with the IOSTAT values.

This is the DD sample:

$ sudo dd bs=4096 count=690 if=/dev/zero of=/mnt/tmp/test oflag=dsync
690+0 records in
690+0 records out
2826240 bytes (2,8 MB) copied, 29,2135 s, 96,7 kB/s

While this benchmark is running, the "iostat -x 1" is reporting on "wkB/s" values between 500 and 600 kB/s.

Something's wrong here.. well, if I don't use the DSYNC, the values are matching.. but I want to do a constant sync for each write operation. Maybe IOSTAT doesn't work well with DSYNC operations ?!

Does anyone know what's the problem here?

Thanks

  • You are writing to a file, so with `oflag=dsync` you will invoke a data AND a metadata sync on every block. It is quite possible, that in this pathological case the overhead is much higher than the payload. – Eugen Rieck Feb 16 '16 at 17:01
  • I chose DSYNC because it "does not flush modified metadata unless that metadata is needed in order to allow a subsequent data retrieval to be correctly handled. For example, changes to st_atime or st_mtime".Reading that about DSYNC.. it's seems not reasonable for so much difference between iostat and DD... So.. I believe this way has the lowest possible overhead. – Gustavo Portela Feb 16 '16 at 17:19
  • Every single block needs a metadata update: File length – Eugen Rieck Feb 16 '16 at 19:43

0 Answers0