Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question is similar to this: Limit internet bandwidth. But the wondershaper and trickle cannot limit internet bandwidth for already started applications. So, how can I limit internet bandwidth for already started applications(but only for one application, not for whole system)? :)

share|improve this question
1  
What you are looking for is a process bandwidth limiter which frankly i have spend about 2 hours looking and testing for one. No luck. Because of that am going to put a bounty here because i find the question very interested. –  Luis Jun 2 '11 at 13:46
    
Well the option to start a bounty is gone in firefox and chrome for this post. O.o –  Luis Jun 2 '11 at 14:01
    
I find it hard to believe that an option to control the bandwidth of a particular process already running or not is not found in Linux. There are several tools, most monitor ones, but shaping tools that DO this no. Only alter how the interface upload/download works, but not a process specific one. Taking into consideration that Linux is very powerful in the network world i find this hard to swallow. There has to be an option. –  Luis Jun 2 '11 at 15:22

3 Answers 3

up vote 3 down vote accepted
+100

For the general case, it is theoretically possible in the kernel, using the owner extension to netfilter. I can see the option --pid-owner on the man page of iptables on die.net, but it says it is broken with SMP :(

In my own system, a 10.04, there is no such option on the manual :( . So I believe we are out of luck this time ;( . Maybe there will be another incarnation of the --pid-owner option some time in the future. A gui on top of that would not be rocket science.

The first step must be taken on Linux itself and iptables.

As for more specific types of traffic, such as HTTP. There should be ways to make accommodations using proxies, but it probably needs some hacking because this use-case does not arise often.

share|improve this answer
    
So, I guess, we can't limit internet bandwidth for already started programs yet. –  kv1dr Jun 16 '11 at 6:13
    
Because it looks like this isn't possible yet, I am accepting this answer. –  kv1dr Jun 16 '11 at 6:24

I didn't try this, but this should work...

Bandwidth-Limiting-HOWTO

share|improve this answer

It's not particularly helpful, but the only way (I know of) to truly limit bandwidth effectively is using packet shaping or queuing technology. The only truly well-thought-out method I'm aware of is the PacketShaper range of appliances now owned by Bluecoat.

I haven't used them myself in quite a few years, but I use Bluecoat proxies daily so I've kept up with the development of the PacketShaper range.

They're expensive, but truly superb at what they do. They don't use queues at all - they manipulate the TCP windows size dynamically to throttle bandwidth on a tcp-pair conversation. In the latest releases, they're application aware too, so you can say "throttle iPlayer and Youtube, but let everything else through".

I'm scratching the surface of these devices capability really, but I'll stop since they're not relevant to Ubuntu, so I'm afraid that this answer isn't fully relevant.

share|improve this answer
1  
I don't think, paying for this kind of stuff is smart, when you can get software to do this. –  kv1dr Jun 16 '11 at 6:20
    
Horses for courses. In a corporate environment with thousands of users, a proven enterprise product is your only option. Assuming you want to keep your job that is. Queue based QoS is generally a very poor implementation, so my answer highlights an alternative. That, and as highlighted above, we can't get software to do this. –  Scaine Jun 16 '11 at 11:08

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.