What Is MTU Size and How Do You Calculate It?

In this article, we’ll delve into the concept of MTU size, explore its implications in different network scenarios, and provide guidance on how to change it effectively.

What Is MTU Size and How Do You Calculate It

image_pdfimage_print

In the world of networking, the term maximum transmission unit (MTU) is often mentioned when discussing network performance and configuration. MTU size refers to the maximum amount of data that can be transmitted in a single network packet without fragmentation. Understanding maximum transmission unit size and knowing how to calculate and adjust it can have major benefits for optimizing network performance. In this article, we’ll delve into the concept of maximum transmission unit size, explore its implications in different network scenarios, and provide guidance on how to change it effectively.

What Is MTU Size?

MTU represents the maximum payload size of a network packet that can be transmitted across a network. It specifies the largest data size that can be encapsulated within a packet and sent from one device to another without being divided into smaller fragments. maximum transmission unit size is measured in bytes, and it includes both the data payload and the packet headers.

Maximum Transmission Unit Explained

When data is transmitted over a network, it is divided into packets for efficient delivery. These packets consist of a header section and a payload section. The header contains control information, such as source and destination addresses, while the payload contains the actual data being transmitted. The MTU size determines the maximum size of the payload section of each packet.

Introducing the Pure Storage Platform for the new era of data services

What Affects MTU Size?

Several factors can influence the maximum transmission unit size used in a network, including:

  • Network technology: Different network technologies, such as Ethernet and Wi-Fi, have varying maximum transmission unit size limitations. Ethernet typically uses an maximum transmission unit size of 1,500 bytes, while Wi-Fi often has a default maximum transmission unit size of 1,460 bytes.
  • Network devices: The maximum transmission unit size can be determined by the network devices involved in the transmission. Routers, switches, and network interface cards (NICs) all play a role in defining the maximum transmission unit size for a network.
  • Path MTU Discovery: Path maximum transmission unit Discovery (PMTUD) is a mechanism that allows devices to dynamically determine the optimal maximum transmission unit size for a particular path between the source and destination. PMTUD relies on Internet Control Message Protocol (ICMP) packets to detect and adjust the maximum transmission unit size based on the path’s characteristics.

MTU Size and Ethernet vs. Wi-Fi

As a wired technology, Ethernet has a larger default maximum transmission unit size than Wi-Fi. This difference comes from the additional overhead required for wireless communication, which often gives Wi-Fi a lower default maximum transmission unit size to allow it to accommodate the extra encapsulation required for wireless transmission.

Different Limitations to MTU Size

While the default maximum transmission unit size for Ethernet is typically 1,500 bytes, it’s important to note that various factors can limit the actual MTU size used in practice. 

For example, virtual private networks (VPNs) and network tunnels can impose their own maximum transmission unit size restrictions, typically due to encapsulation and encryption overhead. This can result in a reduced effective maximum transmission unit size.

Also, network devices and configurations may apply quality of service policies that prioritize certain types of traffic or limit the maximum transmission unit size for specific traffic classes.

How to Change MTU Size

Here’s a guide on how to change MTU size:

  • Determine the optimal maximum transmission unit size: To find the optimal maximum transmission unit size for your network, you can use the ping command with the “don’t fragment” option. For example, in Windows, you can use the command “ping -f -l <packet_size> <destination_IP_address>”. Gradually increase the packet size until you find the maximum value without fragmentation.
  • Check the current MTU value: You can check the current maximum transmission unit value of your network interface by using the appropriate command for your operating system. For instance, in Windows, you can use the command “netsh interface ipv4 show subinterfaces”.
  • Configure the new maximum transmission unit size: To change the maximum transmission unit size, you need to access the configuration settings of your network interface. In Windows, you can use the command “netsh interface ipv4 set subinterface <interface_index> mtu=<new_MTU_size> store=persistent” to set the new MTU size.

>> Need help selecting the optimal MTU size for your Pure Storage deployments? Read our SAN Guidelines for Maximizing Pure Performance.  

What Can Happen If You Change MTU Size

Changing the MTU size can have various consequences, including:

  • Fragmentation: If the MTU size is set too high and exceeds the limits of the underlying network infrastructure, fragmentation may occur. Fragmentation can impact network performance and increase the likelihood of packet loss.
  • Compatibility issues: Some network devices or applications may not support or handle non-standard MTU sizes. This can lead to connectivity issues or erratic behavior.

Benefits of Increasing MTU Size 

Increasing the MTU size can offer some benefits in certain scenarios, including: 

  • Reduced overhead: Larger maximum transmission unit sizes reduce the ratio of header overhead to data payload, resulting in more efficient data transmission and potentially improved network performance.
  • Throughput optimization: With a larger maximum transmission unit size, fewer packets are required to transmit a given amount of data. This can lead to increased throughput, especially in high-bandwidth scenarios.

Downsides to Changing MTU Size

Changing the MTU size can also have downsides:

  • Compatibility issues: As mentioned earlier, some devices or applications may not handle non-standard maximum transmission unit sizes well, causing compatibility issues.
  • Path limitations: While larger maximum transmission unit sizes can be beneficial within a local network, they may encounter limitations when traversing certain paths, such as tunnels or links with smaller MTU size restrictions.

Does MTU Size Affect Network Speed?

The MTU size itself does not directly affect network speed. It does, however, impact the efficiency of data transmission and can have implications for network performance. By optimizing the MTU size, you can potentially improve network throughput and reduce latency, leading to a better overall user experience.

Should You Change Your Maximum Transmission Unit Size?

Changing the MTU size should be done cautiously and only if there is a specific need or optimization goal. In most cases, the default MTU size provided by the network technology and infrastructure is sufficient for regular network usage. However, if you encounter specific issues or have advanced requirements, adjusting the maximum transmission unit size might be worth considering.

Is It Better to Have a High or Low Maximum Transmission Unit?

There is no definitive answer to whether a high or low MTU size is better. The optimal maximum transmission unit size depends on various factors, including the network technology, devices involved, and specific network requirements. In general, a higher MTU size can be beneficial for reducing overhead and optimizing throughput, but it should be compatible with the network infrastructure and paths traversed.

Conclusion

Understanding maximum transmission unit size and how to calculate and change it can be valuable for optimizing network performance. By adjusting the MTU size, you can potentially improve data transmission efficiency, throughput, and overall network responsiveness. But it’s also important to consider the specific network environment, device compatibility, and potential limitations when making changes to the maximum transmission unit size. When done thoughtfully, optimizing the maximum transmission unit size can contribute to a smoother and more efficient network experience. 

MTU size is just one of many variables you have to consider when optimizing a flash array. Enlist the help of Pure Professional Services to ensure optimal performance of your Pure Storage deployments. 

Written By: