On 14/10/2012 6:26 p.m., Ben wrote:
Hi,
Since long time I am using squid 3.1.10 and it is working fantastic.
Thanks to squid team.
But since last few days, I upgraded my version to squid 3.1.19 and
every day 2/3 times i faced strange issue.
Please try 3.1.21. Since 3.1 is now deprecated, if that release still
shows the problem, please also try 3.2.2.
Issue is that, after sometimes squid freeze, it means does not
accepting any more web traffic from network and then if I reboot
server and then squid comes in good state for a while. If that time,
instead of reboot of server, we do restart of squid process, it shows
below so many entries in cache.log and takes so much time to come up
from it.
2012/10/14 13:35:11| 29622272 entries written so far.
2012/10/14 13:35:13| 29687808 entries written so far.
2012/10/14 13:35:46| 29753344 entries written so far.
2012/10/14 13:36:32| 29818880 entries written so far.
2012/10/14 13:37:41| 29884416 entries written so far.
While these entries are coming to cache.log, same time i watch netstat
to check squid comes with port no. , But there is nothing from squid
side. So i guess that internal squid database rebuilding is happening.
It is the entire on-disk cache being re-scanned (slowly) file by file.
Because Squid restart shut down without saving the in-memory index properly.
After up gradation, my squid shows 85-90 % memory usage and CPU is
normal between 0-10 %. while squid uses 90% memory, I can see that
swap is also comes in use.
Is there any way to tune MEMORY use of squid?
Only by configuring efficient usage. There are a few leaks solved
recently. Please try the versions mentioned above to see if it is one of
those.
Total memory is 8 gb, before i set 4 gb for squid but now i set 2 gb
for squid.
Is there any command or configuration parameter in squid.conf to
improve squid restart process ( specially rebuilding activity )?
shutdown_timeout - ths shorter you set it the more shutdown operations
Squid abandons without completing. Recovery is done on next startup, BUT
like the cache scan they may take worse time overall than shutdown would
have spent - or result is user-visible page truncation/aborts.
All the other restart improvements have been implemented in 3.2 series,
not in 3.1 series.
My second server is having squid 3.1.10 and it is working awesome, no
single point of pain from it :)
Upgraded squid version : 3.1.19
OS : Centos 6.2 64 bit
BR
Ben