HP-UX TCP/IP Performance White Paper, March 2008

19
4.2.1.1.2 Multiple Web Servers with Partitioned Content
High-traffic Web sites typically feature multiple servers that are dedicated for specific purposes. A given set
of servers, for example, may serve specific content such as images, advertisements, audio, or video.
Dedicating servers to specific content types limits the total working set that must be delivered by any single
server and allows the server's hardware configuration to be tailored to its content. One common approach
to partitioning content is to separate static and dynamic content. Servicing static content requests typically
requires more I/O bandwidth and memory than servicing dynamic content; servicing dynamic content
requests typically requires greater CPU capacity.
A second typical usage scenario, usually associated with very-high-traffic Web sites, is to deploy NSA HTTP
on multiple web servers dedicated to serving static content, with a load balancer and/or web switch that
routes user requests to the appropriate server. This approach is typically viable when the content of a site
has already been manually partitioned among a set of specialized servers.
4.2.1.2 Tuning Recommendations
This section describes the NSA HTTP operating parameters that you can tune to improve performance.
4.2.1.2.1 Maximum NSA HTTP Cache Percentage (max cache percentage)
The maximum NSA HTTP URI (Uniform Resource Identifier, a term that encompasses URL) cache size is
configured as a percentage of system memory. You can set the value for this parameter by editing
/etc/rc.config.d/nsahttpconf or by using the nsahttp(1) command:
# nsahttp -C max_cache_percentage
By default, max_cache_percentage is 50 (50% of system memory). You should set the value for
max_cache_percentage in conjunction with the system file cache settings (see filecache_max(5)
for 11i v3, and dbc_min_pct(5) for 11i v1 and 11i v2). See sendfile() in section 5.1 of this
document for additional information on file cache settings, as sendfile caching is done directly in the file
cache, separately from caching done by NSA HTTP.
4.2.1.2.2 Cache Entry Timeout
NSA HTTP has a URI cache entry timeout value. If an entry is not accessed for a period longer than the
timeout value, NSA may re-use (write over) the entry. For best performance, an optimal value for the timeout
value must be found. If it is too high, the cache may contain many stale entries. If it is too low, there may be
excessive cache entry timeouts and increased cache misses. You can set the cache timeout by editing
/etc/rc.config.d/nsahttpconf or by using the following nsahttp command:
# nsahttp -e cache_timeout
The cache_timeout value is set in seconds. For example, the command nsahttp -e 7200 sets the
cache entry timeout to 7200 seconds (two hours).
4.2.1.2.3 Maximum URI Page Size
NSA HTTP allows you to limit the maximum size of each of the URI objects (web pages) stored in the cache.
You can tune this value to optimize the cache usage. You can set the maximum URI page size by editing
/etc/rc.config.d/nsahttpconf or by using with the following nsahttp command:
# nsahttp -m max_uri_page_size