文章:
http://blogs.sun.com/alanb/entry/epoll
JDK 6.0 nio支持epoll,對并發idle connection會有大幅度的性能提升,這就是很多網絡服務器應用程序需要的。
One of the updates in build 59 of
Mustang
(Java
TM SE 6)
is that the New I/O
Selector
implementation will use the
epoll event notification
facility when running on the Linux 2.6 kernel.
JDK 5.0 update 9也支持了。
The epoll SelectorProvider will be included in 5.0 update 9. To enable
it requires setting the system property
java.nio.channels.spi.SelectorProvider to the value
sun.nio.ch.EPollSelectorProvider.
5種IO模型:
阻塞IO
非阻塞IO
多路復用
信號驅動IO
異步IO
最好性能的還是異步IO,目前Java只能支持到多路復用一級,期待著以后Java 7.0/8.0支持異步IO,6.0是沒有希望了。