Sambar Server Documentation

Performance


The Sambar Server has several performance enhancing features that can be enabled or disabled to suite the needs of your site. This document outlines several performance tuning techniques.

Content Caching
The server provides an internal File cache mechanism which can be used to increase performance dramatically. The config/config.ini parameters affecting the file cache are:

The System Administration interface provides cache statistics to assist with tuning the cache hit performance. For maximum performance, configure the File Cache Size large enough to serve all files out of memory file cache memory. Alternatively, set the Maximum Cached File to the largest asp file in the /sysuser (rougly 20KB) to ensure that all ASP files and corresponding execution trees are cached; this will speed up scripting performance significantly.

The stat cache caches the results of recent stat() system calls. Virtually all web server requests cause the server to stat() at least one file (and often many) depending on the configuration settings. This adversely affects performance and is often unnecessary, as the same files or directories are queried repeatedly and usually return the same status. The stat cache amortizes the cost of these file system operations over many requests and improves performance, at the cost of using more memory and adding delay between the time a file changes and the time the server notices (this period is configurable: Cache Stat Interval).

DNS Caching
The DNS cache caches the results of recent gethostbyname() system calls. The proxy server in particular makes significant use of this call when routing proxy requests. DNS lookups that result from the gethostbyname call can adversely affect system performance. It is recommended that a gethostbyname() interval of 3600 (1 hour) be configured for active proxy servers.

Mail Server MTA
The mail server can utilize more than one "router" (mail transport agent) to deliver mail. By increasing the Mail MTA Routers in the [mail] section of the config/mail.ini file, the server will spawn additional delivery daemons to increase mail throughput.

Versioning
When WebDAV is enabled and Content Versioning is used, the .DAV directory includes a compressed (gzip) version of all files stored under the version control system. The server takes advantage of this when returning static pages to clients by returning the compressed file rather than the uncompressed file if the user's browser accepts gzip encodings (IE 4.0+ and Netscape 4.0+). This can significantly improve server performance and speed delivery by reducing the amount of data transfered. Benchmarks indicate an average improvement of 30% for HTML content.

Compress Content
The idea behind content compression is to compress data being sent out from the web server, and have the browser decompress the data on the fly, thus reducing the amount of data send and increasing the page display speed. Since smaller amounts of data (fewer packets) are being sent, they consume less bandwidth and the complete page arrives faster. (The ability to uncompress data as it is received from the server has been built into most browsers since 1998.)

The config/config.ini file contains a boolean parameter Compress Content that, if enabled, instructs the server to compress all dynamic content and content with a mime type of text* being returned from the server if the user's browser accepts gzip encodings (IE 4.0+ and Netscape 4.0+). This feature differs from the Versioning enhancement described above in that real-time gzip compression is performed on dynamic content (content from shtml, stm, servlets, cgi-bin etc.) In general, internet servers or servers delivering content across a WAN should enable content compression; servers utilized for intranets only will see little benefit unless bandwidth is limited. In addition, content compression can be enabled for specific mime types via .htaccess rules.

Real-Time Performance Monitor
A real-time performance monitor is available for analyzing the performance of various server elements (connection pools, HTTP requests, CGI commands, etc.) Enabling this element (via Trace Performance = true in the [common] section of the config/config.ini file) results in a minor performance impact on the server (i.e. calls to time() and a cron task to cleanup the real-time cache each hour), but this can be a valuable tool for guaging performance. When enabled, the performance metrics can be accessed from the left side of the System Administration forms.

© 2000 Sambar Technologies. All rights reserved. Terms of Use.