You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was surprised to find that there is no mention made to the benefit of I/O multiplexing.
A context switch takes around 0.2µs between async tasks, versus 1.7µs between kernel threads. But this advantage goes away if the context switch is due to I/O readiness: both converge to 1.7µs.
The way the benchmarks are set up, from what I could tell, is such that I/O requests are fulfilled sequentially. This means that every call to epoll_wait corresponds to a single readiness event, i.e. a single context switch. This fails to consider scenarios where a large number of concurrent I/O operations allow the cost of the context switch to be amortized, i.e. calls to epoll_wait returning multiple readiness events in exchange for a single context switch.
In other words the cost of an I/O readiness switch may be the same, but an asynchronous server will pay the cost less due to I/O multiplexing. The wording of the quote ("but this advantage goes away") seems to suggest that the perceived benefit of async does not actually manifest in the case of I/O, which is not necessarily true.
The text was updated successfully, but these errors were encountered:
I was surprised to find that there is no mention made to the benefit of I/O multiplexing.
The way the benchmarks are set up, from what I could tell, is such that I/O requests are fulfilled sequentially. This means that every call to
epoll_wait
corresponds to a single readiness event, i.e. a single context switch. This fails to consider scenarios where a large number of concurrent I/O operations allow the cost of the context switch to be amortized, i.e. calls toepoll_wait
returning multiple readiness events in exchange for a single context switch.In other words the cost of an I/O readiness switch may be the same, but an asynchronous server will pay the cost less due to I/O multiplexing. The wording of the quote ("but this advantage goes away") seems to suggest that the perceived benefit of async does not actually manifest in the case of I/O, which is not necessarily true.
The text was updated successfully, but these errors were encountered: