Hi, I am trying to test disk speed using `dd` program, and I have questions about what are the differences between `conv` options, i.e. `fdatasync`, `fsync`, `sync`. To illustrate the difference, I have the following example.
~~~ ~$ dd if=/dev/zero of="$tmpfile" bs=1MB count=500 conv=fsync 500+0 records in 500+0 records out 500000000 bytes (500 MB) copied, 1.58808 s, 315 MB/s ~$ dd if=/dev/zero of="$tmpfile" bs=1MB count=500 conv=sync 500+0 records in 500+0 records out 500000000 bytes (500 MB) copied, 1.5292 s, 327 MB/s ~$ dd if=/dev/zero of="$tmpfile" bs=1MB count=500 conv=fdatasync 500+0 records in 500+0 records out 500000000 bytes (500 MB) copied, 1.48944 s, 336 MB/s ~~~ No big difference can be found in these three options. Please find my machine and `dd` version. ~~~ ~$ sw_vers ProductName: Mac OS X ProductVersion: 10.11.2 BuildVersion: 15C50 ~$ dd --version dd (coreutils) 8.24 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Paul Rubin, David MacKenzie, and Stuart Kemp. ~~~ Could you show me how to design test case to differentiate the three options? Thanks. Best regards, Jin
