Re: TC (HTB) doesn't work well when network is congested?

Linux Advanced Routing and Traffic Control

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

 



Thanks, Peter,

So what you means is that network congestion caused my problem. I test the bandwidth between client1 and server using iperf, SEND and RECV are both 122MB/s. I tried
different values for the total bandwidth, and I got the following numbers:

total bandwidth 120MB/s    client1 SEND :10MB/s     RECV :39MB/s
total bandwidth 110MB/s    client1 SEND :16MB/s     RECV :40MB/s
total bandwidth 100MB/s    client1 SEND :30MB/s     RECV :38MB/s
total bandwidth   90MB/s    client1 SEND :39MB/s     RECV :40MB/s
total bandwidth   80MB/s    client1 SEND :39MB/s     RECV :40MB/s
total bandwidth   70MB/s    client1 SEND :40MB/s     RECV :40MB/s
total bandwidth   60MB/s    client1 SEND :40MB/s     RECV :40MB/s

So TC works well as long as total bandwidth is below 90MB/s, which is about 70% of the wise speed. Is it possible that I can use the full bandwidth (122MB/s) in my script?

william

Peter Rabbitson wrote:

William Xu wrote:

Hi,

I have a server and ten clients in a Gigabit network. The server has 125mbps network bandwidth. I want that the server has 40Mbps bandwidth reserved for client 1 (IP 192.168.5.141), and the
rest bandwidth is for all other clients.

<snip>

I ran a test in which all 10 clients send/receive packets to/from the server simultaneously. But Client 1 only got 20mbps bandwidth for sending, and 38mpbs for receiving. If I limit the rate of both classes 1:1 to 60mbps instead of 125mbps, Client 1 got 39mbps for sending, and 40mbps for
receiving.

I am not sure what might cause this. Is it because TC doesn't work well when network is congested?
Or my script is not right?


No network will be able to operate at its theoretical maximum. In the case of a gigabit network you will be lucky to get consistent 120mbps, and it heavily depends on the hardware quality, and the number of switches in between. So what you are doing is oversaturating the link, the ACK packets can not get through, your speed drops due to delays/retransmissions. Perform a test with only two systems sending stuff to each other to see what is the actual bandwidth you can hope for, and use that number instead of 125mbps.


_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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