Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my network, when someone is downloading big files, the internet speed is going down for everyone else.

So what I want to do is, when someone starts downloading a file, he will download first 5 megabytes with normal speed, then the speed will go down, for example, to 100kbps.

Is it possible to do it in Squid 2.7?


share|improve this question
up vote 2 down vote accepted

I don't know your set up, and I don't know squid, and I am not sure that it's as configurable as you need but you could always try 'Trickle'. If you have the a ability you can enforce a policy whereby users use their internet accessing programs through Trickle.

It can be used like this (perhaps through a shell script):

trickle -d 20 -u 5 wget -c

This will start 'wget' with the specified options and enforce a maximum download speed of 20kbps and an upload speed of 5kbps while it runs. Of course it can be any other application, it doesn't have to be wget.

[Update]: Have a read of this page: Squid Proxy Server Tutorial Specifically check out point 4. It seems to detail exactly what you're after.

share|improve this answer
I am using pfSense and i found bandwidth throttling. However, it is limited to limiting the bandwidth to a certain speed. What i want make is doing the same thing after for example 5mb of downloading on full speed. – epema Sep 24 '12 at 18:44
See the link above. That appears to show how to do exactly that using Squid. (At the bottom of my answer) – TenaciousC Sep 24 '12 at 18:51
Oh I see that! Thank you :) Here is another good one – epema Sep 24 '12 at 18:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.