You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Aleksey Shipilev (JIRA)" <ji...@apache.org> on 2007/10/01 17:28:50 UTC

[jira] Updated: (HARMONY-4879) [classlib][nio] epoll-based Selector

     [ https://issues.apache.org/jira/browse/HARMONY-4879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Shipilev updated HARMONY-4879:
--------------------------------------

    Description: 
As the part of Linux Scalability Project, kernel developers had implemented the epoll() I/O multiplexing facility (http://lse.sourceforge.net/epoll/index.html), which scales much better than legacy poll() and select(). Attached patch implements epoll() support for java.nio.channels.Selector, which can be turned on with option:

-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl

This version is early draft and NOT intended for the inclusion, since result handling could be O(n^2) in the worst case, that would be solved later. Nevertheless, the performance on select() operations has been improved dramatically. 

  was:
As the part of Linux Scalability Project, kernel developers had implemented the epoll() I/O multiplexing facility (http://lse.sourceforge.net/epoll/index.html), which scales much better than legacy poll() and select(). Attached patch implements epoll() support for java.nio.channels.Selector, which can be turned on with option:

-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl

This version is early draft and NOT intended for the inclusion, since result handling could be O(n^2) in the worst case, that would be solved later. Nevertheless, the performance on select() operations has been improved dramatically. On the simple test which registers 2000 connections on the selector and then pushes it to selectNow(), on 16x Tulsa 3 Ghz / SLES9.2 / 2.6.9

Base Harmony:
<as...@box> ~/jre-r576670-work/bin/java -Xms512m -Xmx512m -Xem:client -cp ~/ashipile/SelectTest/ selectnow 2000 10000 10
Server: Opening selector
Server: Opening server
Client: 2000 connections
Client: 10000 requests
Client: 10 iterations
Client: connections established: 2000/2000
Client: 2000 clients connected in 100538 msecs
Client: all clients are connected. I go to sleep forever...
Server: all clients are connected
Server: Ready to serve
Server: iteration: 1/10  selectNow's: 10000  elapsed: 27986 millis
Server: iteration: 2/10  selectNow's: 10000  elapsed: 27814 millis
Server: iteration: 3/10  selectNow's: 10000  elapsed: 27842 millis
Server: iteration: 4/10  selectNow's: 10000  elapsed: 28014 millis
Server: iteration: 5/10  selectNow's: 10000  elapsed: 27611 millis
Server: iteration: 6/10  selectNow's: 10000  elapsed: 27661 millis
Server: iteration: 7/10  selectNow's: 10000  elapsed: 27710 millis
Server: iteration: 8/10  selectNow's: 10000  elapsed: 27713 millis
Server: iteration: 9/10  selectNow's: 10000  elapsed: 27757 millis
Server: iteration: 10/10 selectNow's: 10000  elapsed: 27777 millis

Base Harmony + epoll()-based selector:

<as...@box> ~/jre-r576670-work/bin/java -Xms512m -Xmx512m -Xem:client -Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl -cp ~/ashipile/SelectTest/ selectnow 2000 10000 10
Server: Opening selector
Now using EpollSelectorProvider
Server: Opening server
Client: 2000 connections
Client: 10000 requests
Client: 10 iterations
Client: connections established: 2000/2000
Server: all clients are connected
Server: Ready to serve
Client: 2000 clients connected in 832 msecs
Client: all clients are connected. I go to sleep forever...
Server: iteration: 1/10  selectNow's: 10000  elapsed: 173 millis
Server: iteration: 2/10  selectNow's: 10000  elapsed: 84 millis
Server: iteration: 3/10  selectNow's: 10000  elapsed: 82 millis
Server: iteration: 4/10  selectNow's: 10000  elapsed: 87 millis
Server: iteration: 5/10  selectNow's: 10000  elapsed: 87 millis
Server: iteration: 6/10  selectNow's: 10000  elapsed: 87 millis
Server: iteration: 7/10  selectNow's: 10000  elapsed: 82 millis
Server: iteration: 8/10  selectNow's: 10000  elapsed: 86 millis
Server: iteration: 9/10  selectNow's: 10000  elapsed: 86 millis
Server: iteration: 10/10 selectNow's: 10000  elapsed: 87 millis


> [classlib][nio] epoll-based Selector
> ------------------------------------
>
>                 Key: HARMONY-4879
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4879
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>         Environment: Linux
>            Reporter: Aleksey Shipilev
>
> As the part of Linux Scalability Project, kernel developers had implemented the epoll() I/O multiplexing facility (http://lse.sourceforge.net/epoll/index.html), which scales much better than legacy poll() and select(). Attached patch implements epoll() support for java.nio.channels.Selector, which can be turned on with option:
> -Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl
> This version is early draft and NOT intended for the inclusion, since result handling could be O(n^2) in the worst case, that would be solved later. Nevertheless, the performance on select() operations has been improved dramatically. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.