Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F052218BE4 for ; Mon, 14 Sep 2015 12:45:59 +0000 (UTC) Received: (qmail 1519 invoked by uid 500); 14 Sep 2015 12:45:59 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 1434 invoked by uid 500); 14 Sep 2015 12:45:59 -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 1422 invoked by uid 99); 14 Sep 2015 12:45:59 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2015 12:45:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E9FB7C0427 for ; Mon, 14 Sep 2015 12:45:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 0nCCXGSOOFLp for ; Mon, 14 Sep 2015 12:45:57 +0000 (UTC) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 9293442BB4 for ; Mon, 14 Sep 2015 12:45:57 +0000 (UTC) Received: by wicfx3 with SMTP id fx3so131025603wic.0 for ; Mon, 14 Sep 2015 05:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=bM63QT3ygU8Rbu8N8PZm5D722NEf1RbnJ1KAvmo93tc=; b=owUPwm6XON+DtBC27N2A5KPV/WmD0u398n8in51oXgkYHa7PlaXaWOmHFB+ngaoC0G +tCLpXpUc3JqSjdOvZAi40JD7ZfiS6VSACZ4yADo/j2D3dzZDJaZEDEWJV27MRDi1mf3 SLUwrwl90hQ6gFFV5A65VvUcrdNLrDV8rAw0GwU4skC07JCBaJfvNKyVmA1TlEWNEOFD R9JqdkZpZO9XlhGwTpVtwcK68CRFnfRkzr1iijZbN09RIIQJEto06/R6pC8IKYonAnmI GtVaHi/h8vnZqeGEsEERtN9ZlSz9KZczrqZXEWAxbjHb900a0eoQoQ5gEvM7CaOgukeI 3V0w== X-Received: by 10.180.85.103 with SMTP id g7mr25116003wiz.93.1442234756773; Mon, 14 Sep 2015 05:45:56 -0700 (PDT) Received: from [192.168.1.36] (79.Red-88-7-206.staticIP.rima-tde.net. [88.7.206.79]) by smtp.gmail.com with ESMTPSA id bq7sm15392269wjc.31.2015.09.14.05.45.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 05:45:56 -0700 (PDT) Subject: Re: NIO sendfile To: Tomcat Developers List References: <55F68247.9000503@gmail.com> <55F68390.2070801@apache.org> <55F688E1.9090907@gmail.com> From: jean-frederic clere Message-ID: <55F6C182.6060209@gmail.com> Date: Mon, 14 Sep 2015 14:45:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55F688E1.9090907@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 09/14/2015 10:44 AM, jean-frederic clere wrote: > On 09/14/2015 10:21 AM, Mark Thomas wrote: >> On 14/09/2015 09:16, jean-frederic clere wrote: >>> Hi, >>> >>> I have noted that "sendfile" with the NIO connector doesn't fill the CPU >>> on a load test I am testing HTTP/1.1 with: >>> sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImplementation" >>> >>> >>> >>> 16 ab creating 80 connections requesting files from 4K to 32M >>> >>> NIO2 works as excepted with the same configuration but NIO doesn't use >>> the CPU available on the box. >>> >>> Any ideas? >> >> Number of Poller threads available? > > I am using the default... I will now try 8 (8 processors on the box). Somehow that didn't help: +++ 745 Exception in thread "https-nio-8003-exec-95" Exception in thread "https-nio-8003-exec-56" Exception in thread "https-nio-8003-exec-66" Exception in threa d "https-nio-8003-exec-58" Exception in thread "https-nio-8003-Acceptor-0" java.lang.OutOfMemoryError: Direct buffer memory 746 at java.nio.Bits.reserveMemory(Bits.java:658) 747 at java.nio.DirectByteBuffer.(DirectByteBuffer.java:123) 748 at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311) 749 at org.apache.tomcat.util.net.SocketBufferHandler.(SocketBufferHandler.java:38) 750 at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:405) 751 at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:531) 752 at java.lang.Thread.run(Thread.java:745) 753 java.lang.OutOfMemoryError: Direct buffer memory 754 at java.nio.Bits.reserveMemory(Bits.java:658) 755 at java.nio.DirectByteBuffer.(DirectByteBuffer.java:123) 756 at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311) 757 at org.apache.tomcat.util.buf.ByteBufferUtils.expand(ByteBufferUtils.java:80) 758 at org.apache.tomcat.util.net.SecureNioChannel.processSNI(SecureNioChannel.java:311) 759 at org.apache.tomcat.util.net.SecureNioChannel.handshake(SecureNioChannel.java:169) 760 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1498) 761 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 762 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 763 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 764 at java.lang.Thread.run(Thread.java:745) +++ By default -XX:MaxDirectMemorySize=0 (automatic, what is automatic here?) Any hints? Cheers Jean-Frederic --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org