[squid-users] delay syntax, speed and network

Amos Jeffries squid3 at treenet.co.nz
Thu Dec 10 15:26:27 UTC 2015


On 10/12/2015 11:38 p.m., Massimo.Sala wrote:
> 1) speed syntax
> 
> example :
> 
>         delay_parameters 1 -1/-1 1280000/1280000 128000/128000
> 
> 
> The speed is bytes / sec.
> 
> Is it possible to use multipliers like K and M ?
> 

No.

> Is it possible to use units, like bps ( bit per sec ) ?
> 

No.

> 
> It is wonderfoul to read :
> 
>         delay_parameters 1 -1/-1 10Mbps/10Mbps 1Mbps/1Mbps
> 

That does look nice. If only that had any relation to what the delay
pool values mean.


Taking the 10MB one for an example. Translating it to the units as
defined would be: 10Mbps/10Mb


BUT, that the "bps" part is *not* the speed limit the client will go. It
is the speed the client gains more traffic capacity.

The correct units to represent this as a speed in metric is:
   10MBpsps/10MBps

If one were to write 1Mbps/10Mb for example, that client would be able
to go up to 10Mbps. Quite non-intuitive to what you would expect a
number saying "1Mbps" would do.

However that is the burst limit, so on *average* you would see them
going 1Mbps. Emphasis on average. For every second they go under 1Mbps
they are permitted an equal amount *over* 1Mbps, with an peak (burst)
speed of 10Mbps.




> 
> 2) network
> 
> We have about 50 subnets, on different locations.
> 
> It is a "hub" topology : all the subnets are linked via WANs to our 
> central location, where there is the IT centre.
> 
> From the IT centre we have the links to Internet, and the proxy server 
> running squid ( forwarding, IT manager decision ).
> 
> 
> Our internal IP addressing is 10.0.0.0/8
> 
> 10.1.0.0 for the first site, 10.2.0.0 the 2nd, etc ...
> 
> 
> Goals :
> 
>         overall proxy bandwidth limit : none
>         each site limit : 10 Mbps
>         each pc client limit : 1 Mbps
> 
> 
> My work-around is this, using class 3 for /16 networks :
> 
>         delay_class 1 3
>         delay_parameters 1 -1/-1 1280000/1280000 128000/128000
> 
> but it is a "fuzzy" fitting : each remote site is seen by squid as N 
> smaller networks, so the overall site limit is N * 10 Mbps ...
> 
> 
> Is it possible to match my goals ?

Using a class 5 pool and an externl_acl_type helper to classify each
request as to what site it is coming from and assign a unique tag=site
to each request.

However, you might as well use the tag= site classification to determine
a tcp_outgoing_tos/mark value to send to the underlying system QoS
functionality.

Delay pools is 1980's technology (as you might see from the fact that a
/16 is considered big enough to represent an entire network, lol).
Modern QoS can do a lot of things far better than Squid delay pools. Not
least of which is to add in all the non-HTTP traffic that goes nowhere
near Squid to the sites traffic speed accounting.


> 
> Or I request a new class, where we can specify the netmask.
> 

If you wish to supply a patch it will be considered. However, be aware
that delay pools is a very ancient and broken feature. I am wanting to
deprecate and remove it as soon as people will stop using it.

Amos


More information about the squid-users mailing list