harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodney Dowdall <rdowd...@qnx.com>
Subject RE: [classlib][nio] epoll()-based Selector
Date Mon, 01 Oct 2007 17:24:44 GMT
Sorry about this...mistake on my part. 

-----Original Message-----
From: Rodney Dowdall [mailto:rdowdall@qnx.com] 
Sent: Monday, October 01, 2007 1:23 PM
To: 'dev@harmony.apache.org'
Subject: RE: [classlib][nio] epoll()-based Selector

8:00 AM at Bell Sensplex, Direct Energy Pad. 


-----Original Message-----
From: Alexei Fedotov [mailto:alexei.fedotov@gmail.com] 
Sent: Monday, October 01, 2007 12:45 PM
To: dev@harmony.apache.org
Subject: Re: [classlib][nio] epoll()-based Selector

Great job, Aleksey! x320 looks fantastic.

I recall that one of my former colleagues hacked callback-based
dispatch into Linux kernel to process IP-telephony calls quickly. It's
nice to know that now anyone can use this feature just by calling

On 10/1/07, Aleksey Shipilev <aleksey.shipilev@gmail.com> wrote:
> Hi all,
> I would like to present the epoll()-based java.nio.channels.Selector
> for Harmony. Epoll facility [1] was developed as the part on Linux
> Kernel starting from version 2.5.44, and its interface was finalized
> starting before 2.6.x kernels. Epoll is generally driven by callbacks
> inside the kernel and thus it strives to be O(1), whereas legacy
> poll() and select() are driven by traversing linked lists and thus
> being O(n).
> You can find draft implementation at HARMONY-4879 [2]. This version is
> ready to play, but not intended for inclusion, since there are a
> couple of performance problems persist (like possible O(n^2) at
> processSelectResults()). I will try to eliminate them in several days.
> However, this patch successfully passes JUnit tests and might be ready
> to be tried on some networking-heavy workloads.
> Speaking about performance results, simple test which registers 2000
> channels on one Selector and then continuously calls selectNow()
> reveals this:
> Harmony-r576670:
>  connect time: 100538 msecs
>  selectNow() time (10000 times): 27777 msecs
> Harmony-r576670 + HARMONY-4879:
>  connect time: 832 msecs
>  selectNow() time (10000 times): 87 msecs
> Speedups:
>  connect: 120x
>  selectNow(): 320x
> More details are in JIRA.
> Is someone interested in the topic?
> I would like to collaborate with you then - to prevent duplication of work
> [1] http://lse.sourceforge.net/epoll/index.html
> [2] https://issues.apache.org/jira/browse/HARMONY-4879

With best regards,
ESSD, Intel

View raw message