View previous topic :: View next topic |
Author |
Message |
xi n00b

Joined: 26 Jan 2003 Posts: 37
|
Posted: Mon Jan 27, 2003 10:40 am Post subject: bandwidth management / guter ping trotz volllast |
|
|
Hallo,
bisher verwende ich folgendes script um bei einem upload trotz upload gute ping zeiten zu erreichen. allerdings schrumpft dabei der max. upload speed auf 13k.
Code: |
#!/bin/bash
iptables -t mangle -A OUTPUT -m length --length 0:500 -j MARK --set-mark 3
iptables -t mangle -A OUTPUT -m length --length 500:1500 -j MARK --set-mark 4
iptables -t mangle -A PREROUTING -i eth0 -m length --length 0:500 -j MARK --set-mark 3
iptables -t mangle -A PREROUTING -i eth0 -m length --length 500:1500 -j MARK --set-mark 4
tc qdisc add dev ppp0 root handle 10: cbq bandwidth 10Mbit avpkt 1000 mpu 64
tc class add dev ppp0 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate 38Kbit allot 1514 prio 1 maxburst 10 avpkt 100 isolated
tc class add dev ppp0 parent 10:0 classid 10:2 cbq bandwidth 10Mbit rate 90Kbit allot 1514 prio 8 maxburst 2 avpkt 1500 bounded
tc filter add dev ppp0 parent 10:0 protocol ip handle 3 fw flowid 10:1
tc filter add dev ppp0 parent 10:0 protocol ip handle 4 fw flowid 10:211:29:57
|
Dabei werden die TCP/IP Pakete anhand ihrer Größe klassifiziert wobei die großen Pakete (von Datentransfers etc) "benachteiligt" werden sollen.
ich verwende T-DSL mit 768kbit up / 128kbit down.
Bin für jede Anregung dankbar, natürlich auch für komplett andere Lösungsvorschläge  |
|
Back to top |
|
 |
xonit n00b

Joined: 28 Dec 2002 Posts: 71
|
Posted: Mon Jan 27, 2003 3:51 pm Post subject: |
|
|
hi,
ist ja ne interessante sache, aber da ich total kein plan von iptables hab da ich das normal nie verwend und auch selten spiele, wollte ich mal fragen ob du weisdt ob es reicht wenn ich ppp0 durch eth0 ersetze da ich hinter einem router sitze aber eth0 bei dir schon weiter oben verwendet wird .
btw. wie ist denn der ping so ?
bye
xonit _________________ Asus A3L |
|
Back to top |
|
 |
ajordan Guru


Joined: 10 Sep 2002 Posts: 320 Location: Hannover / Germany
|
|
Back to top |
|
 |
A.Stranger Tux's lil' helper


Joined: 31 Oct 2002 Posts: 148 Location: Dortmund
|
Posted: Mon Jan 27, 2003 6:20 pm Post subject: |
|
|
Hi,
das müsste das Paket "sys-apps/iproute" sein. Im Inet heist es eigentlich iproute2. _________________ Bis denn...
A.Stranger
_________________________
System: findet Ihr hier |
|
Back to top |
|
 |
ajordan Guru


Joined: 10 Sep 2002 Posts: 320 Location: Hannover / Germany
|
Posted: Mon Jan 27, 2003 6:37 pm Post subject: |
|
|
Sorry, mehr Fragen, als Antworten: wo finde ich ein Tutorial fuer diese Bandbreitenregulierung?
bei Ausfuehrung des obigen scripts gibbet diese Fehlermeldung: Code: | RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
Illegal "classid"
|
Alex _________________ http://spitfire.homelinux.net/
http://spitfire.spittix.de/
GNU/LinuX mobile Dokumentation |
|
Back to top |
|
 |
xi n00b

Joined: 26 Jan 2003 Posts: 37
|
|
Back to top |
|
 |
amne Bodhisattva


Joined: 17 Nov 2002 Posts: 6378 Location: Graz / EU
|
Posted: Tue Jan 28, 2003 2:37 pm Post subject: |
|
|
hi,
ich habe mich an diesem artikel aus der c't orientiert:
20. Jürgen Schmidt (ju)
Verkehrspolizei
Bandbreiten-Management mit Linux
Praxis, Bandbreiten-Management, HTB, Linux-Router, iptables, QoS, Quality of Service, CBQ, DSL, Ingress
c't 24/02, Seite 224
vielleicht hast du es ja irgendwo zur hand. im gegensatz zu deiner version setzen die c'tler auf HTB, da dieses laut autoren (was weiss ich) derzeit eher weiterentwickelt wird.
ich verwende das unter
http://www.heise.de/ct/ftp/02/24/224/
verfügbare skript (in leicht modifizierter form, da ich einen anderen up/downstream) habe.
funktioniert relativ gut, ich habe nebenbei pysoulseek laufen, der client kennt allerdings keine uploadbegrenzung. ich hab ihn mittels skript auf ca. 35kbit upload eingeschränkt (habe nen 64kbit upstream) und kann in ner ssh-session (fast) gleich arbeiten wie ohne nen upload im hintergrund. bei höheren werten für den upload wird die ssh dann aber doch etwas zäh...
hab natürlich keine ahnung, wie toll meine lösung ist, bin aber für meine zwecke durchaus zufrieden damit.
das skript allein ist halt ohne den c't artikel etwas schwer anzupassen, da die hintergrundinformationen fehlen, bei interesse kann ich aber gerne so gut wie möglich weiterhelfen.
gruss,
amne |
|
Back to top |
|
 |
xi n00b

Joined: 26 Jan 2003 Posts: 37
|
Posted: Tue Jan 28, 2003 5:46 pm Post subject: |
|
|
danke, scheint gut zu funktionieren
allerdings braucht man für htb eine spezielle tc binary (ist im htb tarball drin: http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz), den gentoo-kernel braucht man dagegen nicht zu patchen (geht zumindest bei meinem 2.4.19-r10er mit HTB aktiviert) |
|
Back to top |
|
 |
ajordan Guru


Joined: 10 Sep 2002 Posts: 320 Location: Hannover / Germany
|
Posted: Tue Jan 28, 2003 6:55 pm Post subject: |
|
|
@amne
Welchen kernel verwendest du und welche Module compilierst du? Ich habe jetzt den gentoo-2.4.19-r10 und ac-2.4.21-pre3-ac4 versucht und bekomme beim depmod -a immer solche Fehler:
Code: | spitfire test # depmod -a
depmod: *** Unresolved symbols in /lib/modules/2.4.21-pre3-ac4/kernel/net/sched/cls_fw.o
depmod: *** Unresolved symbols in /lib/modules/2.4.21-pre3-ac4/kernel/net/sched/cls_rsvp.o
depmod: *** Unresolved symbols in /lib/modules/2.4.21-pre3-ac4/kernel/net/sched/cls_rsvp6.o
depmod: *** Unresolved symbols in /lib/modules/2.4.21-pre3-ac4/kernel/net/sched/cls_tcindex.o
depmod: *** Unresolved symbols in /lib/modules/2.4.21-pre3-ac4/kernel/net/sched/cls_u32.o
depmod: *** Unresolved symbols in /lib/modules/2.4.21-pre3-ac4/kernel/net/sched/sch_cbq.o
depmod: *** Unresolved symbols in /lib/modules/2.4.21-pre3-ac4/kernel/net/sched/sch_htb.o
|
Ich habe folgende QOS module compiliert:
Code: | │ │ [*] QoS and/or fair queueing │ │
│ │ <M> CBQ packet scheduler │ │
│ │ <M> HTB packet scheduler │ │
│ │ <M> CSZ packet scheduler │ │
│ │ <M> The simplest PRIO pseudoscheduler │ │
│ │ <M> RED queue │ │
│ │ <M> SFQ queue │ │
│ │ <M> TEQL queue │ │
│ │ <M> TBF queue │ │
│ │ <M> GRED queue │ │
│ │ <M> Diffserv field marker │ │
│ │ <M> Ingress Qdisc │ │
│ │ [*] QoS support │ │
│ │ [*] Rate estimator │ │
│ │ [*] Packet classifier API │ │
│ │ <M> TC index classifier │ │
│ │ <*> Routing table based classifier │ │
│ │ <M> Firewall based classifier │ │
│ │ <M> U32 classifier │ │
│ │ <M> Special RSVP classifier │ │
│ │ <M> Special RSVP classifier for IPv6 │ │
│ │ [*] Traffic policing (needed for in/egress) |
Alex _________________ http://spitfire.homelinux.net/
http://spitfire.spittix.de/
GNU/LinuX mobile Dokumentation |
|
Back to top |
|
 |
amne Bodhisattva


Joined: 17 Nov 2002 Posts: 6378 Location: Graz / EU
|
Posted: Wed Jan 29, 2003 9:09 am Post subject: |
|
|
ah, sorry, wegen deiner fehlemeldung wollt ich eh schon im ersten artikel was schreiben. wenn ich mich richtig erinnere, habe ich sowas in der art auch bekommen und irgendwo im netz habe ich gelesen, dass das bedeutet, dass *irgendwas* schief gegangen ist. hab dann einfach in meinem kernel im QoS menue wirklich alles fix ( also <*>) in den kernel ausgewählt. damit gibts auch keine probleme, irgendein modul zu laden .seither is der kernel zwar etwas aufgeblasen und passt nicht mehr auf eine diskette, aber damit kann ich leben. wer motiviert ist, kann dann natürlich nach der trial&error methode schauen, was er doch nicht braucht, zumindest die jeweils anderen als den scheduler, den man selbst verwendet, sollte man sich sparen können.
version: vanilla 2.4.20er
ich glaube zwar nicht, dass die restlichen menüs vom make menuconfig auch noch irgendwie wichtig sind, aber falls doch lege ich meine aktuelle config auf
http://xover.mud.at/amnenion/amne.kernelconfig
hoffentlich gehts jetzt!
amne |
|
Back to top |
|
 |
|