You are not logged in.

#1 2011-01-02 22:34:45

ri
Member
Registered: 2008-10-09
Posts: 73

[SOLVED] Limit upload speed for specific applications.

The case is that my brother is using Spotify (a internet music streaming service http://www.spotify.com/) and it's build upon p2p. The real problem starts when it starts the p2p sharing (it doesnt do it all the time) it uses all our upload speed and cause me sluggish internet and when I play extreme latency.

So what I'm searching for is a some kind of app or configuration that limit the maximum upload speed for, preferably, specified/chosen applications. At Windows there's a handy app called NetLimiter (http://www.netlimiter.com/) that does it excellent.

Yeah and my brother is using Ubuntu if that would matter.

Thanks in advance smile

Last edited by ri (2011-01-03 21:13:53)

Offline

#2 2011-01-02 22:41:59

jelly
Trusted User (TU)
From: /dev/null
Registered: 2008-06-10
Posts: 711

Re: [SOLVED] Limit upload speed for specific applications.

i think iptables can handle this or google QoS linux

Last edited by jelly (2011-01-02 22:42:29)

Offline

#3 2011-01-02 22:56:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,427

Re: [SOLVED] Limit upload speed for specific applications.

I'm not sure, but you can check out http://www.archlinux.org/packages/?sort … =&limit=50

Offline

#4 2011-01-03 03:23:04

Daniel_F
Member
From: Brazil
Registered: 2010-12-28
Posts: 69

Re: [SOLVED] Limit upload speed for specific applications.

What you want is Trickle !

http://monkey.org/~marius/pages/?page=trickle

in Ubuntu:

sudo apt-get install trickle

I believe the easiest way to use it is in stand-alone mode

# trickle -s -d 20 -u 10 /path/to/my/app

The -s parameter makes it go into standalone mode, -d is download limit (optional), -u is upload limit(optional), in KB/s.

It can also run as a daemon. If you want to explore it's capabilities here's a reference:

http://www.tuxradar.com/content/control … th-trickle

Offline

#5 2011-01-03 11:56:25

ri
Member
Registered: 2008-10-09
Posts: 73

Re: [SOLVED] Limit upload speed for specific applications.

jelly wrote:

i think iptables can handle this or google QoS linux

Yes it probably can do. I've run into QoS a lot in my search and I think the long term solution is to get a proper router, atm I got a shitty router my ISP send me which I think cause me some other problem I have. Thinking of some better router with QoS support and preferable support for 3rd part firmware like Tomato.

karol wrote:

I'm not sure, but you can check out http://www.archlinux.org/packages/?sort … =&limit=50

Hm maybe. Although the information wasn't really great, just a bare --help output. Need some testing before any conclusion smile

Daniel_F wrote:

What you want is Trickle ! ...

Oh nice! I've come across with this before but never realized it was a so straight forward solution. Thanks for the references aswell, they will probably come handy. 

I'll come back and mark this thread as solved if everything works smile

Offline

#6 2011-01-03 15:14:10

Daniel_F
Member
From: Brazil
Registered: 2010-12-28
Posts: 69

Re: [SOLVED] Limit upload speed for specific applications.

BTW:  Trickle is in Arch's Community repo so...

# pacman -S trickle

does it for Archers !

Offline

#7 2011-01-03 21:12:52

ri
Member
Registered: 2008-10-09
Posts: 73

Re: [SOLVED] Limit upload speed for specific applications.

Ok trickle does the thing! Spotify crashing after a while for me but that's something that have to do with Spotify, but since it's just a 'preview' I can't really blame them. I think it has to do with window size or something (although not sure, testing it as we speak).

A little note is worth telling though. If you us 'trickle -s -u 10 /usr/bin/spotify' (as in my case; only wan't to limit upload) it will limit upload and download to 10 KB/s. To prevent this my final line is:

trickle -s -u 10 -d 0 /usr/bin/spotify

Thanks for the help smile

Offline

Board footer

Powered by FluxBB