2006年11月13日
Async IO on lighttpd
lighty's lifeによると、次期lighttpdはaioを使って80%ほどスループットが向上したようである。
The idea is:
1. create a buffer in /dev/shm and mmap() it
2. start a async read() from the source file to the mmap() buffer
3. wait until the data is ready
4. use sendfile() to send the data from /dev/shm to the network socket
Important for the performance: the data is never copied into user space. We only move it from one side of the kernel to the other side.
賢い。確かに早くなるのは分かるんだけど、エラー処理の部分が気になるなぁ。コード見てみる。しかしまずlibaio.hというのが何処にあるか分からんぞ...。このライブラリはどこから来ておるのだ...。
- by
- at 17:07

comments