-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jesse,

On 2/6/14, 10:11 PM, Jesse Barnum wrote:
> Problem summary: My nio polling threads are using too much CPU
> time.

AFAIK, the NIO "poller" doesn't really poll. It's more like an event
processor. It should use very little CPU time.

> Application overview: My application has from 1,300 - 4,000 users
> connected at any given time. Each user sends about 200 bytes, then
> waits 30 seconds, then sends about 200 bytes, and this just loops
> for each user.

You're using standard HTTP with long keepalives, right? It sounds like
this application is ripe for a re-architecture around Websocket or
something similar.

> Each user connects with SSL, and we use a long keepalive to ensure 
> that the HTTP connection doesn't close, so that we don't have to 
> renegotiate SSL.
> 
> Configuration: Ubuntu 12.0.4 with Tomcat 7.0.35, 1.75 gigs of RAM.
> 
> We are using Apache with SSL and mod_proxy_ajp to forward requests
>  to Tomcat. It has MPM module enabled, with 500 ThreadsPerChild,
> so we typically have from 3-9 Apache instances running.
> 
>> <IfModule mpm_worker_module> ServerLimit         12 ThreadLimit
>> 1000
>> 
>> StartServers         1 MinSpareThreads      25 
>> MaxRequestsPerChild 0 MaxSpareThreads     500 ThreadsPerChild
>> 500 MaxClients          5000 </IfModule>

If you are expecting long keepalive times with a huge amount of
activity on each one, you might want to switch to the "event" MPM,
which is httpd's version of Tomcat's NIO connector.

You might be able to get away with fewer threads under the event MPM
as well.

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

iQIcBAEBCAAGBQJS9Tn9AAoJEBzwKT+lPKRYPcMP/if0sMK2+6kKaaaHN1FG8N+g
lgOQHUz4xyUAOGESAY7qIQaWcpuAisiVTY992BhzrzkLQz3vhkc8XhMX4vNYbrak
6sd6j8Kd+/W7IYFykbWDJ3kRioXy5kgbjcf/gT0PWtXrcJ+hAAv3g3NQZP8HrNRf
kiU2AY1zYbbexchZTw+wteDOR5HMf2ObOcHHzvAxFjnObKiKrKXHlkkxMF25UTPp
BADhaSgcFN75mRzaAOoJMTP6gFdscAB2thAY24sNbpqko6Hyk/mgN+cmHKFliw5O
tzp8c2L1chszOBz3/XdSO5ZBXpb0/gNwPF5RQ2UoufL0edlPHP1PKOArJjhb6HSv
JH4IORdljTJONFW6VuCeoUgMZC7nkpFkWDQeXYYaVn4KjNGZbPn+ms0juLz+qpqn
L6BgK5E9AUx0RZcqcfsuIOktw0RE4sXN7ty/uAplze7kYIzkA+u8lfFexZWR92CO
xmWA/0Aolt9OJd+lYVZdYW3Hp8Us8Ml4o9DC9tUTN/l+jw/gASKyqcomrLjDF4mc
PcB0+gSSyPaaHHaAJmDYuEVeH9GFJvF4xgSMUrltrUUIlkGnkzpKaxcefPWvGgmi
oJZLCtvxGhiuhkrGddWwH8ocAgV6C3EzzUao2JJbkeRAk+q5ZAOGmadmoyZ5gjKs
glccs5BBQC5Sba4TZvdi
=kcAQ
-----END PGP SIGNATURE-----

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

Reply via email to