High Performance Web Caching With Squid - Getting the Most From Your Hardware (
Page 2 of 3 )
Squid can easily be crippled by disks
that are not performing up to spec. Web caching is an "I/O bound" application,
meaning that it can only go as fast as it gets the data onto and off of the
storage media. So the first thing necessary is to ensure you have the right
hardware for caching.
Hard DisksYou will need to use either
7200 RPM UDMA 66 drives or fast (7200 or 10k RPM) SCSI drives. A good UDMA 66
drive with the appropriate controller can perform nearly as well as a comparable
SCSI drive for significantly less money. However, if you choose UDMA, keep in
mind that the CPU will need to be slightly faster to make up for additional
cycles used for I/O.
I've chosen for my system 2 Seagate Barracuda 13.6
GB 7200 RPM UDMA 66 hard disks. IBM and Maxtor also make excellent performing
7200 RPM drives. In my tests the Seagate edged out the Maxtor which edged out
the IBM, each by a very small margin.
ProcessorSquid in it's
default configuration, as found in a default RPM or in a standard compile, does
not need a very fast CPU to support 1 or 2 disks. However, a large performance
boost can be achieved by using a threaded version of Squid. The threads will use
a lot of CPU horsepower. So, if you are going to use threads as documented
below, consider getting a rather fast processor. A 550MHz K6-2 is what I've
chosen for my system. Something near that speed should be about right for a
single or dual disk system.
RAMIt's pretty easy to calculate
the amount of RAM needed for any given web cache. A safe number is 10MB RAM for
every 1 GB of cache space on disk. I usually allot a little more than this when
using a threaded Squid. Of course, you also need to figure out what your system
uses for other things and subtract that from the total of available RAM. For my
prototype unit I've chosen 256 MB.
Other HardwareThe other
hardware is of very little importance. Any combination of high quality
components should perform about the same in a web caching
box.