Linux – How to change speed limit of running trickle instance

bandwidthlinuxqos

I started a program throttled using trickle as trickle -d 10 -u 5 program. Now I want to change change the throttling speed to -d 50 -u 40. How can I change it without closing the program ?

tricklectl sounds well but I can't use it. In the manual they says it will be ready soon but I can't see any development for the last 10 years. So I think someone else should have made it. I'm also interested in editing the .c code but I have little knowledge in C .

Best Answer

I'd double check this but this article lists this as one of drawbacks to using Trickle. The lack of the feature to dynamically change the limits.

excerpt from article - Control your bandwidth with Trickle

My biggest concern with Trickle is that it can't dynamically adjust set speeds. So, if you set the upload rates at 20kbps for Firefox, but later decide to increase or decrease it, you will have to close Firefox, reset the speeds and then launch Firefox. And not just Firefox: Trickle doesn't allow dynamic speed adjustments at all. This feature has been on the to-do list for some time and it's also listed under Section 6 of the published paper at http://monkey.org/~marius/trickle/trickle.pdf.

Modifying the code?

Since no one has implemented this feature I would imagine it isn't trivial, otherwise it likely would've been added already or as part of the original set of features.

This is just my $0.02 here but a feature like adjusting it seems like a no brainer to have, and they even called it out in the original PDF that they would like to have it as well.

An alternative?

As an alternative I believe pyshaper will allow you change the throttles dynamically without a restart.

pyshaper includes a graphical user interface which you can use to conveniently view/change throttle settings in real time. Note that pyshaper runs as a daemon, so can function perfectly in non-graphical environments.

You can check out the pyshaper man page for more details.

                                            pyshaper gui

But I want this in trickle

I found the original developers Github repo where he's imported Trickle. Github has the ability to file issues against the repos, so I'd suggest you open an issue with him there. The project appears active, though the import shows it to be at version 1.07, so it has pretty much remained stagnant.

The reason I'm mentioning this is if you want this feature, so do others. I know I would want this feature too. So perhaps some other person has forked Trickle through Github and they've added this feature or are planning to work on it. At any rate I would file an issue against the original repo than for no other reason then to get the ball rolling on potentially getting this feature built in.

References

Related Question