Do-It-Yourself Caching: Squid 2.3
Why Caching is Essential

Lisa Phifer
Tuesday, February 29, 2000 12:19:06 AM
Caching is an important function for a wide variety of Internet-related
concerns, as ISPs, educational institutions and corporations all find that it
measurably enhances system performance. There are a host of
commercial caching products on the market, but perhaps the most popular is Squid, the
open-source cache originally produced by the ARPA Harvest project and now
maintained by the National Laboratory for Applied Network Research (NLANR).
That's why you should be interested in running Squid if you're doing any
sort of Web serving. In this article, we'll explore Squid configuration and
test its capabilities under real-world circumstances.
Chances are pretty good that you already have Squid, since virtually every
Linux distribution includes Squid in both source code and a precompiled binary as contributed software.
You
can also download source code by following links from the Squid home page.
Squid can compile and run on minimal hardware, but experience shows that a
stable Squid cache requires at least 128 MB of RAM and several GB of disk
storage. Performance of course varies widely, affected by many factors: CPU,
memory, disk, Squid configuration and kernel tuning.
We first ran Squid on a Pentium 133 with 64 MB of RAM, but could not achieve
long-term stability. We had no problem running Squid on a Pentium III 500 with
128 MB RAM and 20 GB disk, with only 4 GB allocated to cache storage.
Of course, we were only shooting for a stable eval platform, not
production-quality performance. The first IRCACHE Bakeoff found Squid to max
out at 100 requests per second on a PII 333 with 256 MB of RAM and 30 GB
storage. We evaluated a newer version of Squid (2.3.STABLE1) but made no
attempt to measure its performance.
Off-the-shelf Squid lacks the custom file system, optimized kernel, tuned
protocol stack and redundant hardware support provided by commercial cache
products. If you plan to deploy Squid, you'll want to start with fast, robust
hardware and tweak your config to get the most out of this open-source
solution. Plenty of physical memory and Fast or Ultra Wide SCSI disks are
highly recommended.
Next: Software Installation »