[Netem] Netem UDP performance

Stephen Hemminger shemminger at osdl.org
Thu May 4 14:33:54 PDT 2006


On Thu, 4 May 2006 15:50:29 +0200
Frederik Deweerdt <deweerdt at free.fr> wrote:

> Hi, 
> 
> I'm trying to use netem to simulate a 100ms delay on a network.
> I get poor network performance not only on TCP, which is expected,
> but also on ICMP and UDP. Any hint that could explain the results
> below ?
> 
> For better understanding:
> - we ended coding a delayer that uses libpcap. Flowing the 
> stream through the home brewed software doesn't affect UDP 
> performance
> - cpu usage does not seem to be an issue (<10% CPU usage)
> - we tried to increase /proc/net/core/{r,w}mem_max with no
> visible results
> - the tests where carried out on a linux-2.6.13 and linux-2.6.16
> 
> The test using netperf:
> 
> # Enable a 100ms delay on eth0
> $ tc qdisc change dev eth0 root netem delay 100ms
> 
> # Send an UDP stream through eth0
> $ src/netperf -t UDP_STREAM -H testserver -- -m 1024
> UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to testserver (XXX.XXX.XXX.XXX) port 0 AF_INET
> Socket  Message  Elapsed      Messages                
> Size    Size     Time         Okay Errors   Throughput
> bytes   bytes    secs            #      #   10^6bits/sec
> 
> 106496    1024   10.00        7626      0       6.25
> 110592           10.00        7626              6.25
> 
> # Disable the 100ms delay
> $ tc qdisc del dev eth0 root
> 
> # Resend the stream, get 10x better performance
> $ src/netperf -t UDP_STREAM -H testserver -- -m 1024
> UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to testserver (XXX.XXX.XXX.XXX) port 0 AF_INET
> Socket  Message  Elapsed      Messages                
> Size    Size     Time         Okay Errors   Throughput
> bytes   bytes    secs            #      #   10^6bits/sec
> 
> 106496    1024   10.00       76058      0      62.31
> 110592           10.00       76058             62.31
> 
> Thanks,
> Frederik

It looks like internal UDP flow control is holding the data up to prevent
running system out of memory? You may have to increase the UDP socket buffer
or use multiple streams.



More information about the Netem mailing list