Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 77990 invoked from network); 1 Oct 2007 17:25:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Oct 2007 17:25:20 -0000 Received: (qmail 80435 invoked by uid 500); 1 Oct 2007 17:25:09 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 79908 invoked by uid 500); 1 Oct 2007 17:25:08 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 79899 invoked by uid 99); 1 Oct 2007 17:25:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 10:25:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.226.137.76] (HELO nimbus.ott.qnx.com) (209.226.137.76) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 17:25:10 +0000 Received: by nimbus.ott.qnx.com with Internet Mail Service (5.5.2653.19) id <4B7NH2L6>; Mon, 1 Oct 2007 13:24:49 -0400 Message-ID: <3518719F06577C4F85DA618E3C37AB91B1E65D@nimbus.ott.qnx.com> From: Rodney Dowdall To: "'dev@harmony.apache.org'" Subject: RE: [classlib][nio] epoll()-based Selector Date: Mon, 1 Oct 2007 13:24:44 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Virus-Checked: Checked by ClamAV on apache.org 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. Rodney -----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 epoll. On 10/1/07, Aleksey Shipilev 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, Alexei, ESSD, Intel