A maximum transmission unit (MTU) is the largest size of a packet that can be transmitted without the need to fragment the packet. This topic describes how to set the MTU size of a network interface controller (NIC) on an ECS instance by using the ecs-utils-jumboframe script.
Background information
To limit the maximum sizes of transmitted packets and avoid excess latency resulted when large packets are fragmented, we recommend that you keep the local and network MTU sizes consistent.
Notice The ecs-utils-jumboframe script does not contain commands that can be used to restart
NICs or network services. Different types of network services and NIC drivers may
be used in different systems, and transient connections may occur. If your business
does not allow transient connections, exercise caution when you perform this operation.
Limits
- You can run the ecs-utils-jumboframe script only on VPC-type ECS instances. The ecs-utils-jumboframe script uses instance metadata services to check whether instance types support the Jumbo Frame feature. Before you run the script on an ECS instance, access <IP address of the ECS instance>: <Port number> in your browser to check whether the port used to exchange data between networks and instance metadata services is enabled on the ECS instance. Example: 100.100.100.200:80. If the port is not enabled, enable it.
- Only the seventh-generation hfg7, hfc7, and hfr7 instance families support the Jumbo Frame feature. A maximum MTU size of 8,500 is allowed for the instance types within these instance families. The ecs-utils-jumboframe script determines the maximum MTU size based on instance types. You can also use this script to set a maximum MTU size of 1,500 for NICs on ECS instances of other instance types.
- The Jumbo Frame feature is applicable only to direct TCP communication between seventh-generation VPC-type ECS instances that have high clock speeds, and does not support the communication through intermediate nodes such as Server Load Balancer (SLB) instances.
Set the MTU size of an NIC on a Linux instance
Use a Linux instance that uses one of the following images:
- CentOS 6.x, CentOS 7.x, and CentOS 8.x
- Debian 9.x and Debian 10.x
- SUSE Linux Enterprise Server 15
- Ubuntu 16.x, Ubuntu 18.x, and Ubuntu 20.x
Set the MTU size of an NIC on a Windows instance
Make sure that the Windows instance meets the following requirements:
- The instance uses a Windows Server 2012 or later image.
- The instance has PowerShell installed.