Sun Java System Web Server 7.0 Update 7 Performance Tuning, Sizing, and Scaling Guide

Tuning of File Descriptors

Web Server 7.0 uses a algorithm to divide file descriptors to various needs on unix systems.

Here is the list of items which require file descriptors:

  1. Web Applications.

    Web Server leaves 80% file descriptors for web applications.

  2. Daemon session threads connections.

    For each daemon session thread Web Server 7.0 expects a average of 4 file descriptors. One client socket connection, requested file, an included file and a backend connection.

  3. jdbc pools.

  4. Access log counts for all virtual servers.

  5. Listener counts.

  6. File descriptors for file cache.

  7. Keep alive file descriptors.

  8. Thread pool queue size.

In above list (6), (7) and (8) are auto tuned which means that if user specifies them in server.xml, it uses those, otherwise it divides the remaining or available file descriptors to (6), (7) and (8). Available file descriptors = Total descriptors - item (1) to (5)

If available file descriptors are more than 1024 then Web Server uses 1:16:16 ratio for item (6),(7),(8). If available file descriptors are less than 1024 then it uses 1:16:8 ratio. File cache is given the least importance and keep alive is given the highest importance. It also rounds of the number to the power of 2.

Note that Web Server doesn't uses above algorithm for Windows systems. On Windows it uses 64K descriptors for keep alive, 16K descriptors for thread pool queue size.