When you are paying for internet based on price per unit of data, it is in your interest to use the data economically. But how do you keep control of costs? £15 may buy you access to view 2500 web pages at 400k/page (including pictures), but if you accidentally stumble accross pages which are 20Mb, or your computer starts an update, your 1Gb allowance can soon be finished. By using a bursting rate limiter, this can be avoided. In fact, by limiting the underlying rate to 5k, it will take at least 55 hours of constant use, to exhaust your 1Gb allowance.
You can set a rate limiter with a burst capability. In our example, we can set a burst capability of one megabyte, with a rate of 5K/sec. So long as your average rate of use is no more than 5K/sec, and each page is much less than 1Mb, you will experience full speed. Only when your average rate of use exceeds 5K/sec, your speed will be limited to dial-up. Normally, this will not be the case.
Assuming you use Ubuntu,
Download the script to your desktop. Open your terminal then type
sudo cp Desktop/1ingress_police /etc/ppp/ip-up.d/
sudo cp Desktop/1ingress_police /etc/ppp/ip-down.d/
sudo chmod 755 /etc/ppp/ip-up.d/1ingress_police /etc/ppp/ip-down.d/1ingress_police
Once the scripts are in place, the ingress and egress speed will follow the limits set. To set the system back,
simply delete 1ingress_police from /etc/ppp/ip-up.d/ and /etc/ppp/ip-down.d/ . You may, of course, change the rates set by editing the script
in /etc/ppp/ip-up.d/1ingress_police .
The techies amongst you will see that we are using what is commonly regarded as a “fierce” option to rate control traffic, and that
is discarding packets which have already been sent. True, packets which would otherwise be useful are dropped in over-bandwidth conditions,
and if the user will want to continue a download, packets will need to be re-sent.
If you have a practical method to overcome what will under normal circumstances be (hopefully) irregular occurrence of packet loss, let me know!
We are hoping, and assuming, the sender will have sensible rate control mechanisms, which is what umtimately preserves the user’s bandwidth.
I presume badly behaving hosts (in terms of having poor rate throttling) form only a very small proportion of internet hosts. In the vast majority of instances,
the rate control mechanism should be effective.