EAServer uses thread pooling rather than a thread-per-client model. Thread pooling allows more clients to connect than threads. Threads are created at server start-up, up to a specified maximum number. EAServer maintains separate thread pools for processing HTTP requests, IIOP requests, and internal processes that are not driven by client requests (services, garbage collection, and so forth). If the thread pools are too small, the server refuses client requests. If the size is too large, memory is wasted.
You can configure these properties to size thread pools:
Property |
EAServer Manager location |
Full name |
---|---|---|
HTTP threads |
Server Properties/HTTP Config, Maximum Threads |
|
IIOP threads |
Server Properties/Resources, Max Number Client Sessions |
|
Maximum threads |
Server Properties/Resources, Max Number Threads |
To determine how many HTTP threads are required, check the request pattern in the httpstat.dat file for indications of a heavily loaded server. Adjust the maximum thread setting as necessary. Ideally, this setting should be 10 – 20% more than the number of simultaneous HTTP requests that you expect to handle. (The additional threads accommodate the use of threads in Web browsers to submit simultaneous requests for images and text). A value that is too low can increase HTTP response time by causing requests to block while waiting for a thread. A value that is too high wastes available threads that could be used for other purposes.
The number of IIOP threads must be greater than or equal to the maximum number of IIOP clients that you expect. These clients include:
Standalone Java, C++, PowerBuilder, or ActiveX clients
EAServer Manager and other administrative or developer connections
Web clients that run Java applets
The rule for setting the maximum threads property is:
max threads = HTTP threads + IIOP threads + extra threads
The extra threads include those required to run internal processes that are not driven by client requests, including:
The message service. The number of threads required can be configured in thread pool properties.
Any other service components installed in the server. Allow one thread per service, or more if you configure a service to run in multiple threads.
Components for which the Instances/Bind Thread option is enabled (that is, the com.sybase.jaguar.component.bind.thread property is set to true). Add one extra thread per component instance.
The thread manager, if you use it in your application.
The garbage collector.
Typically, 50 is a sufficient number of extra threads. You may need more if you increase the number or size of the thread pools used by the message service, you run additional service components, or if you use the thread manager. You may get by with less if you do not use these features.
Copyright © 2005. Sybase Inc. All rights reserved. |