Re: [squid-users] Delay pools

From: Awie <awie@dont-contact.us>
Date: Tue, 29 Apr 2003 11:41:09 +0800

Finally..... I am still confuse about the number.

Below a sample for delay_parameter, but I don't know how to do a
calculation.

#The numbers here are values in bytes;
#we must remember that Squid doesn't consider start/stop bits
#5000/150000 are values for the whole network
#5000/120000 are values for the single IP
#after downloaded files exceed about 150000 bytes,
#(or even twice or three times as much)
#they will continue to download at about 5000 bytes/s
delay_parameters 2 5000/150000 5000/120000

Please kindly explain me the delay_parameters. Thanks for your help

Rgds,

Awie

#####DELAY POOLS
#This is the most important part for shaping incoming traffic with Squid
#For detailed description see squid.conf file or docs at
http://www.squid-cache.org
#We don't want to limit downloads on our local network.
acl magic_words1 url_regex -i 192.168
#We want to limit downloads of these type of files
#Put this all in one line
acl magic_words2 url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip .rar
.avi .mpeg .mpe .ram .rm .iso .raw .wav .mov
#We don't block .html, .gif, .jpg and similar files, because they
#generally don't consume much bandwidth
#We want to limit bandwidth during the day, and allow
#full bandwidth during the night
#Caution! with the acl below your downloads are likely to break
#at 23:59. Read the FAQ in this bandwidth if you want to avoid it.
acl day time 09:00-23:59
#We have two different delay_pools
#View Squid documentation to get familiar
#with delay_pools and delay_class.
delay_pools 2
#First delay pool
#We don't want to delay our local traffic.
#There are three pool classes; here we will deal only with the second.
#First delay class (1) of second type (2).
delay_class 1 2
#-1/-1 mean that there are no limits.
delay_parameters 1 -1/-1 -1/-1
#magic_words1: 192.168 we have set before
delay_access 1 allow magic_words1
#Second delay pool.
#we want to delay downloading files mentioned in magic_words2.
#Second delay class (2) of second type (2).
delay_class 2 2
#The numbers here are values in bytes;
#we must remember that Squid doesn't consider start/stop bits
#5000/150000 are values for the whole network
#5000/120000 are values for the single IP
#after downloaded files exceed about 150000 bytes,
#(or even twice or three times as much)
#they will continue to download at about 5000 bytes/s
delay_parameters 2 5000/150000 5000/120000
#We have set day to 09:00-23:59 before.
delay_access 2 allow day
delay_access 2 deny !day
delay_access 2 allow magic_words2

----- Original Message -----
From: "Henrik Nordstrom" <hno@squid-cache.org>
To: "Awie" <awie@eksadata.com>
Cc: "Squid-users" <squid-users@squid-cache.org>
Sent: Monday, April 28, 2003 7:18 PM
Subject: Re: [squid-users] Delay pools

> sön 2003-04-27 klockan 08.29 skrev Awie:
>
> > In my case, I want to limit the access ;
> >
> > User A = max. 2 Kbytes
> > User B = max. 2 Kbytes
> > User C = max. 2 Kbytes
> >
> > Total Network = max. 4 Kbytes
> >
> > 1. How can I calculate the delay_parameters ?
>
> By making a delay pool parameter with the corresponding refill rates for
> per user and aggregate network limits.
>
> If you should use a delay class 2 or class 3 depends primarily on the
> size of your network. If all your users are in a "class-C" network then
> a pool of class 2 is suitable.
>
> For better browsing experience you want a somewhat larger pool size.
>
> Note: The aggregate limit should probably have a pool size equal to the
> refill rate.
>
> > 2. If the max. of total network has reached (4 Kbytes), then all users
will
> > get 4 Kbytes / 3 users. Can I do this?
>
> Squid automatically tries to do this if you have a aggregate network
> limit and the limit is reached.
>
> Regards
> Henrik
>
>
> --
> Donations welcome if you consider my Free Squid support helpful.
> https://www.paypal.com/xclick/business=hno%40squid-cache.org
>
> Please consult the Squid FAQ and other available documentation before
> asking Squid questions, and use the squid-users mailing-list when no
> answer can be found. Private support questions is only answered
> for a fee or as part of a commercial Squid support contract.
>
> If you need commercial Squid support or cost effective Squid and
> firewall appliances please refer to MARA Systems AB, Sweden
> http://www.marasystems.com/, info@marasystems.com
Received on Mon Apr 28 2003 - 21:43:16 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:15:34 MST