aMule Forum

English => aMule Help => Topic started by: Artik on June 09, 2005, 03:49:40 PM

Title: Prioritizing aMule Up/Down load traffic
Post by: Artik on June 09, 2005, 03:49:40 PM
Hello,

I use aMule all the time however I'd like to add some servers on my Linux box - FTP+SSH in order to connect from work or just to let some kind of downloads/uploads for firends...

However when aMule is working even to 80% of bandwidth I can't get normall connect I wait for 30-50 seconds for log in vis ssh and allmost can't transfer any file why aMule is working.

I've heard that there is a way to prioritize aMule connection. I don't care that it will stop up/down loading when I need internet access. I need my connection. However I don't want to reduce the bandwith to 50% permanently because it uses a lot and it is still most busy "internet user"

Can anybody help me with it?

Artyom
Title: Re: Prioritizing aMule Up/Down load traffic
Post by: lfroen on June 09, 2005, 04:37:46 PM
You have to use Linux traffic shaper. That's quite advanced thing, not something that "just work". Search this forum for "HTB", you will find discussion about it as well as example script.
On the other hand, you can google for "linux traffic shaper" and find almost same thing.

In both cases you have to understand what are you doing and adapt the script and/or settings for your own environment.
Title: Re: Prioritizing aMule Up/Down load traffic
Post by: Artik on June 10, 2005, 12:13:23 PM
Ok I've tryed to make a search and...
1st what is best configuration tool - I've seen shapecfg... it makes some kind of additional device,
I've seen wondershape that just uses iproute.

Also there are long manuals...

Is there some simple manual for beginners?

I have experience with programming and I have no probelms editing writing scripts but all these seems a bit complex

And after reviewing the HTB abilities I've found it exactly what I need...

I want to give lowest priority to aMule -
The medium (between normal and low) for FTPD
And then normal to all rest... Skype, normal browsing, SSH etc.

But after trying to understand all the stuff I've found that I need some good and simple manual.

If there something like that around it would be very helpful. The manual that doesn't assume that I know half of all the stuff.

Thanks!!!!!
Title: Re: Prioritizing aMule Up/Down load traffic
Post by: Artik on June 11, 2005, 09:42:45 AM
Ok I've tested following script:
Code: [Select]
UPLINK=96
DEV=eth0

# THIS PART IS BASED ON THE SCPRIT THAT WAS POSTED

tc qdisc del dev $DEV root

# root CBQ
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit

# shape everything @ upload speed
tc class add dev $DEV parent 1: classid 1:1 cbq rate ${UPLINK}kbit allot 1500 prio 5 bounded isolated

# high prio class 1:10:
tc class add dev $DEV parent 1:1 classid 1:10 cbq rate ${UPLINK}kbit allot 1600 prio 1 avpkt 1000

# bulk and default class 1:20 - gets slightly less traffic,
# and a lower priority:
tc class add dev $DEV parent 1:1 classid 1:20 cbq rate $[9*$UPLINK/10]kbit allot 1600 prio 2 avpkt 1000

# both get Stochastic Fairness:
tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10

# THIS IS MY ADDON

iptables -t mangle -A OUTPUT -m owner --cmd-owner amule -d 0.0.0.0/0 -j MARK --set-mark 20

It seems to me that amule don't can limited in all my attempts I've did with ports/amule etc...

How do I assign correctly the amule traffic to required priority class.

Testing conditions

1. run script as root
2. Run amule - unlimited
3. Start HUGE ftp upload for speed testing

Expected - amule goes down, ftp average uploads get to 10-12kbps - the bandwidth of the line

Observed - FTP upload reaches only 0.5 - 1.2kbps - in avarage of about a minute or two.

What have I done wrong?

Thanks
Artik