[squid-users] Maximum disk cache size per worker

From: Sokvantha YOUK <sokvantha_at_gmail.com>
Date: Thu, 21 Mar 2013 15:21:01 +0700

Dear All,

I am working on distributed object cached by size to differences squid
process. My server is Centos 6 x64 bits with squid 3.3.3.
I don't know how to calculate maximum disk cache size squid can
support per process.

Below is my partition size:
#df
/dev/sdb1 206424760 65884 195873116 1% /cache1
/dev/sdd1 206424760 60704 195878296 1% /cache3
/dev/sde1 206424760 60704 195878296 1% /cache4
/dev/sdf1 206424760 60704 195878296 1% /cache5
/dev/sdg1 206424760 60704 195878296 1% /cache6
/dev/sdh1 206424760 79192 195859808 1% /cache7
/dev/sdi1 206424760 79200 195859800 1% /cache8
/dev/sdc1 206424760 60704 195878296 1% /cache2

I use 70% of partition size for squid cache_dir Mbytes size and
worker=4 so my squid.conf is:

workers 4
## 1. Handle small cache objects
cpu_affinity_map process_numbers=1,2,3,4 cores=2,4,6,8
cache_dir rock /cache1/squid 170000 max-size=31000
max-swap-rate=300 swap-timeout=300
cache_dir rock /cache2/squid 170000 max-size=31000
max-swap-rate=300 swap-timeout=300
cache_dir rock /cache3/squid 170000 max-size=31000
max-swap-rate=300 swap-timeout=300
cache_dir rock /cache4/squid 170000 max-size=31000
max-swap-rate=300 swap-timeout=300
cache_dir rock /cache5/squid 170000 max-size=31000
max-swap-rate=300 swap-timeout=300
cache_dir rock /cache6/squid 170000 max-size=31000
max-swap-rate=300 swap-timeout=300

## 2. Handle large object > 32kb < 200MB. The fourth worker handles large file
if ${process_number}=4
cache_dir aufs /cache7/squid/${process_number} 170000 16 256
min-size=31001 max-size=200000000
cache_dir aufs /cache8/squid/${process_number} 170000 16 256
min-size=31001 max-size=200000000
endif

My question is:
1. At section #2, Will the fourth workers be able to handle cache_size
larger than 300GB?
2. Section #1, worker number 1 will have 170Gbx6=1020Gb (cache dir
size)? Will it be able to handle this much cache dir size?

Kindly help to suggest me if my configuration is wrong

----
Regards,
Vantha
Received on Thu Mar 21 2013 - 08:21:09 MDT

This archive was generated by hypermail 2.2.0 : Thu Mar 21 2013 - 12:00:04 MDT