Thread count tuning

hi,

I need to define the max thread count number according my expected number of maximums simultaneous users. In order to tuning my application server for attend 60.000 sessions per minute, what is the thread count number?, so, what parameters i must tuning?documentation about Application Server enterprise Edition 8.1 not say nothing about it.

I thank your help.

[384 byte] By [migueliusa] at [2007-11-14]
# 1

Why do you need to have the maximum thread count equal to the maximum number of simulatneous users? You'll never end up with a system that has 60,000 threads.

If you are doing traditional-style HTTP, then typically you can support many thousands of users with just a few threads. For example, our SPECjAppServ er submissions use about 40 threads to handle 4000 clients. It all depends on how many requests each client actually makes per second, and how long each request takes. If the clients are idle for long periods of time, you could handle 10s of thousands with just a few threads.

The keep-alive tuning is also critical in that scenario, as the server will eventually start disconnecting clients, who will re-create the TCP connections. That works seemlessly from a functional point of view, but isn't necessarily the optimal thing for performance.

On the other hand, if you're trying to use a Web 2.0-style HTTP request where you simulate server pushes by having the servlet request block, then yes, in 8.1 you will need one thread per client, but you'll be bound by OS and other system constraints on the number of threads the process can have. You'd be much better off in that case using the Asynchronous Request processing features being added to AS 9.1 (see Sun's project glassfish for details).

For information on configuring the thread count for 8.1, see:

http://docs.sun.com/source/819-0215/httpservice.html

In particular -- the section on Configuring HTTP Service Request Processing Threads.

sdoa at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...
# 2

I need to know how to tuning thread count, or another parameters for support 60.000 session per minute for our portal server (runing over application server ee 8.1), i don't know if for this i must to set thread count to 60000. In documentation not specific how i can tuning http parameters for a determined number of simultaneous sessions. This is that i need to do.

migueliusa at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...
# 3

Sorry; I misunderstood what you meant by your first post. Still, the point is that the number of threads very much depends on the profile of your user' sessions: if they make frequent requests, how long the requests take for the appserver to fulfill, how long they do keep-alive, and so on. Not to mention the hardware you have available (you'd use correspondingly more threads on a SunFire T2000 with 32 processing threads than on a white-box PC with a single CPU). So there isn't a single answer that can be given.

The best rule of thumb is to find something to simulate your user load (including think time) and run that and observe the CPU and measure the throughput you get. If you have idle CPU time, you can increase the number of threads until you measure no corresponding increase in throughput. If you are CPU bound, try lowering the number of threads. If you become CPU bound with a minimal amount of threads, you'll need bigger/faster hardware.

sdoa at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...
# 4

ok,

But, there is some documentation with an similar example. Actually, i will implement two instance of portal server in Solaris 10 Container over a T2000 machines (1*8 core processor), but who i can offer our clients, an SLA about concurrence capacity supported, i stimated think time in 3 seconds, and response time 3 seconds and a peak load of 60000 simultaneous sessions, this peak will occurred about 8 hours business for product launch though our internet portal server in more than 5 city of country. So, i need to define SLA simultaneous session capacity for our customers. I need some documentation guide me about it.

migueliusa at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...
# 5

There are some valuable resources at those pages below. They are useful for grizzly http connector

http://weblogs.java.net/blog/jfarcand/archive/2007/01/configuring_gri.html

http://weblogs.java.net/blog/jfarcand/archive/2007/03/configuring_gri_2.html

To enable Grizzly as the HTTP Connector, for AS 9.1

http://docs.sun.com/app/docs/doc/819-3681/6n5srlhjr?a=view#abefk

See that Grizzly is not the default, you need to enable it.

Claudio4Ja at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...