Performance Loss with HTB/tcng?

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I try to shape my incoming traffic. I have 2MBit/s DSL bandwith and
the following ruleset (on the internal interface):

$INT="eth1";
$INT_NET=192.168.1.0;
$MAX_IN=2Mbps;

dev $INT {
  egress {
    class (<$int>) if ip_src:24 == $INT_NET;
    class (<$ssh>) if tcp_sport == PORT_SSH;
    class (<$smtp>) if tcp_sport == PORT_SMTP;
    class (<$http>) if tcp_sport == PORT_HTTP;
    class (<$http>) if tcp_sport == PORT_HTTPS;
    class (<$nntp>) if tcp_sport == PORT_NNTP;
    class (<$nntp>) if tcp_sport == PORT_NNTPS;
    class (<$other>) if 1;
    htb() {
      class (rate 100Mbps, ceil 100Mbps) {
      class (rate $MAX_IN, ceil $MAX_IN) {
        $ssh = class (rate 100kbps, ceil $MAX_IN, prio 1) {sfq;};
        $smtp = class (rate 100kbps, ceil $MAX_IN, prio 2) {sfq;};
        $http = class (rate 100kbps, ceil $MAX_IN, prio 2) {sfq;};
        $nntp = class (rate 100kbps, ceil $MAX_IN, prio 2) {sfq;};
        $other = class (rate $MAX_IN-400kbps, ceil $MAX_IN, prio 0) {sfq;};
      }
      $int = class (rate 100Mbps-$MAX_IN, ceil 100Mbps) {sfq;};
      }
    }
  }
}

My problem is:

when I download something with bittorrent (class $other) I have
150-200 KB/s without shaping and 80-100KB/s with shaping enabled.

Statistics for $other:

class htb 2:7 parent 2:2 leaf 7: prio 0 rate 1600Kbit ceil 2Mbit burst 3599b cburst 4Kb
 Sent 8271156 bytes 8165 pkts (dropped 0, overlimits 0 requeues 0)
 rate 108047bit 107pps
 lended: 7499 borrowed: 666 giants: 0
 tokens: -16443 ctokens: -13925


I don't know if there is a more elegant way to shape this or what I
can do to get more performance.

Regards,

Sebastian

-- 
GPG Key-ID: 0x76B79F20 (0x1B6034F476B79F20)
Wehret den Anfaengen: http://odem.org/informationsfreiheit/
Thunder rolled. ... It rolled a six.
  --Terry Pratchett, Guards! Guards!
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux