http://qs321.pair.com?node_id=1214710


in reply to Re: Parallel-processing the code
in thread Parallel-processing the code

It's not usually so simple. Modern physical disks are intelligent devices, and giving them more parallel requests can allow them to optimize the head movement and lead to more global throughput at the expense of response time for an individual thread. Storage arrays and RAID levels can make a huge difference here, even if it is a single filesystem.

That said, rajaman didn't give any information on the hardware he is using, so anything we say about how to maximize his I/O throughput is just speculation generalizations.

PS: My issue isn't with whether or not parallelism will help with this particular problem, but rather the generalization that I/O bound processes can't generally benefit from parallelism. Storage manufacturers, OS developers and Systems Administrators put a lot of effort into making storage work better for different workloads, so you can sometimes be surprised by what your storage can do if you put in a little effort.

Replies are listed 'Best First'.
Re^3: Parallel-processing the code
by afoken (Chancellor) on May 17, 2018 at 19:13 UTC
    Modern physical disks are intelligent devices, and giving them more parallel requests can allow them to optimize the head movement and lead to more global throughput at the expense of response time for an individual thread. Storage arrays and RAID levels can make a huge difference here, even if it is a single filesystem.

    SSDs don't have any heads that need to be mechanically moved around, and they don't have to wait for the data on the disk to appear at the read head, so the seek times reduce to (nearly) zero. Therefore, you gain even more from parallel requests to SSDs.

    Also, your application rarely talks directly to the disk. The operating system is also trying to optimize disk access, by caching and reordering requests.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)