You are not logged in.
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
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
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
Have a look at L7. The required kernel patch is included in the beyond kernel.
Offline
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
tomk, you're the guy ! many thanks !
what goes up must come down
Offline
Setting up and using l7-filter is not an intuitive process.
indeed. damn !
what goes up must come down
Offline
how about that ? http://www.netequalizer.com/
what goes up must come down
Offline
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
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
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
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
yes, trickle is nice, but it works on a machine basis - it's great if your router is a *nix machine.
Offline
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
it'd be handy to have a startup script for trickled.
what goes up must come down
Offline
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
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
Dude, there really isn't much need to use the _DAEMON=trickled code - it's never going to change is it?
Great thread though, certainly some food for thought
Offline
Dude, there really isn't much need to use the _DAEMON=trickled code - it's never going to change is it?
sure, but as i stated previously, it's adapted from another script... so, as long as it works...
what goes up must come down
Offline
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
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
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
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
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
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