Network Server Accelerator HTTP PerformanceWhite Paper

Network Server Accelerator HTTP Performance
Performance Tuning
7
Performance Tuning
NSA HTTP Tuning
This section describes the NSA HTTP operating parameters that you can tune to improve performance.
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 buffer cache minimum percentage (dbc_min_pct), as
described in the System Tuning: Buffer Cache section below.
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 will remove 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).
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
The max_uri_page_size is specified in bytes. For example, the command nsahttp -m 2097152 causes NSA
HTTP to cache only web pages that contain 2MB or fewer.
System Tuning: Buffer Cache
The file system uses a portion of system memory as a buffer cache to improve file access performance by
reducing the number of disk I/O operations. The file system buffer cache and the NSA HTTP URI cache are
allocated from the same system memory pool. Therefore, the values for the file system buffer cache
parameters limit the memory available for the NSA HTTP URI cache. If you allocate too much memory for
the file system buffer cache, there may not be sufficient memory for the NSA HTTP URI cache and NSA
HTTP performance may degrade.