Skip to main content

epoll my Grizzly on Linux

Posted by jfarcand on December 12, 2006 at 8:38 AM PST

Youpie!! epoll is now supported in both Java SE 6 and SE 5 update 10 on Linux 2.6 kernel. You can read Alan's blog for more information. Java SE 6 uses it by default. If you want to enable when using Java SE 5 update 10, just pass the following property:

-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider

More information can be found here and here

If you are using Java SE 5 and GlassFish on Linux, you can turn it on by manually adding the property in ${glassfish.home}/domains/domain/config/domain.xml, or by executing

asadmin create-jvm-options -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider

epolling Grizzly is easy!

technorati: