[squid-users] I redirect some http traffic to squid ( 90Mbps) and i found TIME_WAIT is 20840 and one of squid process is 57% , whether it will be fine ?

Amos Jeffries squid3 at treenet.co.nz
Tue Aug 9 15:56:08 UTC 2016


On 9/08/2016 7:31 p.m., johnzeng wrote:
> 
> 
> Hello Dear Sir
> 
> I redirect some http traffic to squid ( 90Mbps) and i found TIME_WAIT is
> 20840 and one of squid process is 57%
> 
> whether it will be normal condition ??
> 

For 3.5.2 it can be 'normal'. But normal is not necessarily good.
Several bugs that have that type of effect have been fixed since 3.5.2
was released.

If you can please upgrade to 3.5.20 ASAP, all releases before 3.5.19
have major security vulnerabilities.


> Whether we can balance cpu processing capacity
> <http://www.baidu.com/link?url=Rnht_DzfJLQPi_VnmfPjUfWfUdE4kaP1H7Vol-rTTZqKvF8npmGrx8-h947AFhU6-kqlwyWBW7W4ghqHWMs1iN1APnbkLMjrB7YI1PzephOCELHTqemcUEY1JH0mmw68>
> for full squid process !

This focussing on balanced CPUs is counter-productive. With processes
like Squid it is actually more efficient to use fewer CPUs at higher
load than more CPUs at lower load.

When one CPU core is doing a lot more of the work it means there is less
contention between cores for access to RAM resoures, less delays
incurred by UDP messaging between the Squid worker processes or waiting
for atomic locks, and the unused core(s) can possibly be put into
power-saving modes. All of which reduces latency or monetary costs.

> 
> Because we use squid 3.5.2 and use cache_dir rock part . Maybe squid
> 3.5.2 require to do automatic scheduling at full cpu core
> 
> i don't know whether i can use taskset for squid 3.5.3 as squid 2.7 ??
> 

I'm not certain but it should be possible. You have used cpu_affinity
explicitly in squid.conf, so that may alter what can be done with
taskset. Give it a try.

> ___________________________________________________________________________
> 
> PART SQUID CONFIG
> ___________________________________________________________________________
> 
> cache_mem 32172 MB
> workers 8
> cpu_affinity_map process_numbers=1,2,3,4,5,6,7,8 cores=1,3,5,7,9,11,13,15
> cache_dir rock /acapp/webcache3/storage/cossbig1/squid1 17280
> min-size=4097 max-size=262144 max-swap-rate=250 swap-timeout=350
> cache_dir rock /acapp/webcache3/storage/cosssmall1/squid1 1152
> max-size=4096 max-swap-rate=250 swap-timeout=350
> if ${process_number} = 1
> unique_hostname fast_squid${process_number}
> access_log stdio:/acapp/logs/webcache3/squid${process_number}/access.log
> squid
> cache_log /acapp/logs/webcache3/squid${process_number}/cache.log


FYI the idea behind using ${process_number} within config lines is to
avoid the need to wrap them inside the if ${process_number} config block
conditions.

Amos



More information about the squid-users mailing list