I am beginning to learn about networking and testing network performance (specifically on containers). I am trying to learn how to perform good network tests to see networking capabilities of docker containers and whether they can support deterministic networking.

So, I am learning iperf3, and using Ping to track RTT and Jitter.

My current setup is two docker containers running on the same host using a bridge network to connect the two containers. I wrote a simple program to read Ping output and graph the RTT (or latency) and then calculate the Jitter between the two.

I want to simulate latency or impact of latency during a congested network, so I thought the best way was to use iperf3 to do so.

On one docker container, I ran iperf3 -s. The other docker container I ran iperf3 -c server_ip -t 500 and ping -i 0.01 -c 1000 > output.txt I ran three Ping tests, and arrived at the following result.

Ping Test

To me, this is strange, why does PING RTT improve on a congested network? If my understanding is wrong, how do I properly simulate network congestion to understand its impact on network latency and jitter?


1 Answer 1


Local containers aren't a good means of simulating physical network phenomenon. You're load testing your CPU at best here.

KVM has options to simulate network parameters like packet loss, rate and maybe congestion (although I'm really not sure about that last one) but I don't think that Docker/Podman do.

In any case, if you really want to try out real network phenomenon, plug into a real (test) network.

  • What is a "real network". If I extend my docker container network, for example, to be on two different nodes (different hosts), I think the method of developing correct tests for latency and jitter are the same.
    – akastack
    Mar 29 at 5:28
  • @akastack I think the way to read it is basically "real, as opposed to virtual". And I think the main point is that you are testing a whole different thing than you seem to derive your own expectations from. You say essentially that your results from a fully virtual environment, with no actual network hardware or network links involved, only code running on the CPU, does not match your expectations of how a regular physical network should behave. Depending on what you want to test, your "container network across two nodes" may be relevant, but it also may involve more pieces than necessary. Mar 29 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.