I'm looking for something like nice for cpu, but for network usage that will limit application network consumption to level that will configure.
I have problems with xapian-replicate-server that is consuming 80 % of my network. It's causing mysql connections problem (mysql server is working on this machine too). I can't move xapian or mysql to other machine so i need to limit xapian network usage to a decent level.
Is there any tool that will help me do this ?
tc
,iptables
etc can all do this, but just to be different:You can use Linux kernel feature
cgroups
and itsnet_cls
module for limiting xapian-replicate-server. Something like this should do:This would create a new cgroup for Xapian and give it total of 2048 kilobytes/s TCP traffic bandwidth and 4096 kilobytes/s of total whatever network traffic bandwidth.
Seems like "trickle" could work for you: http://monkey.org/~marius/trickle/