users@glassfish.java.net

Re: Busy threads in Grizzly

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 13 Oct 2009 16:49:08 -0700

Salut,

glassfish_at_javadesktop.org wrote:
> Hello folks
>
> We've moved to Grizzly from Coyote and are trying to monitor the number of busy threads. Under the load applied we've noticed around 100+ busy threads at a given time (during the peak load) in our tests while running with coyote. I understand the Grizzly employs a different threading model and thus we might not see the same amount of threads been utilised. However on the same load the jmx attributes only show around 5 busy threads during the peak load. It looks a bit dodgy on the reduction (or is it not).

By default, Grizzly just need 5 threads to perform well. Coyote use
blocking I/O, Grizzly non blocking and that makes a big difference. You
can increase that number but I suspect your application will scale a
little less well.


As for the config, I've setup 150 max threads for Request Processing
threads with 1 Keep Alive thread and 5 Acceptor threads on the listner.

I see. Can you send me a jstack <PID> of your threads? Which version of
GF are you using? You should have more that 5 threads created then...but
if the requests are simple to serve, I suspect Grizzly can handle the
load with 5 easily.

These values were put with a mix of the default values with the
intention of tuning them. To get there was wondering if some one could
shed some light on the above as to if the the busy threads viewed from
the jmx attribute is the correct place to look at and how it applies or
reflect on the actual load.
> Also we've noticed that the load on the box was about 0.5 higher than what we was running with coyote. Any thoughts on tuning around these attributes is much appreciated. Thanks!!

How many core/cpu that machine have? The acceptor-threads value should
reflect that number.

A+

- Jeanfrancois


>
> Cheers
> -- Imran
> [Message sent by forum member 'imranbohoran' (imranbohoran_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=367831
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>