Pages

Recommended cache_mem Size for Squid Proxy Server

OPTIONS WHICH AFFECT THE CACHE SIZE

Tags under this section deals with cache memory configurations like cache memory size, swap size, maximum and minimum object

size, cache and memory replacement policies.

TAG NAME cache_mem

Description


cache_mem defines the ideal amount of memory to be used for In-Transit objects, Hot Objects, Negative-

Cached

objects

Build Option Default

Usage cache_mem size

Default cache_mem 8 MB

Recommended Cache_mem Size

1/4 of Ram Size, like if you have a 1gb ram of your squid caching server then cache_mem will be 256mb

Synopsis

Data for these objects are stored in 4 KB blocks. This parameter specifies the ideal upper limit on the total size of 4 KB blocks

allocated.

In-transit objects have priority over the others. When additional space is needed for incoming data, Negative-cached and Hot objects

will be released. In other words, the negative-cached and hot objects will fill up any unused space not needed for In-transit objects.

If circumstances require, this limit will be exceeded. Specifically, if your incoming request rate requires more than cache_mem of

memory to hold In-transit objects, Squid will exceed this limit to satisfy the new requests. When the load decreases, blocks will be

freed until the high-water mark is reached. Thereafter, blocks will be used to store hot objects.

Note: This tag does not specify the maximum process size. It places a limit on one aspect of squid's memory usage. Squid uses

memory for other things as well. Process will probably become twice or three times bigger than the value put here.

Arguments

size Cache memory size

Example(s)

cache_mem 32 MB

Forex Trading