Very slow network performance of Docker containers with host's network

后端 未结 2 1569
北海茫月
北海茫月 2021-02-20 13:35

I\'m having a problem with sluggish network performance between Docker containers and host\'s network. I asked this question on the Docker\'s forum but have received no answers

2条回答
  •  醉酒成梦
    2021-02-20 14:06

    I suspect the default allocation of memory and CPU for the containers might not be optimal for the kind of network performance you are trying to achieve.

    1. Investigate the utilization of resources within the containers using standard tools like top, htop, strace etc. Or you can use docker stat command when these instances are in peak operation $ docker stats node1 node2 CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O node1 0.07% 796 KB/64 MB 1.21% 788 B/648 B node2 0.07% 2.746 MB/64 MB 4.29% 1.266 KB/648 B
    2. Then you might want to modify various resource allocation parameters available with docker run.

      1. EDIT: Another thing to check would be MTU of the actual system interface and the setting on the docker interfaces. Use --mtu=BYTES to set MTU of your docker values to match your system interface's MTU value

提交回复
热议问题