tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jean-frederic clere <jfcl...@gmail.com>
Subject Re: NIO sendfile
Date Mon, 14 Sep 2015 12:45:54 GMT
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.<init>(DirectByteBuffer.java:123)
     748         at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
     749         at 
org.apache.tomcat.util.net.SocketBufferHandler.<init>(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.<init>(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


Mime
View raw message