Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ttwthomas/c4deb6a20d62b402a26ec5947d9bb3f8 to your computer and use it in GitHub Desktop.

Select an option

Save ttwthomas/c4deb6a20d62b402a26ec5947d9bb3f8 to your computer and use it in GitHub Desktop.

Revisions

  1. ttwthomas revised this gist Nov 5, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Tester les performances réseaux de ses conteneurs docker
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Fortement inspiré de cet article: http://rabexc.org/posts/docker-networking
    # Tester les performances réseaux de ses conteneurs docker
    # avec docker-proxy
    docker run -it --rm --name=iperf3-server -p 10000:5201 networkstatic/iperf3 -s
    docker inspect --format "{{ .NetworkSettings.IPAddress }}" iperf3-server
  2. ttwthomas created this gist Nov 5, 2019.
    22 changes: 22 additions & 0 deletions Tester les performances réseaux de ses conteneurs docker
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    # avec docker-proxy
    docker run -it --rm --name=iperf3-server -p 10000:5201 networkstatic/iperf3 -s
    docker inspect --format "{{ .NetworkSettings.IPAddress }}" iperf3-server
    iperf3 -c 172.17.0.2 ⇒ 37gbs
    iperf3 -c localhost -p 10000

    # désactiver docker-proxy
    vi /etc/docker/daemon.json
    {
    "userland-proxy": false,
    "iptables": true
    }

    /sbin/sysctl net.ipv4.conf.docker0.route_localnet=1
    service docker restart
    docker run -it --rm --name=iperf3-server -p 10000:5201 networkstatic/iperf3 -s
    iperf3 -c 172.17.0.2
    iperf3 -c localhost -p 10000

    # host networking
    docker run -it --rm --name=iperf3-server --network host networkstatic/iperf3 -s
    iperf3 -c localhost -p 5201