Recently I am learning how to write a high 开发者_开发技巧performance web server.There is a experiment by RedHat says that epoll is faster than aio. someone says that because aio in Linux kernel is implemented with pthread. It's difficult for me to find latest information to prove this.Also I don't know is epoll still better than aio now on Linux?So I want to know where can I get the newest information about aio on Linux 2.6.x. Thx a lot!
I'm researching the same area.
Can you even make aio on Linux work? I write 300M with aio_write() and see them as dirty pages in the cache. That means they don't go directly to the IO scheduler, but to the VM and later pdflush/flush. Which means aio is as good/bad as just buffered io.
I'm on 2.6.16.46 on the build machine and 2.6.27.19 on the target. This isn't exactly newest Linux kernel/libs, so that may be a problem.
Another aspect is the IO scheduler you use. CFQ favors synchronous IO, but may be tuned for async. It also supports IO priorities.
For starters, I would recommend watching a few places when you execute your IO:
- /proc/meminfo - see dirty pages trends
- echo 1 > /proc/sys/vm/block_dump and watch syslog, you'll see who's doing the writing and when
- sar -dp 1 - see if your devices are being utilized at 100%
- cd /proc; cat */status | grep State - see who's blocked on disk
- /sys/block//queue/iosched - io scheduler tunables
精彩评论