|
|
|
|
|
by albertzeyer
4074 days ago
|
|
Is there a detailed overview about which functions in libuv (Nodejs) rely on blocking primitives and thus are using the thread pool to work async? From [here](http://docs.libuv.org/en/latest/design.html), it sounds like all file IO is always based on blocking primitives, and native async file IO primitives are not used, although such async file IO primitives do exists and were tried out in libtorrent (http://blog.libtorrent.org/2012/10/asynchronous-disk-io/). The result of that experiment however was mostly that the thread pool solution was simpler to code (I guess). From the libuv design doc, the overview is: * Filesystem operations * DNS functions (getaddrinfo and getnameinfo) * User specified code via uv_queue_work() I wonder whether this is really the best solution of if some combination of a thread pool and native async disk IO primitives could perform better. |
|
But if you have also read the following blunt criticism from Linus http://yarchive.net/comp/linux/o_direct.html he also outlines a better alternative way of implementing asynchronous disk io on Linux at least.