Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[squid-users] Delay pools

1 view
Skip to first unread message

Awie

unread,
Apr 27, 2003, 2:33:38 AM4/27/03
to
All,

I am confuse with delay pool parameter explanation.

# And, if delay pool number 2 is a class 3 delay pool as in the above
# example, and you want to limit it to a total of 256kbps (strict limit)
# with each 8-bit network permitted 64kbps (strict limit) and each
# individual host permitted 4800bps with a bucket maximum size of 64kb
# to permit a decent web page to be downloaded at a decent speed
# (if the network is not being limited due to overuse) but slow down
# large downloads more significantly:
#
#delay_parameters 2 32000/32000 8000/8000 600/64000

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 ?
2. If the max. of total network has reached (4 Kbytes), then all users will
get 4 Kbytes / 3 users. Can I do this?

Your answer is appreciated and waited for. Many thanks for your help.

Thx & Rgds,

Awie

Henrik Nordstrom

unread,
Apr 28, 2003, 7:38:31 AM4/28/03
to
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/, in...@marasystems.com

Awie

unread,
Apr 28, 2003, 7:43:40 AM4/28/03
to
Thanks Henrik,

I will do some trials.

Thx & Rgds,

Awie

Awie

unread,
Apr 28, 2003, 11:51:17 PM4/28/03
to
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

Henrik Nordstrom

unread,
Apr 29, 2003, 2:49:32 AM4/29/03
to
On Tuesday 29 April 2003 05.41, Awie wrote:
> Finally..... I am still confuse about the number.
>
> Below a sample for delay_parameter, but I don't know how to do a
> calculation.

From the squid.conf documentation:

A pair of delay parameters is written restore/maximum, where restore
is the number of bytes (not bits - modem and network speeds are
usually quoted in bits) per second placed into the bucket, and
maximum is the maximum number of bytes which can be in the bucket at
any time.

For example, if delay pool number 1 is a class 2 delay pool as in the
above example, and is being used to strictly limit each host to
64kbps (plus overheads), with no overall limit, the line is:

delay_parameters 1 -1/-1 8000/8000

Note that the figure -1 is used to represent "unlimited".

And, if delay pool number 2 is a class 3 delay pool as in the above

example, and you want to limit it to a total of 256kbps (strict

limit) with each 8-bit network permitted 64kbps (strict limit) and
each individual host permitted 4800bps with a bucket maximum size of
64kb to permit a decent web page to be downloaded at a decent speed

(if the network is not being limited due to overuse) but slow down

large downloads more significantly:

delay_parameters 2 32000/32000 8000/8000 600/8000

Regards
Henrik

--
Donations welcome if you consider my Free Squid support helpful.
https://www.paypal.com/xclick/business=hno%40squid-cache.org

If you need commercial Squid support or cost effective Squid or

Awie

unread,
Apr 29, 2003, 8:07:13 AM4/29/03
to
Henrik,

I am starting to understand now. All values in delay_parameters are in Bytes
instead bits. That made me confuse.

Thanks for your help.

Thx & Rgds,

Awie

----- Original Message -----
From: "Henrik Nordstrom" <h...@squid-cache.org>
To: "Awie" <aw...@eksadata.com>
Cc: "Squid-users" <squid...@squid-cache.org>
Sent: Tuesday, April 29, 2003 2:45 PM
Subject: Re: [squid-users] Delay pools

0 new messages