Editing Performance Settings

This section describes specific adjustments you can make that may improve Sun Java System Web Server 7.0 performance.

As you tune your server it is important to remember that your specific environment is unique. The impacts of the suggestions provided in this section will vary, depending on your specific environment. Ultimately you must rely on your own judgement and observations to select the adjustments that are best for you.

Editing HTTP Performance Settings

For configuring the HTTP settings, click Configurations > Configuration Name > Performance > HTTP. The following tables describes the HTTP settings.

Table 10 Field Description > General Settings

Field

Default

Description

Request Header Buffer Size

8192 bytes

This parameter instructs the server to process HTTP requests only when the header size is less than or equal to the provided value.

Allowing large headers might hit the server's performance.

Reject Malformed Request Headers

Disabled

Reject malformed HTTP requests and responses that conflict with the HTTP specifications.

This parameter is disabled by default. If enabled, the server will check for malformed request headers.

Maximum Request Headers

64 bytes

Maximum size of the HTTP request headers allowed for processing requests.

Responses Buffer Size

8192 bytes

Limit the server's HTTP response buffer size. For more information on controlling this parameter, see Performance Tuning Guide.

Maximum Unchunk Size

8192 bytes

Maximum size (in bytes) of a chunked HTTP request body the server will unchunk. The range of values can be between 0-214704836470.

Unchunk Timeout

60 seconds

Maximum time (in seconds) the server will spend waiting for a chunked HTTP request body to arrive. The range of values can be between 0 - 3600 or -1 for no timeout.

I/O Timeout

30 seconds

Maximum time (in seconds) server will wait for an individual packet. The range of values can be between 0-3600 or -1 for no timeout.

Request Body Timeout

-1 seconds

Maximum time (in seconds) server will wait for the complete HTTP request body. The range of values can be between 0-604800 or -1 for no timeout.

Request Header Timeout

-1 seconds

Maximum time (in seconds) server will wait for the complete HTTP request header. The range of values can be between 0-604800 or -1 for no timeout.

Table 11 Field Description > Thread Pool Settings

Field

Default

Description

Thread Pool

Enabled

Thread Pool is enabled by default.

Maximum Threads

Default

This parameter determines the maximum number of threads in the thread pool. A higher value allows more requests to execute concurrently, but has more overhead due to context switching, so bigger is not always better. Typically, you need not to increase this number, but if you are not saturating your CPU and you are seeing requests queue up, then you should increase this number.

Minimum Threads

Default

This parameter determines the minimum number of threads in the thread pool.

Stack Size

13107.02

This parameter determines the stack size in bytes of each thread in the thread pool.

Queue Size

1024

This parameter determines the number of threads that can wait in the queue for the thread pool. If all threads in the pool are busy, then the next request-handling thread that needs to use a thread in the native pool must wait in the queue.

If the queue is full, the next request-handling thread that tries to get in the queue is rejected, with the result that it returns a busy response to the client. It is then free to handle another incoming request instead of being tied up waiting in the queue.

Table 12 Field Description > Keep Alive Settings

Field

Default

Description

Keep Alive

Enabled

The keep-alive (or HTTP/1.1 persistent connection handling) subsystem in Sun Java System Web Server 7.0 is designed to be massively scalable. The out-of-the-box configuration can be less than optimal if the workload is non-persistent (that is, HTTP/1.0 without the KeepAlive header), or for a lightly loaded system that's primarily servicing keep-alive connections.

Threads

Default

This parameter determines the number of threads in the keep-alive subsystem. It is recommended that this number be a small multiple of the number of processors on the system (for example, a 2 CPU system should have 2 or 4 keep-alive threads).

Maximum Connections

Default

This parameter controls the maximum number of keep-alive connections the web server can maintain at any time. The range is 1 to 1048576

Timeout

30 seconds

This parameter determines the maximum time (in seconds) that the server holds open an HTTP keep-alive connection or a persistent connection between the client and the server. The default is 30 seconds. The connection will timeout if idle for more than 30 seconds. The maximum is 300 seconds (5 minutes).

Poll Interval

0.001 seconds

Time period after which the server polling starts.

Editing DNS Settings

For configuring the DNS settings, click Configurations > Configuration Name > Performance > DNS. The following tables describes the common DNS settings that might affect Sun Java System Web Server 7.0 performance.

Table 13 Field Description > DNS Settings

Field

Default

Description

DNS Lookups

Disabled

Whether the server does DNS lookups. The default value is false.

Asynchronous DNS

Disabled

Whether the server uses its own asynchronous DNS resolver instead of the operating system's synchronous resolver. The default value is true.

Timeout

12 seconds

Timeout (in seconds) for asynchronous DNS lookups. The range of values can be between 0.001 - 3600.

DNS Cache

Enabled

The DNS cache caches IP addresses and DNS names. Your server's DNS cache is enabled by default.

Maximum Cache Size

1024 entries

The maximum number of cache entries allowed by the server. A single cache entry represents a single IP address or DNS name lookup. The cache should be as large as the maximum number of clients that will access your web site concurrently.

Note that setting the cache size too high will waste memory and degrade performance.

Cache Expiry Time

120 seconds

The time after which the DNS entries expire. Fresh lookups happen after this expiry time.

Editing SSL and TLS Settings

For configuring the SSL and TLS settings, click Configurations > Configuration Name > Performance > SSL and TLS. The following tables describes the SSL and TLS settings that might affect Sun Java System Web Server 7.0 performance.

Table 14 Field Description > SSL and TLS Settings

Field

Default

Description

SSL Cache

Enabled

Whether the server caches SSL/TLS sessions. The default value is true.

Maximum Cache Size

10000 entries

Maximum number of SSL/TLS sessions the server will cache. The range of value is 1 to 524288.

SSL2 Session Age

100 seconds

Maximum amount of time to cache an SSL2 session. The range of value is 5 to 100.

SSL3/TLS Session age

86400 seconds

Maximum amount of time to cache an SSL3/TLS session. The range of value is 5 to 86400.

Editing Cache Settings

For configuring the Cache settings, click Configurations > Configuration Name > Performance > Cache. The following tables describes the cache settings that might affect Sun Java System Web Server 7.0 performance.

Table 15 Field Description > Cache Settings

Field

Default

Description

Cache File Content

Enabled

The file cache is turned on by default. For more information about settings, see the Administrator's Configuration File Reference.

Use sendfile

Disabled

When you enable this option, the server caches open file descriptors for files in the file cache, rather than the file contents, and PR_TransmitFile is used to send the file contents to a client. When this option is enabled, the distinction normally made by the file cache between small, medium, and large files no longer applies, since only the open file descriptor is being cached.

By default, this option is enabled on Windows, and disabled on UNIX. On UNIX, only enable this option for platforms that have native OS support for PR_TransmitFile, which currently includes HP-UX and AIX. It is not recommended for other UNIX/Linux platforms.

Maximum Age

30 seconds

This setting controls how long cached information will continue to be used once a file has been cached. An entry older than the specified value is replaced by a new entry for the same file, if the same file is referenced through the cache.

Set the maximum age based on whether the content is updated (existing files are modified) on a regular schedule. For example, if content is updated four times a day at regular intervals, you could set the maximum age to 3600 seconds. Otherwise, consider setting the maximum age to the longest time you are willing to serve the previous version of a content file after the file has been modified.

Maximum amount of time (in seconds) to cache file content and/or meta information. The range of values can be between 0.001 to 3600.

Maximum Entries

1024 entries

Maximum number of paths for which to cache content and/or meta information. The range of values can be between 1 to 10485706.

Maximum Open Files

Default

Maximum number of file descriptors the file cache will keep open. The range of values can be between 1 to 1073741824.

Copy Files to Dir

Disabled

Whether the server copies cached files to a temporary directory. The default value is true on Windows and false on other platforms.

Directory Path

-

Temporary directory used when copy-files is true. Absolute path or path relative to the server config directory.

Replacement Algorithm

LRU

Cache entry replacement algorithm. The values can be None, LRU, or LFU.

Cache File Content

Enabled

Whether the server caches file content. The default value is true.

Maximum Heap File Size

524288 bytes

Maximum size (in bytes) of files to cache on the heap. The range of values can be between 0 and 2147483647.

Maximum Heap Space Size

104857060 bytes

Maximum amount (in bytes) of heap to use for caching files. The range of values can be between 0 and 9223372036854775807.

Maximum Memory Map File Size

0 byte

Maximum size (in bytes) of files to memory map. The range of values can be between 0 and 2147483647.

Maximum Memory Map Address Space

0 byte

Maximum amount (in bytes) of memory map address space to use for caching files. The range of values can be between 0 and 9223372036854775807.

Cache ACL Authentication

Enabled

The ACL user cache is on by default. Because of the default size of the cache (200 entries), the ACL user cache can be a bottleneck, or can simply not serve its purpose on a site with heavy traffic. On a busy site, more than 200 users can hit ACL-protected resources in less time than the lifetime of the cache entries. When this situation occurs, the server must query the LDAP server more often to validate users, which impacts performance.

Maximum Users

200

Set this directive to a number that determines the number of users (default is 200).

Maximum Groups

4

Set this directive to a number that determines how many group IDs can be cached for a single UID/cache entry (default is 4).

Cache Timeout

120 seconds

Set this directive to a number that determines the number of seconds before the cache entries expire. Each time an entry in the cache is referenced, its age is calculated and checked against the specified seconds. The entry is not used if its age is greater than or equal to the specified seconds.

The default value is 120 seconds. If this value is set to 0, the cache is turned off. If you use a large number for this value, you may need to restart the server when you make changes to the LDAP entries. For example, if this value is set to 120 seconds, the server might be out of sync with the LDAP server for as long as two minutes. If your LDAP is not likely to change often, use a large number.

Editing CGI Settings

For configuring the CGI settings, click Configurations > Configuration Name > Performance > CGI. The following tables describes the CGI settings that might affect Sun Java System Web Server 7.0 performance.

Table 16 Field Description > CGI Settings

Field

Default

Description

CGI Timeout

-1

Timeout (in seconds) after which the server will terminate a long-running CGI program. The value range is 0.001-3600, or -1 for no timeout.

CGI Idle Timeout

300

Timeout (in seconds) after which the server will terminate a nonresponsive CGI program. The value range is 0.001-3600.

CGI Stub Timeout

30

Timeout (in seconds) after which an unused Cgistub process may be terminated. The value range is 0.001-3600.

CGI Stub Executable

Default

Path to custom CGI stub executable.

Minimum Stubs Size

0

Minimum number of Cgistub processes the server will keep on hand, waiting to run CGI programs. The value range is 0-4096.

Maximum Stubs Size

16

Maximum number of Cgistub processes the server will keep on hand, waiting to run CGI programs. The value range is 1-4096.

Editing Access Log Buffer Settings

For configuring the Access Log Buffer settings, click Configurations > Configuration Name > Performance > Access Log Buffer. The following tables describes the access log buffer settings that might affect Sun Java System Web Server 7.0 performance.

Table 17 Field Description > Access Log Buffer Settings

Field

Default

Description

Buffer Log Updates

Enabled

Whether the system buffers access log updates. The default value is true.

Buffer Size

8192 bytes

Size (in bytes) of individual access log buffers. The range of value is 4096 to 10485706.

Maximum Buffers/Server

Default

Maximum number of access log buffers per server. The range of value is 1 to 65536.

Maximum Buffers/File

8

Maximum number of access log buffers per access log file. The range of value is 1 to 128.

Maximum Age

1 second

Maximum amount of time to buffer a given access log entry. The range of value is 0.001 to 3600.