[squid-users] squid bandwidth saving optimization for specific sites

Ahmd ahmed.zaeem at netstream.ps
Tue Sep 30 14:28:59 UTC 2014


Hi eleizer,
Here is sample of them :
=====================================================

and there are more websites .....

can u help me with refresh pattern config ?

here is my current squid config :

=================
[root at squidsmp ~]# cat /etc/squid/squid.conf
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
acl mysubnet src vvvvvvvvvv
acl vvvvv src vvvvv
acl localip     src     vvvvvvv
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
######################################################
# Recommended minimum Access Permission configuration:
# Deny requests to certain unsafe ports
###########################################################
######Dening feezed ips and redirect them to page payment######
######################################################
acl localnetx src 10.11.0.0/16 10.12.0.0/16 
acl localnety dst  192.168.70.2/32
http_access allow localnetx localnety
http_access deny localnetx
deny_info http://192.168.70.2:9090/pay/payment localnetx
##############################################################
http_access allow vvvvv
http_access allow manager vvvvv
http_access deny !Safe_ports
http_access allow localnet
# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
#######################################################
###########SMP oPTIONS#####################
dns_v4_first on 
# 3 workers, using worker #1 as the frontend is important
workers 2

visible_hostname vvvvv
####################################################
####Filterring##############
acl blockkeywords dstdomain "/etc/squid/koko.acl"
http_access deny blockkeywords
#################################################
##Regix filtering##########
acl xacl dstdom_regex "/etc/squid/squid-regex.acl"
http_access deny xacl
##############################
cache_log /var/log/squid/cache.log
#access_log stdio:/var/log/squid/access.log
access_log /var/log/squid/access.log 
############################################### 
http_port vvv:65000
http_port vvvv:3129 tproxy
############################################################################
http_access allow mysubnet
############################################################################################
cache_mgr vvv        
cachemgr_passwd vv
#######################################################
# add user authentication and similar options here
http_access allow manager localhost
http_access allow manager localip
http_access allow manager mysubnet
http_access allow mysubnet manager
http_access deny manager
#######################################################################
#cache_mem 1500 M
cache_mem 20000 MB
#cache_mem 1000 MB 
# ^^ per process mem size.
################################################
#maximum_object_size_in_memory 64 KB

maximum_object_size 20 MB
maximum_object_size_in_memory 20 MB
#minimum_object_size 0 KB
##################################################
# the frontend requires a different name to the backend
#######################################################################
cache_swap_low 90
cache_swap_high 95
###########################################################

#########################################################
quick_abort_pct 95
fqdncache_size 65535
ipcache_size 65535
###########################################################
ipcache_low 98
ipcache_high 99
#####################################################
########### WCCP2 Config#############
wccp2_router vvvvvvv
wccp2_rebuild_wait off   
wccp_version 2
wccp2_forwarding_method 2
wccp2_return_method 2
wccp2_assignment_method 2
wccp2_service dynamic 80
wccp2_service_info 80 protocol=tcp flags=src_ip_hash priority=250 ports=80
wccp2_service dynamic 90
wccp2_service_info 90 protocol=tcp flags=dst_ip_hash,ports_source priority=250 ports=80
######################################################
cache_effective_user squid
cache_effective_group squid
#######################################################
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
#####################################################
dns_nameservers vvvvvvvv
# better used with local only!!
#dns_nameservers 8.8.8.8
####################################################### 
http_access deny all
##############################
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
####################################################
####Slow after sometime tshooting############
memory_pools off 
###########################################
#server_persistent_connections on
#client_persistent_connections on
# Defaults for ^^ are on
pconn_timeout 2 minutes
persistent_request_timeout 1 minute 
read_ahead_gap 128 KB
#this ^^ gives the clients a for the download of the page
# it is not recommended to use it by default settings but if you would like to try it's worth.
###############################################
#####rotating logs#####
logfile_rotate 0
###########################################################################
max_filedescriptors 131072
======================



[root at squidsmp ~]# squid -v
Squid Cache: Version 3.4.7
configure options:  '--build=i486-linux-gnu' '--prefix=/usr' '--includedir=/include' '--mandir=/share/man' '--infodir=/share/info' '--sysconfdir=/etc' '--enable-cachemgr-hostname=drx' '--localstatedir=/var' '--libexecdir=/lib/squid' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--srcdir=.' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid' '--mandir=/usr/share/man' '--enable-inline' '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd,rock' '--enable-removal-policies=lru,heap' '--enable-delay-pools' '--enable-cache-digests' '--enable-underscores' '--enable-icap-client' '--enable-follow-x-forwarded-for' '--enable-auth' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,DB,POP3,getpwnam,squid_radius_auth,multi-domain-NTLM' '--enable-ntlm-auth-helpers=smb_lm' '--enable-digest-auth-helpers=ldap,password' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-arp-acl' '--enable-esi' '--disable-translation' '--with-logdir=/var/log/squid' '--with-pidfile=/var/run/squid.pid' '--with-filedescriptors=131072' '--with-large-files' '--with-default-user=squid' '--enable-linux-netfilter' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2 -g -Wall -O2' 'LDFLAGS=' 'CPPFLAGS=' 'CXXFLAGS=-g -O2 -g -Wall -O2' '--enable-ltdl-convenience'







-----Original Message-----
From: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] On Behalf Of Eliezer Croitoru
Sent: Monday, September 29, 2014 11:27 PM
To: squid-users at lists.squid-cache.org
Subject: Re: [squid-users] squid bandwidth saving optimization for specific sites

It really depends on the site.
If the site do not support caching since the content cannot be cached 
(dynamic) you probably cannot cache it.
If the site supports cache you can try to modify the refresh_pattern to 
tweak couple things about the traffic.

Can you share the website name?

Eliezer

On 09/29/2014 10:00 PM, Ahmd wrote:
> Hi Guys ,
>
> I have found that 60 % of my uses open about 4 common sites every day
> and  we can say that they are visited so much.
>
> I began to think in a method to let squid to save the entire website
> since it has a lot of visits.
>
> Again  , here I want to save bandwidth as I can since the visits is a
> lot on these sites.
>
> I need a best practice for squid config that may help me.
>
> Any ideas ?
>
> regards
>
>
>
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>

_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users




More information about the squid-users mailing list