Re: some tips for cache & performance optimizations

From: Julian Anderson <Julian.Anderson@dont-contact.us>
Date: Thu, 11 Sep 1997 11:29:00 +1200

>> I'm a beginner user of squid 1.1.10, after 9 months of use i've gathered
>> some statistical info: a small 29% of tcp_hit!
>> So i need some tips on performance optimizations.
>> I'm using a linux 2.0.29, Pentium 133Mhz, 32MB (8 for squid), 100 Mb disk
>> cache (default value).
>Add more Ram and a bigger hard disk, as your storage is small (100MB) the
>data is changed too often, too much good data is flushed to make room.

Take a look at:
    http://cache.is.co.za/squid/
which has several sections on optimi[sz]ation. It's important to get
the quantity of disk and memory in balance, you can't service 4Gb of
cache disk with 8Mb of RAM.

If you want to improve your cache hit rate, there are several easy
things you can do:

 * Add more disk (and correspondingly more memory). The more objects
   you can hang on to, the more likely a requested object will be in
   cache.

 * Set the cache_swap_low to say 90, and the cache_swap_high to about
   97. The default of 75% means that you throw away 15-20% of your
   cache each time you hit the high-water mark. You should look at
   your peak transfer rates, and it's worth making sure you have a bit
   more free disk than you actually specified in cache_swap in case
   squid can't do the LRU purge quickly enough at peak time.

   If you have heaps of disk you could probably happily set the
   low-water to 95 and the high to 99, but you don't really want squid
   to go into LRU-purge mode too many times in a day.

 * Tailor your refresh patterns to suit your user's browsing habits.
   We did some analysis here about object types vs cacheability which
   suggested that images don't change as rapidly as text (the daily
   news changes quickly but the newspaper logo stays the same every
   day), so you are better to hang onto images over text. So set the
   refresh patterns for .gif and .jpg to something higher than the
   default. Remember to make Dilbert the exception :-)

We seem to float at a TCP object hit rate of around 47%, and a byte
hit rate that varies from %25 to %35.

--jules
Received on Wed Sep 10 1997 - 16:31:56 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:36:59 MST