Preferred Method to Make ethtool Changes Persistent Across Reboots and Updates?

mhayhurst

Active Member
Jul 21, 2016
98
4
28
41
Hello everyone!

I've had to make several configuration changes using ethtool in order to increase my network performance in Proxmox 7.1-10. What is the preferred method to make ethtool changes permanent so they will persist across reboots as well as updates?

Here are the changes I made using ethtool:

Bash:
ethtool -K enp1s0 rx-checksumming on

ethtool -K enp1s0 tx-checksumming on

ethtool -K enp1s0 tx-checksum-ip-generic on

ethtool -K enp1s0 scatter-gather on

ethtool -K enp1s0 tcp-segmentation-offload on
 

Dunuin

Famous Member
Jun 30, 2020
6,716
1,557
149
Germany
You could for example add the command to the crontab with something like this:
@reboot ethtool -K enp1s0 rx-checksumming on > /dev/null 2>&1

Or you can add the commands to your /etc/network/interfaces using the "pre-up" so the command will be run right before your enp1s0 NIC will be upped:
Code:
auto enp1s0
iface enp1s0 inet manual
    pre-up ethtool -K enp1s0 rx-checksumming on
    pre-up ethtool -K enp1s0 tx-checksumming on
    pre-up ethtool -K enp1s0 tx-checksum-ip-generic on
    pre-up ethtool -K enp1s0 scatter-gather on
    pre-up ethtool -K enp1s0 tcp-segmentation-offload on
 
Last edited:

spirit

Famous Member
Apr 2, 2010
5,684
625
133
www.odiso.com
if you use ifupdown2 (default on proxmox7),
it's already support some of ethtool options (mainly offloading)

https://github.com/CumulusNetworks/...2f78f2cc76a2bc507/ifupdown2/addons/ethtool.py

so /etc/network/interfaces
(and you can use "pre-up ethtool -k ..." for unsupported options)

Code:
auto enp1s0
iface enp1s0 inet manual
   tso-offload on
    pre-up ethtool -K $IFACE rx-checksumming on
    pre-up ethtool -K $IFACE tx-checksumming on
    pre-up ethtool -K $IFACE tx-checksum-ip-generic on
    pre-up ethtool -K $IFACE scatter-gather on
 
Last edited:
  • Like
Reactions: Stoiko Ivanov

mhayhurst

Active Member
Jul 21, 2016
98
4
28
41
I have two Linux Bridges: vmbr0 (enp2s0f0=LAN) and vmbr1 (enp1s0=WAN) so added this in /etc/network/interfaces:

Bash:
iface enp1s0 inet manual
    pre-up ethtool -K $IFACE rx-checksumming on
    pre-up ethtool -K $IFACE tx-checksumming on
    pre-up ethtool -K $IFACE tx-checksum-ip-generic on
    pre-up ethtool -K $IFACE scatter-gather on
    pre-up ethtool -K $IFACE tcp-segmentation-offload on

iface enp2s0f0 inet manual
    pre-up ethtool -K $IFACE rx-checksumming on
    pre-up ethtool -K $IFACE tx-checksumming on
    pre-up ethtool -K $IFACE tx-checksum-ip-generic on
    pre-up ethtool -K $IFACE scatter-gather on
    pre-up ethtool -K $IFACE tcp-segmentation-offload on

My throughput has greatly increased and it's back to how it use to be. However, I now have this weird issue with RDP sessions intermittently crashing. I have a 24x7 RDP session open on my laptop and this error did not start happening until after these network changes.

1645719531671.png
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!