ph0rque
ph0rque

Reputation: 194

netem delay is not causing an increase in latency

I am trying to emulate increased latency in my development environment using netem:

tc qdisc add dev eth0 root netem delay 10000ms

However, this delay is not occurring. These are my ping statistics before the above command (10 pings):

10 packets transmitted, 10 received, 0% packet loss, time 9027ms
rtt min/avg/max/mdev = 0.023/0.034/0.045/0.004 ms

And these are the ping statics after the above command (10 pings):

10 packets transmitted, 10 received, 0% packet loss, time 9005ms
rtt min/avg/max/mdev = 0.025/0.031/0.037/0.029 ms

What am I missing?

Upvotes: 1

Views: 1705

Answers (1)

Keith
Keith

Reputation: 43034

try setting the latency on the lo device instead. By default netem sets a queue impairment on the egress queue. This is used when routing or bridging through the box. You won't see it on the same machine.

Upvotes: 4

Related Questions