Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any disk supports parallel reading?

Reading files using multiple threads on a multi core system does it increases performance? Is any disk supports parallel access?( not cuncurent access)

like image 771
Balraj goud Avatar asked Dec 02 '25 05:12

Balraj goud


1 Answers

It makes a difference on both SSDs and spinning disks, but largely for different reasons.

For SSDs, if requests come from a single thread, there will be a dead time after the SSD has retrieved the data for one request and before the thread can send its next request. This dead time can be a significant fraction of the SSD's read time because SSDs are so fast.

For spinning disks, the order in which reads are executed can matter. For example, if a read is issued for track 1, track 12, and track 2, it can be more efficient to perform the read for track 2 before the read for track 12. But this cannot happen if the read for track 2 doesn't get issued until after a thread processes the results of the read from track 12.

In the case of SSDs, multiple cores help a lot more than mulitiple threads do. In the case of spinning disks, multiple threads can issue multiple reads that can be re-ordered even if they all have to share the same core.

like image 147
David Schwartz Avatar answered Dec 03 '25 21:12

David Schwartz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!