At what point is asynchronous reading of disk I/O more efficient than synchronous?

Posted by blesh on Programmers See other posts from Programmers or by blesh
Published on 2012-09-12T14:25:09Z Indexed on 2012/09/12 21:49 UTC
Read the original article Hit count: 223

Filed under:
|
|

Assuming there is some bit of code that reads files for multiple consumers, and the files are of any arbitrary size: At what size does it become more efficient to read the file asynchronously? Or to put it another way, how small must a file be for it to be faster just to read it synchronously?

I've noticed (and perhaps I'm incorrect) that when reading very small files, it takes longer to read them asynchronously than synchronously (in particular with .NET). I'm assuming this has to do with set up time for things like I/O Completion Ports, threads, etc.

Is there any rule of thumb to help out here? Or is it dependent on the system and the environment?

© Programmers or respective owner

Related posts about efficiency

Related posts about async