Description:
I have an older Docker container that is still limited to 1 Gbps network speed, even though my server’s bandwidth has been upgraded to 10 Gbps. When I create a new Docker container using the host network mode, it can utilize the full 10 Gbps speed without any issues. However, when I switch the old container to host network mode, it remains limited to 1 Gbps.
Steps I’ve Tried So Far:
- Changed the network mode of the old container to host, but it still remains limited to 1 Gbps.
- Verified that there are no tc (traffic control) limits set on the network interfaces.
- Ensured that the old container and new container are running on the same server, and the new container can achieve 10 Gbps speed using host network mode.
Environment:
Server OS: Debian
Docker version: Latest stable
Old Container Image: linuxserver/qbittorrent
Docker Compose Configuration for the Old Container:
Docker Compose Configuration for the Old Container:
version: '3.3'
services:
qbittorrent:
image: 'linuxserver/qbittorrent:latest'
container_name: qbittorrent
restart: always
hostname: qbittorrent
volumes:
- '/root/MoviePilot/qbittorrent/config:/config'
- '/hdd/media/download:/media/download'
tmpfs:
- '/tmp'
environment:
- 'PUID=0'
- 'PGID=0'
ports:
- target: 8080
published: 8080
protocol: tcp
- target: 49678
published: 49678
protocol: tcp
- target: 49678
published: 49678
protocol: udp
network_mode: bridge
Docker Compose Configuration for the New Container:
services:
qbittorrent:
image: 'linuxserver/qbittorrent:latest'
container_name: qbittorrent-2
restart: always
hostname: qbittorrent-2
environment:
- PUID=0
- PGID=0
- TZ=Etc/UTC
- WEBUI_PORT=8081
- TORRENTING_PORT=29333
volumes:
- '/root/MoviePilot/qbittorrent-2/config:/config' # 目录已提前创建好
- '/hdd/media/download:/media/download' # 目录已提前创建
ports:
- 8081:8081
- 29333:29333
- 29333:29333/udp
network_mode: host
docker network inspect bridge
[
{
"Name": "bridge",
"Id": "3b87d51e9ab54683b93fd470eeac0577137a3f12b106f33ea5edb7146d66c8d2",
"Created": "2024-06-13T18:00:42.375704167+02:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": true,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.17.0.0/16",
"Gateway": "172.17.0.1"
},
{
"Subnet": "fd00:dead:beef:c0::/80",
"Gateway": "fd00:dead:beef:c0::1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
hid
},
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
docker container tc
root@qbittorrent:/# tc qdisc show dev eth0
qdisc noqueue 0: root refcnt 2
QS:
Despite switching the old container to host network mode, it still only achieves 1 Gbps speed. In contrast, a new container using the same host network mode can reach 10 Gbps.
What could be causing this limitation on the older container, and how can I ensure it utilizes the full 10 Gbps bandwidth?
Any suggestions or guidance would be greatly appreciated!
Thank you!
Sayyiku is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.