Performance#
MTU#
Increasing the MTU value can, in some cases, improve network efficiency.
Avvertimento
Changing the MTU value could have unintended consequences!
GNU/Linux#
You can change the default Ethernet (IEEE 802.3) MTU value from 1500 to 9000 if all devices you want to use support it (including dumb Ethernet switches).
If you use the networking
systemd service provided by Debian
there are various possibilities. Once you done the configuration you can
check it with ICMP requests like these
Vedi anche
ping ${other_host_using_mtu_9000} -s 8972 -Mdo
append the
mtu
line to theinterface configuration file
1# [ ... ] 2 3auto eth0 4iface eth0 inet static 5 # [ ... ] 6 mtu 9000 7 8# [ ... ]
append this
configuration
1# [ ... ] 2 3interface "eth0" { 4 default interface-mtu 9000; 5 supersede interface-mtu 9000; 6}
reboot
optionally enable MTU probing. See reference 3
echo "net.ipv4.tcp_mtu_probing = 1" >> /etc/sysctl.conf sysctl -p /etc/sysctl.conf exit
Docker#
Vedi anche
add this setting to the
daemon configuration file
1{ 2 "mtu": 9000 3}
restart the service
systemctl restart docker
add a new network with the new MTU value in the Docker compose file
services: myservice_0: # [ ... ] networks: - mynetwork myservice_1: # [ ... ] networks: - mynetwork # [ ... ] myservice_n: # [ ... ] networks: - mynetwork # [ ... ] networks: mynetwork: driver: bridge driver_opts: com.docker.network.driver.mtu: 9000
Note