Sun Microsystems 820434310 User Manual

Page of 128
Buffer Length
The size (in bytes) of the buffer used by each of the request processing threads for reading the
request data from the client.
Adjust the value based on the actual request size and observe the impact on performance. In
most cases the default should suffice. If the request size is large, increase this parameter.
Keep Alive
Both HTTP 1.0 and HTTP 1.1 support the ability to send multiple requests across a single
HTTP session. A server can receive hundreds of new HTTP requests per second. If every
request was allowed to keep the connection open indefinitely, the server could become
overloaded with connections. On Unix/Linux systems, this could easily lead to a file table
overflow.
The Application Server’s Keep Alive system addresses this problem. A waiting keep alive
connection has completed processing the previous request, and is waiting for a new request to
arrive on the same connection. The server maintains a counter for the maximum number of
waiting keep-alive connections. If the server has more than the maximum waiting connections
open when a new connection waits for a keep-alive request, the server closes the oldest
connection. This algorithm limits the number of open waiting keep-alive connections.
If your system has extra CPU cycles, incrementally increase the keep alive settings and monitor
performance after each increase. When performance saturates (stops improving), then stop
increasing the settings.
The following HTTP keep alive settings affect performance:
Thread Count
Max Connections
Time Out
Keep Alive Query Mean Time
Keep Alive Query Max Sleep Time
Max Connections
Max Connections controls the number of requests that a particular client can make over a
keep-alive connection. The range is any positive integer, and the default is 256.
Adjust this value based on the number of requests a typical client makes in your application. For
best performance specify quite a large number, allowing clients to make many requests.
The number of connections specified by Max Connections is divided equally among the keep
alive threads. If Max Connections is not equally divisible by Thread Count, the server can allow
slightly more than Max Connections simultaneous keep alive connections.
HTTP Service Settings
Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 2009
66