Writing data to disk in parallel? Writing data to disk in parallel? multithreading multithreading

Writing data to disk in parallel?


Writing/reading in parallel to/from a single mechanical disk is not a good idea because the mechanical head needs to spin every time to service an I/O request, so using multiple threads will just bounce it around needlessly and create overhead.

You can try to benchmark a bit, but I'm afraid you'll just have to resort to using a single thread and writing sequentially.


Queueing off the disk writes to another thread seems like a qood idea, but only to one writer thread per disk so that the complex analysis can run on without the slow disk-writes holding it up.


If it's worth it you can invest some time into understanding how to use Parallel HDF5. It can write to a file in parallel.