4 ms·
Don't use dd for those tests it's really bad, especially on VMs.
by Thaxll 10y ago
Don't use dd for those tests it's really bad, especially on VMs.
- kornish 10y agoWhat do you mean by "really bad", out of interest?
- Thaxll 10y agoI should rephrase that, it's not "really bad" but the way that most people use it is not good. The main issue is caching from your OS, and caching from the hypervisor ( the one that runs your VM ). There is also the problem about i/o syncing. By default OS buffer the data before writing it to disk.
- acdha 10y agoThat's true of all I/O benchmarks, even those which try to do things like call fsync since the lower layers often lie about whether something was committed to durable storage. The only way to do benchmarks reliably is still to make sure that you're reading/writing data which is much larger than the available cache. In the case of dd, the real reason why it's often a misleading benchmark is that it's the best-case scenario: full-size streaming I/O where each block is only accessed once. Some applications do have that kind of operations pattern but most don't and can see very different performance characteristics because they depend on things like file creation/deletion overhead, random I/O within an open file, read and write contention if the same file is being accessed by multiple processes, etc.
- beachstartup 10y agoprobably because it can produce meaningless results. it's extremely hard to tell where which bits actually ended up, ram, or disk, or some other intermediate buffer or cache on a controller somewhere. we use fio with a standard test config across systems for meaningful results.
- pepr 10y agoWhat should be used for I/O throughput tests instead?
- e1ven 10y agoI usually use Bonnie++ when testing disk performance. http://www.coker.com.au/bonnie++/ http://www.coker.com.au/bonnie++/
- notacoward 10y agoThe only thing worse than dd is bonnie++. Please, folks, use fio, or at least iozone, with multiple threads and/or a queue depth greater than one.
- onnoonno 10y agoAre you sure? Bonnie++ has byte-wise and block-wise tests. Yes, the byte-wise tests are CPU bound (as expected), but I have not seen that for the block-wise tests on any machine so far?
- cthalupa 10y agoBonnie++ is heavily CPU limited and should not be used for disk benchmarking
- jdc0589 10y agofio or bonnie++. I've used fio with PerfKitBenchmarker in the past for some cross cloud platform comparisons.
- sciurus 10y agoOne key thing is doing active benchmarking to validate what you're testing. See an example at http://www.brendangregg.com/ActiveBenchmarking/bonnie++.html http://www.brendangregg.com/ActiveBenchmarking/bonnie++.html