On 7/2/05, Eduardo Bejar <wonka@linkabu.net> wrote:
> Hi Everyone,
>
> Please help me on something regarding delay pools, I´ve been googleing for a
> while but get the same results.
>
> Here's my situation:
>
> Currently I´m using HTB for traffic shaping per IP, so I create a rule to
> setup the total bandwidth that an IP can use. So let´s say that an IP
> address must use 128Kbps total. I create the HTB rule for that and it works
> fine.
>
> But now I´d like to use delay pools and transparent proxy, so when a user
> downloads a large file, this file downloading slows down to let´s say
> 32Kbps, leaving 96Kbps free for browsing. But if the user downloads a small
> file, it should be downloaded at full 128 Kbps.
>
> So first question: Is delay pools a way to accomplish this?
>
> Now, I´m testing the following delay pools config:
>
> acl client1 src 66.67.68.69/255.255.255.255
> delay_pools 1
> delay_class 1 2
> delay_parameters 1 -1/-1 4000/500000
> delay_access 1 allow client1
> delay_access deny all
>
> But this rules do not do what I´m trying to do. According to what I read on
> the Squid FAQ, that should limit all bandwidth for that IP to 32Kbps, for
> every file downloaded with a size bigger than 500 KB.
Well this is not quite true. The 500KB assigned isn't a filesize it is
the per client bucket.
from http://squid.visolve.com
bucket:
an individual delay bucket represents a traffic allocation, which is
replenished at a given rate (up to a given limit) and causes traffic
to be delayed when empty.
> So second question is: what am I missing?
Once the clients bucket fils up with 500KB the speed is droped to
32Kbps no mater what file size he downloads/browses next and stays
that way until the bucket replenishes (stops downloading/browsing for
a while).
> And finally, third question: When using delay pools, while I download a
> large file, will I be able to browse at full speed (128Kbps), or will
> browsing be limited also to 32Kbps as the downloading is in place? So far it
> seems that while a download is in place, everything else that the IP does
> gets queued on the same pool and gets the same 32 Kbps.
why don't you try to use 2 delay pools with acl restrections
acl downloads urlpath_regex -i <path to file with extensions>
in the file put extensions (one in each line):
\.mp3$
\.avi$
\.exe$
\.zip$
# and so on
then configure the delay pools to work with the downloads acl
delay_pools 2
# in one pool use
delay_class 1 2
delay_parameters 1 -1/-1 4000/256000
delay_access 1 allow <clients_acl> downloads
delay_access 1 deny all
# in second pool use
delay_class 2 2
delay_parameters 2 -1/-1 8000/500000
delay_access 2 allow <clients_acl> !downloads
delay_access 2 deny all
that way you have to delay pools
one for normal browsing and full/medium bandwidth
second one for special file extensions (downloads) with limited bandwidth
> Thank you for your help,
It has been a while the last time I dealt with delay pools so I hope this works.
> Regards
>
> Edo
-- Regard. Abu KhaledReceived on Sat Jul 02 2005 - 19:27:23 MDT
This archive was generated by hypermail pre-2.1.9 : Mon Aug 01 2005 - 12:00:02 MDT