Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 14014 invoked from network); 22 Jun 2006 19:37:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Jun 2006 19:37:37 -0000 Received: (qmail 51263 invoked by uid 500); 22 Jun 2006 19:37:35 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 50317 invoked by uid 500); 22 Jun 2006 19:37:33 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 50306 invoked by uid 99); 22 Jun 2006 19:37:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2006 12:37:32 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [212.27.42.35] (HELO smtp5-g19.free.fr) (212.27.42.35) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2006 12:37:32 -0700 Received: from [192.168.0.1] (gou06-1-82-224-99-120.fbx.proxad.net [82.224.99.120]) by smtp5-g19.free.fr (Postfix) with ESMTP id BB95727856 for ; Thu, 22 Jun 2006 21:37:10 +0200 (CEST) Message-ID: <449AF163.4080503@apache.org> Date: Thu, 22 Jun 2006 21:37:07 +0200 From: Remy Maucherat User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: svn commit: r416444 [1/2] - in /tomcat/tc6.0.x/trunk/java/org/apache: coyote/http11/Http11NioProcessor.java coyote/http11/InternalNioInputBuffer.java tomcat/util/net/NioEndpoint.java References: <20060622190504.608491A983A@eris.apache.org> In-Reply-To: <20060622190504.608491A983A@eris.apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N fhanik@apache.org wrote: > Author: fhanik > Date: Thu Jun 22 12:05:02 2006 > New Revision: 416444 > > URL: http://svn.apache.org/viewvc?rev=416444&view=rev > Log: > Fix so that we don't do a busy read, instead we are properly doing a NIO poller wait > This way, we can achieve blocking read, without wasting CPU cycles. > Since we are using Java 5, I will be changing this implementation from using synchronized to using the Exchanger, this is also to avoid anyi locks that can happen. For example, in the current implementation the poller can call notify before we have had a chance to call wait This is a little bit better (2300 r/s now), but: - I get some cancelled key exceptions (most likely they could be caught): 22 juin 2006 21:32:38 org.apache.tomcat.util.net.NioEndpoint$Poller events GRAVE: java.nio.channels.CancelledKeyException at sun.nio.ch.SelectionKeyImpl.ensureValid(Unknown Source) at sun.nio.ch.SelectionKeyImpl.interestOps(Unknown Source) at org.apache.coyote.http11.InternalNioInputBuffer$1.run(InternalNioInputBuffer.java:573) at org.apache.tomcat.util.net.NioEndpoint$Poller.events(NioEndpoint.java:1120) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1176) at java.lang.Thread.run(Unknown Source) - I get a problem in the poller thread after a while: Exception in thread "http-8081-Poller-0" java.lang.NullPointerException at sun.nio.ch.WindowsSelectorImpl$FdMap.remove(Unknown Source) at sun.nio.ch.WindowsSelectorImpl$FdMap.access$3000(Unknown Source) at sun.nio.ch.WindowsSelectorImpl.implDereg(Unknown Source) at sun.nio.ch.SelectorImpl.processDeregisterQueue(Unknown Source) at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source) at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) at sun.nio.ch.SelectorImpl.select(Unknown Source) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1182) at java.lang.Thread.run(Unknown Source) However, performance without keepalive (no -k) is down. Rémy --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org