tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Tomcat 8/NIO performance discrepancies
Date Mon, 12 Jun 2017 20:13:37 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 6/12/17 3:43 PM, Piyush Kumar Nayak wrote:
> Sure, I'll check it out and get back. But the last time I tried, 
> JMeter gave me better numbers than ab. Don't want the client to be 
> the bottleneck.

+1

ab evidently doesn't "do" high-concurrency very well. Something about
a single global-lock. Mladen and Jean-Frederic have more information
about it than I do.

- -chris

> -----Original Message----- From: Mark Thomas
> [mailto:markt@apache.org] Sent: Tuesday, June 13, 2017 1:05 AM To:
> Tomcat Users List <users@tomcat.apache.org> Subject: Re: Tomcat
> 8/NIO performance discrepancies
> 
> On 12/06/17 20:27, Piyush Kumar Nayak wrote:
>> Thanks, Mark. I have been testing with 100 concurrent users.
>> While the executor had the maxThreads set to 150, the connector
>> without the executor was left to the default value (which should
>> be 200). I did not have the disableKeepAlivePercentage attribute
>> set, which means that it should take to the default value of 75.
>> 
>> So, the number of threads in use before the keepalive is disabled
>> in case of non-executor connector should be 150. At 100 users,
>> the no. of clients is at 50% of the maxThread count. Unless I'm
>> missing something here, I don't see why keep-alive would be
>> disabled. I'd appreciate if you can give me some pointers on how
>> you can tell if requests are processed at the server end with
>> keep-alive.
> 
> I suggest you use ab rather than JMeter. I've seen all sorts of odd
> behaviour with JMeter when processing requests very quickly that I
> haven't seen with ab. Also, ab tells you how many of your requests
> used keep-alive.
> 
> Mark
> 
> 
>> 
>> I'll try setting disableKeepAlivePercentage to 100, and see if
>> that improves the performance.
>> 
>> -----Original Message----- From: Mark Thomas
>> [mailto:markt@apache.org] Sent: Thursday, June 08, 2017 7:13 PM 
>> To: Tomcat Users List <users@tomcat.apache.org> Subject: Re:
>> Tomcat 8/NIO performance discrepancies
>> 
>> On 07/06/17 22:28, Mark Thomas wrote:
>> 
>> <snip/>
>> 
>>> I'm still seeing significant differences in BIO with and
>>> without an executor.
>>> 
>>> I'm still looking for the root cause. I have noticed that
>>> without an executor I see far fewer keep-alive requests than
>>> I'd expect. That could explain the difference, or some of it at
>>> least.
>> 
>> Further testing indicates that most, if not all, of the
>> performance difference is down to the fewer number of requests
>> processed using HTTP keep-alive. This is because BIO without an
>> executor is subject to disableKeepAlivePercentage whereas BIO
>> with an executor is not.
>> 
>> If the number of concurrent clients is kept below 75% of
>> maxThreads, performance remains very similar.
>> 
>> The problems you are likely to experience in the real world
>> without disableKeepAlivePercentage (i.e. if you use BIO with an
>> executor) are described in this thread:
>> 
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftomca
t
>>
>> 
.markmail.org%2Fthread%2Fmcfdk2273v2fsh5k&data=02%7C01%7C%7C6816158122
>> aa4914b20208d4ae744a1e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
3
>>
>> 
6325261860429837&sdata=8t1j6lxgc3aTCDq45mXbH7LqedtIuRgPsrgqUKXyCrc%3D&
>> reserved=0
>> 
>> The better tuning options are probably: - increase maxThreads to
>> max expected client concurrency + headroom or if your memory/CPU
>> won't permit that, as high as you can - increase
>> disableKeepAlivePercentage
>> 
>> I'll look at BIO vs NIO next.
>> 
>> Mark
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJZPvXxAAoJEBzwKT+lPKRYCb8QAL555dkQlFCPEXsjqtP7IGIA
7eQjX7gE1Lxk3ycCmTcndyixFWGoGdLwp41OPadVYF9TSe003fiHbptiSsYgCCEM
HEOMisKNkVZg22Wyenm0eJLPaALMOE7xU95rmPpacVxgslPWmMLSsNk9TC/c2xQ1
1o7iiS9/hEF6LsoT5oOLxe/ZGp8jxTHXBgahvqCierzN8T089G7GomVS1Q/FDD2t
OLOu/JRcTUKzxlISONbchtF1fSc9HenLmrZxqVw52iZGLGrbsIAg8D/x7kPhAxbk
HLHG9GwkHh7iOavW25UWFVVlmC58XioDJJVZWTGzEhfxAU/zoyUZbZ2CtqSDTdUG
rcsBjk33A1LYc3yioq8i55fq7d84cLdG2Xf//kUaBq+yP3tuNpWYk/WEOL/kuQFp
IY1z+QykqF1Agfiubc8GyDWhyBvi2+g0uX09796STLfQdk1eC6+aPIpFOtrTh2ou
a8H73w73nJ2R04GnqBm9T+RFJSvjR9HGZ8mGoFYypMeK0qJXOn7t1CVK6/bX7d9n
J4Op5AyncpSlnqRCofMk4zSYGUasKR6BXtZ+2pu+5McnjndHLnUdGAfwy9ReD5fi
5McU18S7EUlvRaXt5pgO9RSDRilm3J+Ar0rGFlSBNmanFTvlgCdKYPTAWmkTcbGW
AOvM4/3itRoZi7DBtEdg
=0H+N
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message