Thanks to iiNet’s latest round of quota increases (read: buying capacity on PPC-1 made us drop our pants data is so cheap now), quota is now a problem again.

Being able to consume 600GB/mo of traffic opens the doors to all kind of silliness that one might not have previously thought practical. And as such, I’ve found that we once again have the need to schedule our downloads so we don’t blow our quota during the peak/offpeak periods.

An hours worth of work with PERL and the iiNet Usage XML API, and the SabNZBD API, I have a tool which updates the download rate of my usenet weirdness.

Instead of a basic schedule which doesn’t provide any guarantees your overall usage will be below schedule, this one takes into account your quota, offpeak/onpeak times and remaining data for the month - and sets SabNZBD to throttle so you’ll end up hitting your target quota usage perfectly, no matter what everyone else in the household does.

Throw in some other nice bits like upper boundaries (eg: keep 250kB/s free for other traffic), etc - and this script should go down a treat. There are only two features left to implement:

  • Better ‘buffer-zone’ support: Currently the script will target a safe ‘buffer’ zone, that is - you can tell it you always want 20gb free for other use. The script should back-off the buffer (logarithmic?) at the end of the month to more efficiently use the bandwidth.

  • Link Speed awareness: The script uses a hardcoded link size to use for bandwidth reservation. Whilst this is really best implemented with QoS at the border, it’s still a nice feature to have - and maybe it should scrape the current link speed from the modem.

In related news, I’m out of storage space. Time to up the ante on the storage project. I’ve had my Norco 4220 chassis sitting here for about two months waiting for me to buy an X58-based mainboard and Core i7 CPU, as well as some nice fresh new drives to sit on my LSI disk controllers.

image

Which brings me to my final point - I’m not normal. Normal people don’t do this kind of thing. Normal people turn on the TV and watch Neighbours.

But you know what? Not being normal rocks.

UPDATE (06/09/10):Definately not normal, I’ve just written the SNMP code, so it’s now using real link speeds if they’re available. I won’t do the buffer back off stuff yet though, cbfd…