Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 602 #628
i
i
i
i
i
i
i
i
The question remains as to how long all the other objects stored in the
cache should stay there. To determine this, all objects in the cache are as-
signed one of various possible states. Web and proxy servers find out the
status of an object by adding headers to these objects, such as “Last mod-
ified” or “Expires” and the corresponding date. Other headers specifying
that objects must not be cached are used as well.
Objects in the cache are normally replaced, due to a lack of free hard disk
space, using algorithms such as LRU (last recently used). Basically this
means that the proxy expunges the objects that have not been requested
for the longest time.
25.3.3 System Requirements
The most important thing is to determine the maximum load the system
must bear. It is, therefore, important to pay more attention to the load
peaks, because these might be more than four times the day’s average.
When in doubt, it would be better to overestimate the system’s require-
ments, because having Squid working close to the limit of its capabilities
could lead to a severe loss in the quality of the service. The following sec-
tions point to the system factors in order of significance.
Hard Disks
Speed plays an important role in the caching process, so this factor de-
serves special attention. For hard disks, this parameter is described as ran-
dom seek time, measured in milliseconds. Because the data blocks that Squid
reads from or writes to the hard disk tend to be rather small, the seek time
of the hard disk is more important than its data throughput. For the pur-
poses of a proxy, hard disks with high rotation speeds are probably the bet-
ter choice, because they allow the read-write head to be positioned in the
required spot more quickly. Fast SCSI hard disks nowadays have a seek
time of under four milliseconds. One possibility to speed up the system is
to use a number of disks concurrently or to employ striping RAID arrays.
Size of the Disk Cache
In a small cache, the probability of a HIT (finding the requested object al-
ready located there) is small, because the cache is easily filled so the less
requested objects are replaced by newer ones. If, for example, one GB is
available for the cache and the users only surf ten MB per day, it would
take more than one hundred days to fill the cache.
602 25.3. Proxy Server: Squid