Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

Cheers

share|improve this question

1 Answer 1

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 http://mydownloads.com/bigfile.zip

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

 
discard

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.