Subject: Re: Netem Delay Normal Distribution

From: Stephen Hemminger <[email-masked]>
Date: Sun, 27 Oct 2013 12:37:01 -0700

On Sat, 26 Oct 2013 21:31:03 -0500
anirup dutta <[email-masked]> wrote:

> Hello,
> 
> I try this on my device
> 
> sudo tc qdisc del dev eth0 root netem delay 100ms 20ms distribution normal
> 
> I use iperf for transmitting UDP packets and I modified its code to
> get per packet delay. When I plot the distribution of delays and
> analyze the delays they pass the normality tests.
> 
> The only problem that I am not able to understand is that the mean of
> those delays shift to 125ms. Its not only me. There was another study
> and it observed the same thing.
> 
> http://www.researchgate.net/publication/224256550_An_Empirical_Study_of_NetEm_Network_Emulation_Functionalities/file/d912f5058c9b1e409b.pdf
> 
> Figure 7
> 
> I found out that this command is valid
> 
> sudo tc qdisc del dev eth0 root netem delay 1ms 20ms distribution normal
> 
> So I have a feeling that mean gets shifted from the base delay to
> avoid negative delay values.
> 
> It would be great if someone can confirm how it is implemented?

The table distribution logic actually predates netem.
It came from NIST Net http://snad.ncsl.nist.gov/nistnet/
The code was direct copy from this public domain code.