| United States-English |
|
|
|
![]() |
Network Server Accelerator HTTP PerformanceWhite Paper > Chapter 1 Network
Server Accelerator HTTP PerformancePerformance 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 TimeoutNSA 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 SizeNSA 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. 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.Conversely, if you allocate too much memory for the NSA HTTP URI cache, there may not be sufficient memory for the file system buffer cache. This may cause file system performance to degrade, including performance for sendfile() operations. The sendfile() routine transmits files over a network connection directly from the file system buffer cache. Some web servers use sendfile() to service static content requests. Insufficient memory for the file system buffer cache will degrade performance when using sendfile() to service requests for non-cacheable static content. Therefore, a fine balance must be made between the file system buffer cache size and the NSA HTTP URI cache size to get the best performance. The file system buffer cache can be tuned by editing /stand/system or using the kmtune command and modifying the following variables: dbc_min_pct dbc_max_pct If the NSA HTTP maximum cache size plus the value for the minimum file system buffer cache percentage (dbc_min_pct) is greater than 100, it is possible for all of the system memory to be used by the NSA HTTP and file system caches. This will cause system performance to degrade. A typical configuration is as follows: dbc_max_pct 30 dbc_min_pct 30 NSA HTTP URI cache max percentage: 50. |
||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||