Changing TX and RX network interface buffers in Linux

Install ethtool if it is not installed:

sudo apt-get install ethtool

Let’s look at the names of the network interfaces:

ifconfig -a

Let’s see if the packets are lost, for example, if a large traffic passes through the server, then the value of “missed” can increase:

ip -s -s link show

If lost, then let’s see the current and maximum size of TX and RX buffers:

ethtool -g eth0

If necessary, change the maximum size (the changes will be reset after rebooting the server):

sudo ethtool -G eth0 rx 512
sudo ethtool -G eth0 rx 512 tx 512

To make changes after the server restart, I opened the file (in the nano editor, Ctrl + O is used to save the changes, Ctrl + X to exit):

sudo nano /etc/network/interfaces

And added a line:

post-up /sbin/ethtool -G eth0 rx 512 tx 512

Done, after the server was restarted, the values were the ones that you need.

See also:
Configuring the Network in Linux

Leave a Reply