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


in reply to Re^4: MCE: Slow IPC between child and gather process in parent
in thread MCE: Slow IPC between child and gather process in parent

Ok, I'll bite.

You said:

I predict that if instead you read the file sequentially (and advised the operating system that this is what you intend to be doing), the OS will read the data from the file in large gulps and stash it in memory, and it would “lazily” write the output in like manner.

But the OP already said:

I have a reasonably large dataset of html files ( +/- 950K files, average size 23K, total size 21G) which I need to parse ...

So it's not possible to read sequentially.

That said, how much the process can benefit or not from parallelism depends on way too many factors (disk layout, OS, kernel parameters, other workloads on the same infrastructure, the phase of Venus, etc.) It's just not possible to make an absolute statement. As marioroy and Anonymous Monk mentioned above, the OP needs to benchmark it in his particular environment to see how much parallelism is optimal.