Re:Understanding the code inside Tornado, the asynchronous w...
by tptacek on Sunday May 08, 2011 @12:58AM
(#2525293)
It's not overloaded. Respectfully, you simply don't understand what it means.
Re:Understanding the code inside Tornado, the asynchronous w...
by FooBarWidget on Sunday May 08, 2011 @05:23AM
(#2525557)
It would be good to have more I/O API calls available that don't require as much copying but so far there simply aren't any such APIs that are mature and stable. POSIX AIO is only supported in a very limited way; on Linux it only works for files, not sockets. splice() only works between files/pipes and TCP sockets but not Unix domain sockets. Etc etc.
Yes, if aio_* system was never invented, we wouldn't be arguing, but because it exists it introduces a new possible way of doing IO. It is a general enough way of doing IO and at hardware level we have DMA but in the land of syscalls we have aio_.
Ok, just curious, what words would you use to describe what aio_ calls do?
Over the years many have thought of a way to bring that style of IO to networking. So far it works for disk IO very well. For example take a look at this benchmark from lighttpd for a sendfile:
http://blog.lighttpd.net/articles/2006/11/09/async-io-on-lin...
It looks like there is a consistent 50% improvement in speed when using aio with a 1MB block.
Wouldn't it be nice to have that kind of improvement for network sockets as well? I think it would be and there have been many attempts over the years but nothing good yet has happened.