harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4879) [classlib][nio] epoll-based Selector
Date Mon, 01 Oct 2007 15:28:51 GMT

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

Aleksey Shipilev commented on HARMONY-4879:
-------------------------------------------

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:
<ashipile@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:

<ashipile@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

This mean that epoll()-based selector is 300x times faster than legacy poll().

> [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.


Mime
View raw message