Calculating speedup of this parallel program
Kind of application you mention seems to be I/O bound i.e., application execution time is dominated by I/O time (Ti). In this case using multiple threads is not going to be advantageous as there is only one connection between your I/O device (permanent storage) and CPU (having multiple cores). That one connection is the bottleneck. You will not observe much of a speed-up as you increase the number of threads. There may be slight gain as number of threads increase initially, as threads try to saturate and use the maximum bandwidth possible for the I/O connection. Gain will also depend on how much time is spend on I/O and how much on processing of read data. Both of them can run in parallel for two different threads. But your question seems to suggest that I/O time (to get data) &gt;&gt; compute time (to process data). Hence there will be limited gain by increasing the number of threads. Instead, try to optimize the I/O. Keep it sequential and read in larger blocks.