Discussion Locked

Squid does not release disk space

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I've configured a squid service, giving it 2.5 GB of HDD space in a separated partition.
My squid.conf file includes the following line:
cache_dir ufs /usr/squid/cache 256 16 256
But, after some time of use, squid reports that its allocated space is over the quota and the only way to correct the problem is increasing the quota or erasing the contents of the cache dir.
My question is:
Is there a way to configure squid to auto release the space that has not being used in tha last X days?

3 replies

by m_umair

cache_dir ufs /usr/squid/cache 256 16 256

Here 256* 16 256 *means space used under this directory by Squid is 256 MB. There is a TAG "cache_replacement_policy",The cache replacement policy parameter determines which objects are evicted (replaced)when disk space is needed.

Change your cache directory size under your Disk Quota and chose which replacement policy you need under "cache_replacement_policy" TAG. Chose one from the following.

lru: Squid's original list based LRU policy
heap GDSF: Greedy-Dual Size Frequency

heap LFUDA: Least Frequently Used with Dynamic Aging

heap LRU: LRU policy implemented using a heap

Use lru for example "cache_replacement_policy lru". The LRU policies keep recently referencedobjects.

by zeo

I found the entry in the squid.conf file after "replacement_policy".
Thanks!

This discussion is closed to new replies.