[squid-users] Trying to improve the Byte Hit Ratio, any tips ?

From: Vianney Lejeune <via.lej_at_free.fr>
Date: Mon, 5 Jan 2009 19:44:35 +0100

Hello,

        I'm trying to improve the Byte Hit Ratio of SquidCache on my network.
There is 220 computers in the LAN, using internet on a general usage
basis. The maximum bandwidth is 4Mbps in/out, the total amount of data
is estimated to be 30 to 60 Gbytes daily.

This is the report from cachemgr:
=>
        Average HTTP requests per minute since start: 1023.9
        Average ICP messages per minute since start: 0.0
        Select loop called: 1208577 times, 5.619 ms avg
Cache information for squid:
        Request Hit Ratios: 5min: 37.9%, 60min: 41.1%
        Byte Hit Ratios: 5min: 13.2%, 60min: 13.8% (It's quite low, these
values are usual)
        Request Memory Hit Ratios: 5min: 2.0%, 60min: 2.6% (I rebooted the
server 3 hours ago, this can explain these low values)
        Request Disk Hit Ratios: 5min: 41.3%, 60min: 36.3%
        Storage Swap size: 27654312 KB
        Storage Mem size: 190364 KB
        Mean Object Size: 29.65 KB
        Requests given to unlinkd: 33035
Median Service Times (seconds) 5 min 60 min:
        HTTP Requests (All): 0.23230 0.46965
        Cache Misses: 0.35832 0.72387
        Cache Hits: 0.19742 0.35832
        Near Hits: 0.20843 0.55240
        Not-Modified Replies: 0.03829 0.05331
        DNS Lookups: 0.00094 0.00779
        ICP Queries: 0.00000 0.00000
<=

This is my squid.conf file:
=>

http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_mem 250 MB
maximum_object_size 128 MB
maximum_object_size_in_memory 50 KB
cache_replacement_policy heap LFUDA
cache_dir ufs /data/spool/squid 30000 16 256
access_log none
cache_log none
cache_store_log none
log_ip_on_direct off
hosts_file /etc/hosts
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
quick_abort_min 0 KB
quick_abort_max 0 KB
range_offset_limit 0 KB
half_closed_clients off
shutdown_lifetime 0 seconds
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl ReseauLocal src 10.0.0.0/16
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access allow localhost
http_access allow ReseauLocal
http_access deny all
http_reply_access allow all
icp_access deny all
cache_effective_group proxy
httpd_suppress_version_string on
via off
forwarded_for off
log_icp_queries off
client_db off
coredump_dir /var/spool/squid
pipeline_prefetch off
<=

Do you see something that need to be improved ? Did I miss something?

Regards,
Mr Lejeune
Received on Mon Jan 05 2009 - 18:44:45 MST

This archive was generated by hypermail 2.2.0 : Sat Jan 10 2009 - 12:00:02 MST