Chapter 34. Configuring ethtool coalesce settings
Using interrupt coalescing, the system collects network packets and generates a single interrupt for multiple packets. This increases the amount of data sent to the kernel with one hardware interrupt, which reduces the interrupt load, and maximizes the throughput.
This section provides different options to set the
ethtool coalesce settings.
34.1. Coalesce settings supported by NetworkManager
You can set the following
ethtool coalesce settings using NetworkManager:
34.2. Configuring ethtool coalesce settings using NetworkManager
This section describes how to set
ethtool coalesce settings using NetworkManager, as well as how you remove the setting from a NetworkManager connection profile.
For example, to set the maximum number of received packets to delay to
enp1s0connection profile, enter:
nmcli connection modify enp1s0 ethtool.coalesce-rx-frames 128
To remove a coalesce setting, set the setting to
ignore. For example, to remove the
nmcli connection modify enp1s0 ethtool.coalesce-rx-frames ignore
To reactivate the network profile:
nmcli connection up enp1s0
ethtool -ccommand to display the current offload features of a network device:
ethtool -c network_device
34.3. Using System Roles to configure ethtool coalesce settings
You can use the
networking RHEL System Role to configure
ethtool coalesce settings of a NetworkManager connection.
When you run a play that uses the
networking RHEL System Role, the System Role overrides an existing connection profile with the same name if the settings do not match the ones specified in the play. Therefore, always specify the whole configuration of the network connection profile in the play, even if, for example the IP configuration, already exists. Otherwise the role resets these values to their defaults.
Depending on whether it already exists, the procedure creates or updates the
enp1s0 connection profile with the following settings:
A static IPv4 address -
A static IPv6 address -
An IPv4 default gateway -
An IPv6 default gateway -
An IPv4 DNS server -
An IPv6 DNS server -
A DNS search domain -
- RX frames:
rhel-system-rolespackages are installed on the control node.
If you use a different remote user than root when you run the playbook, this user has appropriate
sudopermissions on the managed node.
If the host on which you want to execute the instructions in the playbook is not yet inventoried, add the IP or name of this host to the
/etc/ansible/hostsAnsible inventory file:
~/configure-ethernet-device-with-ethtoolcoalesce-settings.ymlplaybook with the following content:
--- - name: Configure an Ethernet connection with ethtool coalesce settings hosts: node.example.com become: true tasks: - include_role: name: linux-system-roles.network vars: network_connections: - name: enp1s0 type: ethernet autoconnect: yes ip: address: - 198.51.100.20/24 - 2001:db8:1::1/64 gateway4: 198.51.100.254 gateway6: 2001:db8:1::fffe dns: - 198.51.100.200 - 2001:db8:1::ffbb dns_search: - example.com ethtool: coalesce: rx_frames: 128 tx_frames: 128 state: up
Run the playbook:
To connect as
rootuser to the managed host, enter:
ansible-playbook -u root ~/configure-ethernet-device-with-ethtoolcoalesce-settings.yml
To connect as a user to the managed host, enter:
ansible-playbook -u user_name --ask-become-pass ~/configure-ethernet-device-with-ethtoolcoalesce-settings.yml
--ask-become-passoption makes sure that the
ansible-playbookcommand prompts for the
sudopassword of the user defined in the
If you do not specify the
ansible-playbookconnects to the managed host as the user that is currently logged in to the control node.