htb traffic shaping problem
Eric, here's the information you requested with the mtu set at 1500 (see further below):
-------------------------------------------------------------------------------------------------------------------------
root@sysreset:~# tc -s -d qdisc show dev eth0 qdisc htb 1: r2q 10 default 99 direct_packets_stat 335 ver 3.17 Sent 10388909 bytes 763 pkt (dropped 0, overlimits 372 requeues 0) rate 0bit 0pps backlog 0b 11p requeues 0 qdisc sfq 10: parent 1:10 limit 128p quantum 1514b flows 128/1024 Sent 10328092 bytes 190 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 707234b 11p requeues 0 qdisc sfq 99: parent 1:99 limit 128p quantum 1514b flows 128/1024 Sent 19927 bytes 188 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0 root@sysreset:~# tc filter show dev eth0 filter parent 1: protocol ip pref 49151 u32 filter parent 1: protocol ip pref 49151 u32 fh 801: ht divisor 1 filter parent 1: protocol ip pref 49151 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:10 match 01bb0000/ffff0000 at 20 filter parent 1: protocol ip pref 49152 u32 filter parent 1: protocol ip pref 49152 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 match 00500000/ffff0000 at 20 root@sysreset:~# -------------------------------------------------------------------------------------------------------------------------
Gypsy, I've been playing with the mtu settings. I had initially set it to
1500, which is what the card should be at as the switch I have does not support jumbo frames. If I set the mtu to 40,000 for the class the giants go away and everything seems to fall back into place. However, this seems waaaaay off what it should be, do you have any idea whats happening? I cannot seem to adjust the mpu setting.
-------------------------------------------------------------------------------------------------------------------------
updated classes:
tc class add dev eth0 parent 1: classid 1:1 htb rate 1000mbit ceil 1000mbit mtu 40000
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 512kbit ceil 512kbit quantum 3000 mtu 40000
tc class add dev eth0 parent 1:1 classid 1:99 htb rate 900mbit ceil 1000mbit quantum 3000 mtu 40000
root@sysreset:~# tc -s -d class show dev eth0 class htb 1:99 parent 1:1 leaf 99: prio 0 quantum 3000 rate 900000Kbit ceil 1000Mbit burst 489825b/256 mpu 0b overhead 0b cburst 539875b/256 mpu 0b overhead 0b level 0 Sent 31203 bytes 282 pkt (dropped 0, overlimits 0 requeues 0) rate 7264bit 8pps backlog 0b 0p requeues 0 lended: 282 borrowed: 0 giants: 0 tokens: 4695 ctokens: 4657
class htb 1:1 root rate 1000Mbit ceil 1000Mbit burst 539875b/256 mpu 0b overhead 0b cburst 539875b/256 mpu 0b overhead 0b level 7
Sent 1126563 bytes 654 pkt (dropped 0, overlimits 0 requeues 0) rate 254848bit 15pps backlog 0b 0p requeues 0
lended: 0 borrowed: 0 giants: 0
tokens: 4657 ctokens: 4657
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 3000 rate 512000bit ceil 512000bit burst 40255b/256 mpu 0b overhead 0b cburst 40255b/256 mpu 0b overhead 0b level 0
Sent 1104444 bytes 378 pkt (dropped 0, overlimits 0 requeues 0) rate 250464bit 10pps backlog 0b 6p requeues 0
lended: 372 borrowed: 0 giants: 0
tokens: -694028 ctokens: -694028
root@sysreset:~# tc -s -d qdisc show dev eth0 qdisc htb 1: r2q 10 default 99 direct_packets_stat 338 ver 3.17 Sent 1609761 bytes 1180 pkt (dropped 0, overlimits 369 requeues 0) rate 0bit 0pps backlog 0b 3p requeues 0 qdisc sfq 10: parent 1:10 limit 128p quantum 1514b flows 128/1024 Sent 1536378 bytes 509 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 29362b 3p requeues 0 qdisc sfq 99: parent 1:99 limit 128p quantum 1514b flows 128/1024 Sent 32175 bytes 283 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0 root@sysreset:~# tc filter show dev eth0 filter parent 1: protocol ip pref 49151 u32 filter parent 1: protocol ip pref 49151 u32 fh 801: ht divisor 1 filter parent 1: protocol ip pref 49151 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:10 match 01bb0000/ffff0000 at 20 filter parent 1: protocol ip pref 49152 u32 filter parent 1: protocol ip pref 49152 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 match 00500000/ffff0000 at 20 root@sysreset:~# -------------------------------------------------------------------------------------------------------------------------
Thanks.
-Ryan Power
Quoted 25 lines · you
Message: 4
Date: Tue, 12 Sep 2006 10:36:27 +0200
From: [email protected]
Subject: Re: [LARTC] Re: htb traffic shaping problem (Charlie Meyer)
To: [email protected]
Message-ID:<OFC2DEF3FD.3B18AAD9-ONC12571E7.002DA37A-C12571E7.002F2ADF@barcelo>Content-Type: text/plain; charset="iso-8859-1"
Hi again,
sorry for my late response. Could you give us also the output of
tc -s -d qdisc show dev eth0
tc filter show dev eth0It is very strange that the rate and ceil from class 1:10 are set to 512Kbit but the class's rate goes over 3,5Mbits!! ¿Maybe it is a bug? I'm preparing a similar setup (a linux wan router on a 100Mbit lan with 5Mbps upload/dowload to the Internet. We will see if I run into the same issues...
Regards,
Eric Janz
Quoted 4 lines · you
The giants indicate that your MPU (MTU) is wrong. Set it specifically. Try 1500. Search the archives for "giants" and "MPU" or "MTU". --
gypsy
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Hi,
could you check the mtu set on eth0 with an ifconfig? I tried my own setup and it works fine...
Regards,
Eric Janz
Departamento de Sistemas
Grupo Barceló Viajes
C\ 16 de Julio, 75
07009 Polígono Son Castelló
Palma de Mallorca - Baleares
Tel.: +34 971 448030
Fax.: +34 971 436986
Bugzilla-Redirect <[email protected]>
Enviado por: [email protected]
13/09/2006 07:00
Para
[email protected]
cc
Asunto
[LARTC] Re: htb traffic shaping problem
Eric, here's the information you requested with the mtu set at 1500 (see further below):
-------------------------------------------------------------------------------------------------------------------------
root@sysreset:~# tc -s -d qdisc show dev eth0 qdisc htb 1: r2q 10 default 99 direct_packets_stat 335 ver 3.17 Sent 10388909 bytes 763 pkt (dropped 0, overlimits 372 requeues 0) rate 0bit 0pps backlog 0b 11p requeues 0 qdisc sfq 10: parent 1:10 limit 128p quantum 1514b flows 128/1024 Sent 10328092 bytes 190 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 707234b 11p requeues 0 qdisc sfq 99: parent 1:99 limit 128p quantum 1514b flows 128/1024 Sent 19927 bytes 188 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0 root@sysreset:~# tc filter show dev eth0 filter parent 1: protocol ip pref 49151 u32 filter parent 1: protocol ip pref 49151 u32 fh 801: ht divisor 1 filter parent 1: protocol ip pref 49151 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:10 match 01bb0000/ffff0000 at 20 filter parent 1: protocol ip pref 49152 u32 filter parent 1: protocol ip pref 49152 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 match 00500000/ffff0000 at 20 root@sysreset:~# -------------------------------------------------------------------------------------------------------------------------
Gypsy, I've been playing with the mtu settings. I had initially set it
to
1500, which is what the card should be at as the switch I have does not support jumbo frames. If I set the mtu to 40,000 for the class the giants
go away and everything seems to fall back into place. However, this seems
waaaaay off what it should be, do you have any idea whats happening? I cannot seem to adjust the mpu setting.
-------------------------------------------------------------------------------------------------------------------------
updated classes:
tc class add dev eth0 parent 1: classid 1:1 htb rate 1000mbit ceil 1000mbit
mtu 40000
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 512kbit ceil 512kbit
quantum 3000 mtu 40000
tc class add dev eth0 parent 1:1 classid 1:99 htb rate 900mbit ceil 1000mbit quantum 3000 mtu 40000
root@sysreset:~# tc -s -d class show dev eth0 class htb 1:99 parent 1:1 leaf 99: prio 0 quantum 3000 rate 900000Kbit ceil 1000Mbit burst 489825b/256 mpu 0b overhead 0b cburst 539875b/256 mpu 0b overhead 0b level 0 Sent 31203 bytes 282 pkt (dropped 0, overlimits 0 requeues 0) rate 7264bit 8pps backlog 0b 0p requeues 0 lended: 282 borrowed: 0 giants: 0 tokens: 4695 ctokens: 4657
class htb 1:1 root rate 1000Mbit ceil 1000Mbit burst 539875b/256 mpu 0b overhead 0b cburst 539875b/256 mpu 0b overhead 0b level 7
Sent 1126563 bytes 654 pkt (dropped 0, overlimits 0 requeues 0) rate 254848bit 15pps backlog 0b 0p requeues 0
lended: 0 borrowed: 0 giants: 0
tokens: 4657 ctokens: 4657
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 3000 rate 512000bit ceil
512000bit burst 40255b/256 mpu 0b overhead 0b cburst 40255b/256 mpu 0b overhead 0b level 0
Sent 1104444 bytes 378 pkt (dropped 0, overlimits 0 requeues 0) rate 250464bit 10pps backlog 0b 6p requeues 0
lended: 372 borrowed: 0 giants: 0
tokens: -694028 ctokens: -694028
root@sysreset:~# tc -s -d qdisc show dev eth0 qdisc htb 1: r2q 10 default 99 direct_packets_stat 338 ver 3.17 Sent 1609761 bytes 1180 pkt (dropped 0, overlimits 369 requeues 0) rate 0bit 0pps backlog 0b 3p requeues 0 qdisc sfq 10: parent 1:10 limit 128p quantum 1514b flows 128/1024 Sent 1536378 bytes 509 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 29362b 3p requeues 0 qdisc sfq 99: parent 1:99 limit 128p quantum 1514b flows 128/1024 Sent 32175 bytes 283 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0 root@sysreset:~# tc filter show dev eth0 filter parent 1: protocol ip pref 49151 u32 filter parent 1: protocol ip pref 49151 u32 fh 801: ht divisor 1 filter parent 1: protocol ip pref 49151 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:10 match 01bb0000/ffff0000 at 20 filter parent 1: protocol ip pref 49152 u32 filter parent 1: protocol ip pref 49152 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 match 00500000/ffff0000 at 20 root@sysreset:~# -------------------------------------------------------------------------------------------------------------------------
Thanks.
-Ryan Power
Quoted 25 lines · you
Message: 4
Date: Tue, 12 Sep 2006 10:36:27 +0200
From: [email protected]
Subject: Re: [LARTC] Re: htb traffic shaping problem (Charlie Meyer)
To: [email protected]
Message-ID:
<OFC2DEF3FD.3B18AAD9-ONC12571E7.002DA37A-C12571E7.002F2ADF@barcelo>
Content-Type: text/plain; charset="iso-8859-1"Hi again,
sorry for my late response. Could you give us also the output of
tc -s -d qdisc show dev eth0
tc filter show dev eth0It is very strange that the rate and ceil from class 1:10 are set to 512Kbit but the class's rate goes over 3,5Mbits!! ¿Maybe it is a bug? I'm preparing a similar setup (a linux wan router on a 100Mbit lan with 5Mbps upload/dowload to the Internet. We will see if I run into the same issues...
Regards,
Eric Janz
Quoted 4 lines · you
The giants indicate that your MPU (MTU) is wrong. Set it specifically. Try 1500. Search the archives for "giants" and "MPU" or "MTU". --
gypsy
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
--
ADVERTENCIA LEGAL
El contenido de este correo es confidencial y dirigido unicamente a su destinatario. Para acceder a su clausula de privacidad consulte http://www.barceloviajes.com/privacy
LEGAL ADVISORY
This message is confidential and intended only for the person or entity to which it is addressed. In order to read its privacy policy consult it at http://www.barceloviajes.com/privacy
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Yes, the output is below:
eth0 Link encap:Ethernet HWaddr 00:11:09:2A:A6:F6
inet addr:10.0.0.50 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4244867 errors:0 dropped:0 overruns:0 frame:0
TX packets:1306632 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3898905509 (3.6 GiB) TX bytes:1756030081 (1.6 GiB)
Interrupt:19And from ethtool:
Settings for eth0:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: external
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Link detected: yes
Thanks.
-Ryan Power
Quoted 11 lines · you
Hi,
could you check the mtu set on eth0 with an ifconfig? I tried my own setup and it works fine...
Regards,
Eric Janz
Departamento de Sistemas
Grupo Barceló Viajes
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 10 lines · Bugzilla-Redirect
Yes, the output is below:
eth0 Link encap:Ethernet HWaddr 00:11:09:2A:A6:F6inet addr:10.0.0.50 Bcast:10.0.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4244867 errors:0 dropped:0 overruns:0 frame:0 TX packets:1306632 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3898905509 (3.6 GiB) TX bytes:1756030081 (1.6 GiB) Interrupt:19
Try a "quantum 1514" then; that is correct for an ethernet device with an MTU of 1500.
Perhaps reading the source code will give a clue about MPU and MTU? Frankly, I'd set it to whatever works as long as the rest of the status info looks right and not give a damn that it is huge.
--
gypsy
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 13 lines · gypsy
Quoted 9 lines · Bugzilla-Redirect
Yes, the output is below:
eth0 Link encap:Ethernet HWaddr 00:11:09:2A:A6:F6inet addr:10.0.0.50 Bcast:10.0.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4244867 errors:0 dropped:0 overruns:0 frame:0 TX packets:1306632 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3898905509 (3.6 GiB) TX bytes:1756030081 (1.6 GiB) Interrupt:19
Quoted 6 lines
Try a "quantum 1514" then; that is correct for an ethernet device with an MTU of 1500.
Perhaps reading the source code will give a clue about MPU and MTU? Frankly, I'd set it to whatever works as long as the rest of the status info looks right and not give a damn that it is huge.
Even if ifconfig says 1500 there have been posts that say you don't get it with gig cards that do segmentation offload unless you can turn it off with ethtool.
Apologies if this has already been said as I don't have all the thread.
Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
I was not aware that segmentation offloading would cause a problem... and I do believe it's on.
I think I'll just stuck with the high mtu for the moment then, as I would rather have the CPU savings
then more accurate traffic controlling.
Thanks.
-Ryan Power
Quoted 19 lines · Andy Furniss
Quoted 12 lines · gypsy
Quoted 9 lines · Bugzilla-Redirect
Yes, the output is below:
eth0 Link encap:Ethernet HWaddr 00:11:09:2A:A6:F6inet addr:10.0.0.50 Bcast:10.0.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4244867 errors:0 dropped:0 overruns:0 frame:0 TX packets:1306632 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3898905509 (3.6 GiB) TX bytes:1756030081 (1.6 GiB) Interrupt:19Quoted 5 lines
Try a "quantum 1514" then; that is correct for an ethernet device with an MTU of 1500.
Perhaps reading the source code will give a clue about MPU and MTU? Frankly, I'd set it to whatever works as long as the rest of the status info looks right and not give a damn that it is huge.
Quoted 7 lines
Even if ifconfig says 1500 there have been posts that say you don't get it with gig cards that do segmentation offload unless you can turn it off with ethtool.
Apologies if this has already been said as I don't have all the thread.
Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc