[squid-users] squidclient mgr:info squid performance

From: benjamin fernandis <benjo11111_at_gmail.com>
Date: Fri, 16 Dec 2011 18:35:37 +0530

Hi Amos,

Sir, Thanks for your kind response.As always you share your great guidance.
> On 16/12/2011 12:51 a.m., Benjamin wrote:
>> Hi,
>>
>> what is the meaning for "Select loop called: 730321522 times, 0.117
>> ms avg"
>>
>> squidclient mgr:info
>>
>> Connection information for squid:
>> Number of clients accessing cache: 0
>> Number of HTTP requests received: 32626996
>> Number of ICP messages received: 0
>> Number of ICP messages sent: 0
>> Number of queued ICP replies: 0
>> Number of HTCP messages received: 0
>> Number of HTCP messages sent: 0
>> Request failure ratio: 0.00
>> Average HTTP requests per minute since start: 22877.7
>> Average ICP messages per minute since start: 0.0
>> Select loop called: 730321522 times, 0.117 ms avg <-----------------
>>
>> Is it showing that , squid does in/out for objects with this
>> (730321522) times. is it right perception?
> Squid has performed 730321522 tests to check for I/O events, an
> average of every 0.117ms. That is all.
> Several read/write/connect/close/DNS handling events may have happened
> on each of those checks.
>
>
>> My full output of squidclient mgr:info. Please tell me that my squid
>> is performing well or do i need to do more tuning or something?
>>
>>
>>
>> squidclient mgr:info
>> HTTP/1.0 200 OK
>> Server: squid
>> Mime-Version: 1.0
>> Date: Thu, 15 Dec 2011 11:42:25 GMT
>> Content-Type: text/plain
>> Expires: Thu, 15 Dec 2011 11:42:25 GMT
>> Last-Modified: Thu, 15 Dec 2011 11:42:25 GMT
>> X-Cache: MISS from CACHE-Engine
>> X-Cache-Lookup: MISS from CACHE-Engine:3128
>> Connection: close
>>
>> Squid Object Cache: Version 3.1.10
>> Start Time: Wed, 14 Dec 2011 11:56:16 GMT
>> Current Time: Thu, 15 Dec 2011 11:42:25 GMT
>> Connection information for squid:
>> Number of clients accessing cache: 0
>> Number of HTTP requests received: 32626996
>> Number of ICP messages received: 0
>> Number of ICP messages sent: 0
>> Number of queued ICP replies: 0
>> Number of HTCP messages received: 0
>> Number of HTCP messages sent: 0
>> Request failure ratio: 0.00
>> Average HTTP requests per minute since start: 22877.7
> Okay. 381rps aint too shabby. Highest-performance should be able to
> reach at least 950rps with a lot of fine tweaking and tuning, but of
> course that depends on the clients actually being there making request
> and relatively fast themselves.
What are the fine tweaking and tunning required from squid side and os
side to achieve more performance to get 950rps.
>> Average ICP messages per minute since start: 0.0
>> Select loop called: 730321522 times, 0.117 ms avg
>> Cache information for squid:
>> Hits as % of all requests: 5min: 33.2%, 60min: 32.1%
> Fairly good for a forward proxy. You might be able to tweak it up into
> the 40+% range. But that depends on the clients traffic to determine
> what you can do and what will work.
What do u suggest to achieve more cache hit?
>> Hits as % of bytes sent: 5min: 21.0%, 60min: 17.7%
>> Memory hits as % of hit requests: 5min: 16.0%, 60min: 16.0%
> Memory hits is where you get the most speed. You might want to see
> what is causing this to be low and see if you can tune it up a bit.
> But again, that depends on the clients traffic.
>
As we have total memory 12 GB, and firstly i assign 8gb to squid and 4
gb for OS.But many times in high load , i see that in free -mto there
was remaining free memory is very less. so then i set 2. gb for squid
and rest of for OS but in that case also at high load i can see same
less memory remaining in free -mto. i can see much ram in cached tab in
free -mto output.

Kindly suggest me to what to do with get best performance from memory
side by OS and squid way
>> Disk hits as % of hit requests: 5min: 64.4%, 60min: 64.1%
>> Storage Swap size: 304802412 KB
>> Storage Swap capacity: 77.7% used, 22.3% free
>> Storage Mem size: 2535920 KB
>> Storage Mem capacity: 100.0% used, 0.0% free
> Um. 2.5GB of RAM caching going on and ony giving you 16% hit ratio.
> This does not seem great.
>
>> Mean Object Size: 28.43 KB
>> Requests given to unlinkd: 0
>> Median Service Times (seconds) 5 min 60 min:
>> HTTP Requests (All): 0.24524 0.25890
>> Cache Misses: 0.35832 0.35832
>> Cache Hits: 0.00919 0.00919
>> Near Hits: 0.15048 0.15048
>> Not-Modified Replies: 0.00000 0.00000
>> DNS Lookups: 0.13638 0.13638
> DNS appears to be slow. ~130ms. I would hope for at least one more
> zero after the decimal point, making it under 100ms on average. But
> this may be limited by the amount of time already spent processing
> requests, so "it depends".
I configured dnsmasq for dns caching.What else i need to do to tune dns
to get more performance?
> Amos

My complete squid.conf

acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl localnet src '/etc/squid/localnet'

http_access allow manager localhost
http_access deny manager

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

#http_access deny to_localhost

http_access allow localnet
http_access allow localhost

http_access deny all

http_port 3128
http_port 3129 tproxy

# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?

# Uncomment and adjust the following to add a disk cache directory.
cache_dir aufs /c1 75776 64 512
cache_dir aufs /c2 102400 64 512
cache_dir aufs /c3 102400 64 512
cache_dir aufs /c4 102400 64 512

# Leave coredumps in the first cache dir
coredump_dir /c1

refresh_pattern -i
microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200
reload-into-ims
refresh_pattern -i
windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80%
43200 reload-into-ims
refresh_pattern -i
my.windowsupdate.website.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip)
4320 80% 43200 reload-into-ims
refresh_pattern -i \.(png|gif|jpeg|bmp|tiff|jpg|ico|tif)$ 10080 90%
43200 reload-into-ims refresh-ims
refresh_pattern -i \.(zip|rar|tar|gz|tgz|z|arj|lha|lzh)$ 10080 90%
43200 reload-into-ims refresh-ims
refresh_pattern -i \.(exe|msi)$ 10080 90% 43200 reload-into-ims
refresh-ims
refresh_pattern -i
\.(mp3|wav|mid|midi|ram|ra|mov|avi|wmv|mpg|mpeg|swf)$ 10080 90% 43200
reload-into-ims refresh-ims
refresh_pattern -i \.(pdf|ps|doc|ppt|pps)$ 10080 90% 43200
reload-into-ims refresh-ims
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

shutdown_lifetime 15 seconds
cache_mem 2500 MB

error_directory /etc/squid/errors
via off
maximum_object_size_in_memory 40 KB <-------------
maximum_object_size 400 MB <------------------
cache_swap_low 96
cache_swap_high 97
memory_replacement_policy lru
cache_replacement_policy heap LFUDA
quick_abort_min 1024 KB
quick_abort_max 2045 KB
quick_abort_pct 90
positive_dns_ttl 8 hours
negative_dns_ttl 0
ipcache_size 50000
ipcache_low 95
ipcache_high 97
fqdncache_size 25000
httpd_suppress_version_string on
visible_hostname Proxy_server
client_db off
max_filedescriptors 65000
pipeline_prefetch on

Kindly guide me to how to tune more for good cache gain and great
performance.
Does my memory cache object size and disk cache object size is perfect
or need to increase it ?

Please Suggest tunning from squid side and OS side to get better cache
gain and more performance.

Regards,
Benjamin Fernandis
Received on Fri Dec 16 2011 - 13:05:44 MST

This archive was generated by hypermail 2.2.0 : Fri Dec 16 2011 - 12:00:03 MST