Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 96415 invoked from network); 8 Oct 2007 09:51:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Oct 2007 09:51:00 -0000 Received: (qmail 96715 invoked by uid 500); 8 Oct 2007 09:50:47 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 96693 invoked by uid 500); 8 Oct 2007 09:50:47 -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 96684 invoked by uid 99); 8 Oct 2007 09:50:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2007 02:50:47 -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: domain of alexei.fedotov@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2007 09:50:49 +0000 Received: by ug-out-1314.google.com with SMTP id u40so805226ugc for ; Mon, 08 Oct 2007 02:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=0HhViasHD1BqKJAPfwCFi0QQNTdSFmp8A5SLQUy64gg=; b=p/4uDDn/hQt8jyR7xKjYFnPZG4VjKgwVLJCJagSpuNgnCTfNckMRpmkwrQCzXlLe4aNNS4nn80cxYy2AnEiKBVl8/1RXCD9lix7KI4ESGNXJhfmsJFKiiBmQD2PyVJUFrROO5m1VOf/LLzrPVyaaWn6/dTL36dw81uDLvMEtCkk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BJiyATSVzATg3O6OMVUxDkdeKB2H0KXOt7TgqMaoWZjDbupyxAKTefymIE1yRqeFMfeA+ahwlKvLiZF3B+U668OZO3n2fWvMPYIEGBitsQzSk0BbLP/SREW/VvyHuSj9VZ/IxITUpEEETkM4nFDkDePRRGzovakY/PoMQJo2SIo= Received: by 10.66.221.17 with SMTP id t17mr6645293ugg.1191837010215; Mon, 08 Oct 2007 02:50:10 -0700 (PDT) Received: by 10.67.21.8 with HTTP; Mon, 8 Oct 2007 02:50:10 -0700 (PDT) Message-ID: Date: Mon, 8 Oct 2007 13:50:10 +0400 From: "Alexei Fedotov" To: dev@harmony.apache.org Subject: Re: [classlib][nio] epoll()-based Selector In-Reply-To: <5c8e69f0710080146u6a53e1b9hed1ccdab5781c466@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4bebff790710010849q3116964br7d85dc5a5b5f20a7@mail.gmail.com> <4bebff790710040356s77a3200el7e6ce03a80222c6b@mail.gmail.com> <5c8e69f0710080146u6a53e1b9hed1ccdab5781c466@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hello Jimmy, > However I have a concern that, shall we offer a build for the > users with a previous version of Linux kernel 2.6 (maybe there's a lot > of them who also require JDK)? I believe we need to look forward and take advantage of new OS and hardware features. We offer stable releases (harmony trunks) of older versions and may support and patch them if a customer requests. But generally we should be going forward and becoming more effective. Thanks! On 10/8/07, Jimmy,Jing Lv wrote: > Hi, > > It's really cool ! :) > > However I have a concern that, shall we offer a build for the > users with a previous version of Linux kernel 2.6 (maybe there's a lot > of them who also require JDK)? IMHO, at least we can reserve a copy of > previous implementation of select for that? > We may modify the makefile or build.xml for that? > > 2007/10/4, Aleksey Shipilev : > > Hi again, > > > > I have updated the JIRA [1] with the final patch, all known > > performance issues were resolved. I have also run extensive experiment > > for measuring the performance of Selector.selectNow() operation on > > current and epoll-based implementations comparing to Sun 1.6.0. You > > might find the results in the JIRA attachment: comparison of current > > and epoll-based implementation [2]. > > > > This implementation successfully passes JUnit tests and simple > > workloads. It's also does not change anything in the classlib (not > > saying about makefiles), additional option should be specified to > > enable epoll functionality, so it's safe to apply this patch at any > > time. > > > > BTW, as I found not so long ago, epoll-based Selector is the main > > improvement for java.nio.* in Sun 1.6.0 classlib [3], and we're going > > neck and neck with them [4] :) > > > > Thanks, > > Aleksey Shipilev, > > ESSD, Intel > > > > [1] https://issues.apache.org/jira/browse/HARMONY-4879 > > [2] https://issues.apache.org/jira/secure/attachment/12367060/2000-all.png > > [3] http://java.sun.com/javase/6/docs/technotes/guides/io/enhancements.html > > [4] https://issues.apache.org/jira/secure/attachment/12367060/2000-best.png > > > > 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 > > > > > > > > -- > > Best Regards! > > Jimmy, Jing Lv > China Software Development Lab, IBM > -- With best regards, Alexei, ESSD, Intel