The Source for Java Technology Collaboration
User: Password:



Jean-Francois Arcand

Jean-Francois Arcand's Blog

epoll my Grizzly on Linux

Posted by jfarcand on December 12, 2006 at 08:38 AM | Comments (2)

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:


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Having a fully working epoll would be nice, but note that it is still a bit unstable, at least this bug bites me:
    bug 6481709

    It seems that it will be fixed in an 6.0 update.
    For now I would not use epoll in production.

    Posted by: ernimril on December 12, 2006 at 01:34 PM

  • That is the only bug to be reported against this Selector implementation :-) and it is likely to only arise in cases where a server is doing a lot of file I/O as well as socket I/O. The fix will be in 6.0u1.

    Posted by: jfarcand on December 12, 2006 at 01:53 PM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds