Using:
/cache_dir rock /cache1/squid 1000 max-size=3200 swap-timeout=300
max-swap-rate=100
/
I get:
/# free -m
total used free shared buffers cached
Mem: 15951 1378 14573 0 82 1055
-/+ buffers/cache: 240 15711
Swap: 4031 0 4031
/
Using:
/cache_dir rock /cache1/squid 5000 max-size=3200 swap-timeout=300
max-swap-rate=100/
I get:
/# free -mt
total used free shared buffers cached
Mem: 15951 5409 10541 0 82 5079
-/+ buffers/cache: 247 15703
Swap: 4031 0 4031
Total: 19983 5409 14573/
When squid is stopped:
/# free -mt
total used free shared buffers cached
Mem: 15951 334 15616 0 82 39
-/+ buffers/cache: 212 15738
Swap: 4031 0 4031
Total: 19983 334 19648
/
If I use aufs it won't cache the memory ram even when using hundreds of GB
for cache_dir.
My config:
/memory_pools off
# Set highwateer in memory cache limit
cache_mem 2 GB
# Maximum size of cached objects in memory
maximum_object_size_in_memory 500 KB
# Set the Cache Replacement Policy. Either retain popular small files (GDSF)
or just popular files regardless of size (LFUDA)
# Default is LRU wich is recently referenced objects.
memory_replacement_policy heap GDSF
# Enable pre-allocated memory
memory_pools_limit 1 GB
#########################################################################
#########################################################################
###
### DISK CACHE OPTIONS
###
#########################################################################
#########################################################################
# Set the Cache Replacement Policy. Either retain popular small files (GDSF)
or just popular files regardless of size (LFUDA)
# Default is LRU wich is recently referenced objects.
cache_replacement_policy heap LFUDA
# Max size of objects in cache
#maximum_object_size 100000000
# Swap low and high watermarks
cache_swap_low 90
cache_swap_high 95
/
/# squid -v
Squid Cache: Version 3.HEAD-20140127-r13248
Service Name: squid
configure options: '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
'--includedir=/usr/include' '--libdir=/usr/lib64'
'--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib'
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--exec_prefix=/usr'
'--libexecdir=/usr/lib64/squid' '--localstatedir=/var'
'--datadir=/usr/share/squid' '--sysconfdir=/etc/squid'
'--with-logdir=$(localstatedir)/log/squid'
'--with-pidfile=$(localstatedir)/run/squid.pid'
'--disable-dependency-tracking' '--enable-eui'
'--enable-follow-x-forwarded-for' '--enable-auth'
'--enable-auth-basic=DB,LDAP,NCSA,NIS,PAM,POP3,RADIUS,SASL,SMB,getpwnam'
'--enable-auth-ntlm=smb_lm,fake' '--enable-auth-digest=file,LDAP,eDirectory'
'--enable-auth-negotiate=kerberos,wrapper'
'--enable-external-acl-helpers=wbinfo_group,kerberos_ldap_group,AD_group'
'--enable-cache-digests' '--enable-cachemgr-hostname=localhost'
'--enable-delay-pools' '--enable-epoll' '--enable-icap-client'
'--enable-ident-lookups' '--enable-linux-netfilter'
'--enable-removal-policies=heap,lru' '--enable-snmp' '--enable-ssl'
'--enable-ssl-crtd' '--enable-storeio=aufs,diskd,ufs,rock' '--enable-wccpv2'
'--enable-esi' '--with-aio' '--with-default-user=squid'
'--with-filedescriptors=16384' '--with-dl' '--with-openssl'
'--with-pthreads' '--disable-arch-native'
'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu'
'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic' 'CXXFLAGS=-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC'
'PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig'
# uname -a
Linux dxb-squid34.plcs.local 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22
03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release
CentOS release 6.5 (Final)
/
-- View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/squid-rock-caching-memory-RAM-tp4666676.html Sent from the Squid - Users mailing list archive at Nabble.com.Received on Sun Jul 06 2014 - 07:40:09 MDT
This archive was generated by hypermail 2.2.0 : Sun Jul 06 2014 - 12:00:05 MDT