I have read that select and multi-threaded programming were low performing IO models, for example this IBM developerworks article on high perfomance IO.
I do not understand how synchronising/aynchronising : Blocking/Non-Blocking is improving the performance. Why is AIO the best option here?
Being asynchronous and/or non-blocking does not provide any inherent speed boost to individual IO operations within a system, if it is going to take x milliseconds to read from the disk that’s what it will take.
The advantage of these approaches shows true in multi-threaded environments (or environments where operation can continue despite delayed IO) by allowing the IO operations to be effectively separately from the main thread of execution. The perceived performance increase from this is due to the decreased number resources used to simply wait for IO to return or unblock.
A good comparison of asynchronous and non-blocking is available in this thread.
Blocking an entire process while waiting for a single IO to finish isn't efficient if there are other things the process could be doing. AIO is one means of allowing the process to do other things while the system is doing IO for it; multithreading is another. The difference between using multiple threads or using AIO is largely one of design; in a typical server, for example, it's much easier to use multiple threads, and there shouldn't be much difference in performance. For other applications, AIO might be simpler and/or give more performance. It's another tool to be considered, but it doesn't apply everywhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With