In this tutorial I will show you the linux Configure Jumbo Frames to Boost Network Performance.
Are file transfers slow on your network? Are you constantly passing data between your computers? Well, maybe jumbo frames are for you.
Jumbo frames are larger than standard network packet payloads. Normally the payload size or MTU(Maximum Transfer Unit) is set to 1500 bytes. Jumbo frames can support to 9000 bytes per packet.
Jumbo frames decrease the overhead associated with transferring files by limiting the number of packets that your networking equipment needs to process.
Set Up Your Network
For jumbo frames to work properly, every device on your network should be configured to use them. That said, if they don’t it’s not the end of the world. A device that doesn’t support them will just break up the packets when they arrive. You should, at very least, configure your router and any switches on your network to use them.
A lot of routers have settings that allow you to change the MTU size. It’s in a different place on every router, but it usually appears in a general settings tab that controls the entire device or network.
When you find it, set it to a value that you think all of your devices can support. Remember, the upper limit for jumbo frames is 9000 bytes.
Check Your MTU size
Now that your network supports jumbo frames, check what your computer is set to. It’s probably 1500 bytes, since that’s the default, but it’s good to make sure.
Everything here is going to be handled with the
ip command. So, use it to check the MTU size allowed by your network interfaces.
$ ip link show | grep mtu
The numbers directly after the
mtu is the value you’re looking for.
Set A New Size
Setting the MTU size is really easy with
ip. You just need to tell it which interface you want to modify and the size you want to set it to.
# ip link set eth0 mtu 9000
You can set every interface on your computer, if your hardware supports it.
# ip link set wlan0 mtu 9000
Make It Permanent
There are a couple of different ways you can make the new MTU size permanent. There is no specific utility for it, but the easiest thing you can do is create a script that runs at startup to set the MTU. If you’re very comfortable working with systemd, you can change the network files it supplies to change the default MTU as well.
Your script should look something like this:
ip link set eth0 mtu 9000;
ip link set wlan0 mtu 9000;
If you’re on systemd, create a simple unit, and set it to run at startup.
OpenRC users can place their script in
/etc/init.d/, and run it as a service at default.
Jumbo frames reduce stress on your network, and can free up your router’s computational resources. They’re not going to make a huge difference in your network speed, but they may reduce the time required for file transfers.