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
- Memory
- Raw disk partitions
Optimizing disk cache performance
The device partitions that are 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 that is 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 that is 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 that is used for garbage collection.
Platform-specific optimizations
The following are more suggestions for optimizing cache performance on each operating system.
AIX®
Create a single logical volume on a disk, preferably by 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 by 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 by using its raw device, /dev/rdsk/c1t3d0s0.
Windows
Create a single partition, by using the entire size of the disk. For example, on a 9 GB disk, create a 9 GB partition that is called i:. Format it and specify it as a proxy cache by device using its raw device, \\.\i:.