Squid - does this do what I think it does?
We’ve been using Squid’s delay pools feature as one of several tools to help manage the abysmal bandwidth issues with our Telstra ADSL here. One of the frequent issues has been one thing or another unfairly tying up the pool and leaving nothing for any other user of that pool - whether they be class 1 or class 3 pools.
One of the main culprits is Windows Update, which despite aggressive caching and setting it to operate at 1am, still manages to keep soaking up the bandwidth during the day every so often. Microsoft provide almost no useful tools for managing the bandwidth that Windows Update uses, beyond a new feature in Windows 8 allowing you to specify metered connections (things like Mobile phones and GSM/LTE dongles) so as to not use those for updates. If it’s allowed to use it for updates, it appears to have no problems saturating a link which is a huge pain in the arse.
So I decided to give this a go:
acl updates url_regex windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|psf) acl updates url_regex microsoft.com/dl/content/.* acl updates url_regex update.microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|psf) acl updates url_regex microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|psf)
… then I made a second pool, a simple class 1 aggregate pool and assigned this traffic to it:
delay_pools 2 delay_class 1 1 delay_access 1 allow updates delay_access 1 deny !updates delay_parameters 1 20000/20000
So far it appears to be working. It takes a little bit of finesse to be able to test it, as with Windows Update’s unusual handling of ranges sometimes the downloads don’t always spool up the way you think they would (the main culprit being things like quick_abort_min, which don’t tend to play too well with delay pools apparently anyway), but leaving it going all night it appears to be doing the trick.
I’m also toying with the idea of throwing things like Steam into the same pool, using a different ACL:
acl steam rep_mime_type application/x-steam-chunk
… but I’m undecided on that as Steam now (finally) has bandwidth management included. The disappointing thing about Steam is that I’ve apparently not had any luck with caching the chunks from their new HTTP-powered download system, which I insist is probably the main reason that we don’t play TF2 anymore.