users@glassfish.java.net

Re: Thread Count tuning in HTTPService

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Thu, 27 Mar 2008 18:09:55 -0400

Hi,

glassfish_at_javadesktop.org wrote:
> I'm searching the best tuning in my glassfish server.
>
> (The application tested, running on glassfish consist in a web module that comunicates with local ejb..Ejb make some database query by toplink..)
>
> I use a tool in order to make many http request at same time.
>
> So I when I edit the HTTPService configuration, I discover that little thread count works better than great thread count.
>
> 10 thread count in request processing section of HTTPService configuration work better than 100 or 500 or 1000..
>

> Why?


Because we are using JDK NIO to handle IO, and NIO was introduced to
break the 'one thread per connection'. With NIO, you have the 'one
request per connection'...technically, it means that when there is no
bytes to read and write, you pool your file descriptor instead of using
a thread that block waiting for some IO event.

Let me know if you need more info :-)

-- Jeanfrancois

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