Do-It-Yourself Caching: Squid 2.3
Why Caching is Essential
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.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 2Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 3Linux Top 3: Debian Dumps SPARC, Ubuntu Takes Over Linux 3.13 and the Core Infrastructure Initiative
- 4Linux Top 3: Fedora, Ubuntu and Gluster Lose Community Leaders
- 5Red Hat Enterprise Linux 7 Finally Hits the Big Time