Tuning the proxy server cache

When caching is enabled, the speed of cache storage devices is critical to Caching Proxy performance. This section gives suggestions on choosing a type of cache storage and configuring your cache storage devices for best performance.

Choosing the cache storage media

Caching Proxy can use two different types of cache storage media:

A memory cache provides the fastest file retrieval, but the size of a memory cache is limited by the amount of available memory on the proxy server machine. A disk cache, made up of one or more raw disk partitions, is slower than a memory cache but allows larger cache sizes in most cases.

Optimizing disk cache performance

The device partitions used for disk caching need to be dedicated to the cache; that is, do not use these physical disks to contain any other file systems, and do not use them for any purpose other than storing the proxy cache. Additionally, do not use data compression on any disk used for the proxy cache because it reduces performance.

Each cache storage device (whether a disk or a file) incurs memory overhead on the proxy server. In general, using an entire physical disk as a single cache device yields the best performance. Using RAID or other mechanisms to combine multiple physical disks into a single logical disk can be counterproductive. If you want to use multiple disks, specify them as multiple cache devices by using the Cache Settings configuration form or by editing the CacheDev directive in the proxy configuration file. This method allows the proxy server to control the parallelism of reading and writing to multiple disks, and does not rely on the performance of the operating system or a disk subsystem.

Cache garbage collection

Cache garbage collection for the proxy server discards expired files from the cache, freeing space to cache files for new requests. Garbage collection is triggered automatically when the amount of used space in the cache reaches an administrator-specified limit called the high water mark and continues until the amount of used space reaches a low water mark.

Because the garbage collection routine uses minimal CPU resources and does not affect the availability of unexpired cached material, configuring garbage collection to run at specific times is not necessary.

To improve the performance of garbage collection, you can set the high water mark and low water mark. You can also configure the type of algorithm used for garbage collection. See Garbage collection for more information on modifying garbage collection.

Platform-specific optimizations

The following are additional suggestions for optimizing cache performance on each platform.

AIX

Create a single logical volume on a disk, preferably using all the physical partitions (PPs) available. For example, given a 9-GB disk, create a 9-GB logical volume called cpcache1. Format it and specify it as a proxy cache device using its raw logical volume, /dev/rcpcache1.

HP-UX and Solaris

On your cache device, create a single partition (or slice) that uses the entire size of the disk. For example, on a 9-GB disk, create a 9-GB partition called c1t3d0s0. Format it and specify it as a proxy cache device using its raw device, /dev/rdsk/c1t3d0s0.

Windows

Create a single partition, using the entire size of the disk. For example, on a 9-GB disk, create a 9-GB partition called i:. Format it and specify it as a proxy cache device using its raw device, \\.\i:.

Information on configuring the proxy server's cache and on formatting and specifying cache devices is included in Configuring proxy server caching.