tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: VERY HIGH TRAFFIC TUNING
Date Thu, 10 Jul 2014 14:38:23 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

HernĂ¡n,

On 7/9/14, 11:50 AM, doomito wrote:
> Thank you for the answer. I will begging experimenting on 1 box
> with this configuration:
> 
> 
> <Connector port="8009" protocol="AJP/1.3" address="127.0.0.1" 
> emptySessionPath="true" redirectPort="8443" maxThreads="2048" 
> minSpareThreads="32" connectionTimeout="20000"
> keepAliveTimeout="10000" enableLookups="false"
> request.registerRequests="false" />

Beware about setting timeouts on AJP connectors.

> I a couple of questions raises from your reply: 1) a couple of
> years ago we did a BENCHMARK mod_proxy vs mod_jk and the difference
> was noticeable in favor of mod_jk. There was any improvement on 
> mod_proxy connector in particular?

According to recent tests (I just noticed that I hadn't posted the
performance slides and data from ApacheConNA2014... I'm working to get
the final version of the slides updated at which point I can give you
a reference), single-threaded mod_jk and mod_proxy_ajp perform
similarly for requests that produce less than 2MiB of response data.
Higher than 2MiB of response data sees mod_proxy_ajp's performance go
down quite a bit for some reason.

For many threads (248) the results are similar except that we did not
observe any mod_proxy_ajp performance drop higher than the 2MiB
response size. mod_proxy_http is still faster than both up to a point,
where the throughput of the connection (i.e. network speed) becomes
the limiting factor).

If you want to switch connectors, switch from mod_jk/mod_proxy_ajp to
mod_proxy_http: the performance of that connector seems to beat them
both by a noticeable margin. Note that using mod_proxy_http with SSL
on the front-end requires more setup than what you get by default with
the AJP-protocol connectors who automatically forward all the SSL
information back to Tomcat.

> 2) this is definitely an ignorant question, but I see a lot of
> connections made to 8080 port instead of 8009.  That said, I don't
> fully understand WHY and also, do I need to also tuned this? I have
> nothing going directly to tomcat, everything goes trough Apache
> mod_jk.
> 
> <Connector executor="tomcatThreadPool" port="8080"
> protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"
> />

That's an HTTP connector, not an AJP one. Perhaps you have some
requests using AJP and others proxied using HTTP? What does your httpd
configuration look like?

You might want to just disable the HTTP connector and see what breaks:
if you are going to proxy requests from httpd -> Tomcat, you probably
only want to use a single protocol.

Finally, you should use a shared thread pool ("executor") across all
your connectors. This will allow you to use a single pool instead of
multiple pools which can reduce your resource usage.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTvqVdAAoJEBzwKT+lPKRY1gUQAJPfKu5R/yRfU97lj/rvY7dO
AS5P27U4qrc7Zs8HiCVSVgG5GNYKpxhi3qwHINT+c/WBBU5bgLWR5vHqWJ9pF5q8
/chdqdJ7JK7WICbmhLUJA1V5yaSU7kI27nCBaD2QnlC0YhXFj+c3yA6QjEvzg/YY
vRGYP3IuKoIP35txm3yILMSunmWw+vbHsTm1idT9G0pCiRIwMDdVOIjTfTZoMB3R
yhaSiyrMX4dosCQEXlTUWlhJhN8TFgVYukUJ1TAbAAHDwKZ3ekHTrniLuv4/WMvb
0wagQnxVq17PQ4Q3oC0cWfmLTf2Su7LbI0Z/pOEMvIzfOjsCJTg+pqMv6U1DgnXX
Rww2a0foBUJ2unLaUZ7BCQWz9mHWJjjkX/tgWB2B2QBXcPHq5cjuN/yJykDDBNf1
AligGnhbgbLs6mMhjG9MDD/I+NKeFJ/KgGaWAOJ4FpT1CTenqualxe6NPnz3dT7e
VG7p8qrTFVqaxd6dKhNT+dGj0voCdCdGORVOK1wC0QKASzIlw6oX4tr6MppayZNF
z8JwtyuYkCfKP65UoskuX4u5RaEJJqiLNPs7cEU/qQfnsfHtJmjjrMb0BlaiLYrL
84aY6AayXgNw2mwoz4pHR6bsnmdJkeT8hMAp9jiG3ngxDqvQGlnqTmpvEE7A2psg
1YpYtIl36zAsWF/1gQ3C
=ls3u
-----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