You are not logged in.

#1 2006-08-28 21:14:19

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

is there a way to "prioritize" network bandwidth ?

hi folks,
i wonder if there's a way to prioritize badwidth use. sometimes i very much use my internet connection, so i'd want konqueror to be prioritary, then kmail, then kget, then ktorrent.
this way i could keep internet browsing responsive.
is there a way to achieve this ?
tia


what goes up must come down

Offline

#2 2006-08-28 21:40:00

allucid
Member
Registered: 2006-01-06
Posts: 259

Re: is there a way to "prioritize" network bandwidth ?

There is packet scheduling which schedules packets according to packet type, destination, etc. There are different methods to packet scheduling depending on what you need.

Offline

#3 2006-08-28 22:03:14

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

i guess i need some kind of per-application packet scheduling. i'm no network freak so this packet scheduling thing doesn't ring a bell to me.


what goes up must come down

Offline

#4 2006-08-28 22:17:45

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: is there a way to "prioritize" network bandwidth ?

Have a look at L7. The required kernel patch is included in the beyond kernel.

Offline

#5 2006-08-28 22:43:22

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: is there a way to "prioritize" network bandwidth ?

You'll want to google "traffic shaping" and "QoS" (quality of service).  I do traffic shaping on my router for my entire network that uses the L7 packet filter, but I'm sure there's a way you could get it working on an individual workstation.

Offline

#6 2006-08-28 22:46:09

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

tomk, you're the guy ! many thanks !


what goes up must come down

Offline

#7 2006-08-28 22:49:37

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

http://l7-filter.sourceforge.net/ wrote:

Setting up and using l7-filter is not an intuitive process.

indeed. damn !


what goes up must come down

Offline

#8 2006-09-12 13:18:02

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

how about that ? http://www.netequalizer.com/


what goes up must come down

Offline

#9 2006-09-12 13:56:10

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: is there a way to "prioritize" network bandwidth ?

Ahh - OK. Wouldn't be my choice (stuff like that makes my wallet nervous), but if you feel the need to shell out for a chunk of hardware, go for it.

Offline

#10 2006-09-12 14:07:38

Neuro
Member
From: Poland
Registered: 2005-10-12
Posts: 352

Re: is there a way to "prioritize" network bandwidth ?

Check this out:
http://lartc.org/wondershaper/

This won't allow you to prioritize traffic according to the application that's sending it, but will allow you to, for example, let ssh and www traffic in front of ftp and mail (pop/smtp).

It's cleanly written and with a bit of reading (lartc.org), you'll be able to fine-tune it for your needs.

Offline

#11 2006-09-12 14:43:54

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

tomk wrote:

Ahh - OK. Wouldn't be my choice (stuff like that makes my wallet nervous), but if you feel the need to shell out for a chunk of hardware, go for it.

sure thing
@Neuro : this kind of looks like what i'm seeking. i need to get further into it.


what goes up must come down

Offline

#12 2006-09-12 14:46:57

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: is there a way to "prioritize" network bandwidth ?

For something simple, you might check out an app called trickle. I used it on dialup to make pacman only take 1KB/sec while I was browsing. That left me with 2KB for downloading pages... woooooooeeeeeeeee!

But it wasn't designed for dialup.

Dusty

Offline

#13 2006-09-12 16:03:53

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: is there a way to "prioritize" network bandwidth ?

yes, trickle is nice, but it works on a machine basis - it's great if your router is a *nix machine.

Offline

#14 2006-09-12 18:25:16

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

trickle seems fine, indeed : simple, lightweight and it's in AUR. i suppose i'll stick with this one. thanks for the advice Dusty !!


what goes up must come down

Offline

#15 2006-09-12 20:00:34

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

it'd be handy to have a startup script for trickled.


what goes up must come down

Offline

#16 2006-09-12 20:45:55

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

ok, i made one by myself (it's adapted from some other startup scripts...).

/etc/rc.d/trickle

#!/bin/bash
_DAEMON=trickled

. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/bin/${_DAEMON}`
case "$1" in
  start)
    stat_busy "Starting $_DAEMON"
    [ -z "$PID" ] && /usr/bin/${_DAEMON} -c /etc/trickled.conf
    if [ $? -gt 0 ]; then
      stat_fail
    else
      echo $PID > /var/run/$_DAEMON.pid
      add_daemon $_DAEMON
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping $_DAEMON"
    [ ! -z "$PID" ]  && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm -f /var/run/$_DAEMON.pid
      rm_daemon $_DAEMON
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"  
esac
exit 0

feel free to add it to AUR if needed.


what goes up must come down

Offline

#17 2006-09-12 20:57:09

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

here's my trickled.conf file for those who are interested.

[konqueror]
Priority = 1

[kmail]
Priority = 2

[kget]
Priority = 3

[wget]
Priority = 3

[amule]
Priority = 4

[ktorrent]
Priority = 5

[kopete]
Priority = 6

what goes up must come down

Offline

#18 2006-09-12 21:24:50

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: is there a way to "prioritize" network bandwidth ?

Dude, there really isn't much need to use the _DAEMON=trickled code - it's never going to change is it? smile

Great thread though, certainly some food for thought smile

Offline

#19 2006-09-12 21:31:24

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

dtw wrote:

Dude, there really isn't much need to use the _DAEMON=trickled code - it's never going to change is it? smile

sure, but as i stated previously, it's adapted from another script... so, as long as it works... wink


what goes up must come down

Offline

#20 2006-10-11 00:53:07

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: is there a way to "prioritize" network bandwidth ?

Uhhh am I right in thinking that you are starting trickled as root/whatever user you run the init script as? That's generally bad (though could be ok in this case as this is an app that basically doesnt contain enough of anything to be hacked).

Offline

#21 2006-10-13 20:16:08

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: is there a way to "prioritize" network bandwidth ?

yes i assume it is started as root, like most of (if not all) the initscripts (i cannot check at the moment, i'm computerless). i don't have any other clue, as far as security is concerned. is this software safe ? i don't know. now what ? i suppose software security is a dream? i don't recall i read trickle's license, but i suppose it probably includes a use-at-your-own-risk-like sentence.


what goes up must come down

Offline

#22 2008-02-08 20:56:19

hramat
Member
From: Baden, CH
Registered: 2007-07-13
Posts: 31
Website

Re: is there a way to "prioritize" network bandwidth ?

I hope this thread is not to much out of date :-).
I'm trying to limit upload and download of some of my net applications. I installed trickle and run command trickle -u 20 -d 20 name_of_program but it doesn't work. Do I have to create those /etc/rc.d/trickle and /etc/trickled.conf posted by brazzmonkey?

Offline

#23 2008-02-08 22:35:41

hramat
Member
From: Baden, CH
Registered: 2007-07-13
Posts: 31
Website

Re: is there a way to "prioritize" network bandwidth ?

for now I have created both files but nothing changed. Runnig trickle is working but running trickled gave me this error: trickled: error while loading shared libraries: libevent-1.1a.o.1 so I have created symbolic link of /usr /lib/libevent-1.3d.so.1 to /usr/lib/libevent-1.1a.so.
now running trickled is working but it is complaining trickled: Skipping configuration file: ${prefix}/etc/trickled.conf: No such file or directory

I have tried several things but trickle is still not limiting download and upload speed. Does anyone have suggestion?

Offline

#24 2008-04-13 01:13:54

jot
Member
Registered: 2007-04-21
Posts: 6

Re: is there a way to "prioritize" network bandwidth ?

Hi,

you could try to build trickle with abs,
just edit PKGBUILD a little:
change

./configure --prefix=/usr

to

./configure --prefix=/usr --sysconfdir=/etc

Offline

#25 2008-06-23 20:45:58

engrained
Member
Registered: 2008-06-23
Posts: 4

Re: is there a way to "prioritize" network bandwidth ?

brazzmonkey wrote:

how about that ? http://www.netequalizer.com/

Good product. I think they're starting to offer demo units for less than what they sell the new ones for. I don't know the price, though. I'm guessing that if you can get new ones for around 2K, the demos must be cheaper than that.

Offline

Board footer

Powered by FluxBB