mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-07 16:08:41 +01:00
added permanent ethtool settings also for fedora or modern rhel
This commit is contained in:
@@ -202,15 +202,54 @@ Receiver PC Tuning Options
|
|||||||
ethtool -K xth1 gro
|
ethtool -K xth1 gro
|
||||||
|
|
||||||
|
|
||||||
* for persistent settings after reboot
|
* **permanent ethtool settings**
|
||||||
|
|
||||||
|
There are two main methods.
|
||||||
|
|
||||||
|
1. ``systemd service`` (recommended for Fedora and modern RHEL)
|
||||||
|
|
||||||
|
This is the preferred method on systems using systemd and NetworkManager, such as Fedora and RHEL 8+.
|
||||||
|
|
||||||
|
Create a systemd service template:
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
# /etc/systemd/system/ethtool@.service
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Set RX buffer size with ethtool
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/ethtool -G %i rx 8192
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
||||||
|
Enable the service for a specific interface:
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# edit /etc/sysconfig/network-scripts/ifcfg-[ethernet interface name]
|
sudo systemctl enable ethtool@xth1.service
|
||||||
# add or modify the following lines
|
|
||||||
|
This ensures the setting is applied at every boot once the network is online.
|
||||||
|
|
||||||
|
|
||||||
|
2. ``ETHTOOL_OPTS in ifcfg scripts`` (legacy method for RHEL 7 and earlier)
|
||||||
|
|
||||||
|
This method applies only to systems using the legacy network-scripts backend, typically RHEL 7 and earlier. It will not apply on systems using NetworkManager, such as modern Fedora or RHEL 8+.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# edit the corresponding ``ifcfg-*`` file
|
||||||
|
# file: /etc/sysconfig/network-scripts/ifcfg-eth0
|
||||||
|
|
||||||
|
# add or modify the following line:
|
||||||
ETHTOOL_OPTS="-K ${DEVICE} gro on; -G ${DEVICE} rx 4096; -L ${DEVICE} combined 4; -C ${DEVICE} rx-usecs 100; -C ${DEVICE} adaptive-rx on"
|
ETHTOOL_OPTS="-K ${DEVICE} gro on; -G ${DEVICE} rx 4096; -L ${DEVICE} combined 4; -C ${DEVICE} rx-usecs 100; -C ${DEVICE} adaptive-rx on"
|
||||||
|
|
||||||
# restart interface ethernet interface
|
# restart the interface
|
||||||
ifdown xth1 && ifup xth1
|
ifdown eth0 && ifup eth0
|
||||||
|
|
||||||
|
|
||||||
#. Disable power saving in CPU frequency scaling and set system to performance
|
#. Disable power saving in CPU frequency scaling and set system to performance
|
||||||
|
|||||||
Reference in New Issue
Block a user