SUSE Support

Here When You Need Us

How to set txqueuelen (transmit queue length) for a network interface using the udev rule method?

This document (000019932) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12

Situation

The txqueuelen (transmit queue length) of a network interface needs to be set automatically when the system boots up using the udev rule method.

Resolution

For example, to set the txqueuelen for the following network interface "eth0" to 10000:
  # /sbin/ip address show eth0
  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:35:79:97 brd ff:ff:ff:ff:ff:ff
    inet 192.168.17.135/24 brd 192.168.17.255 scope global eth0

    ...

Configure the udev rule in the file "/etc/udev/rules.d/70-persistent-net.rules" to the following:
  SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0C:29:35:79:97", KERNEL=="eth*", NAME="eth0", ATTR{tx_queue_len}="10000"

Cause

The required txqueuelen value of a network interface needs to be set to improve performance.
Using the udev rule method is a way to automatically set the txqueuelen value when the system boots up.

Status

Top Issue

Additional Information

1. The txqueuelen can be also be set using the "ifconfig" or "ip" command after the system boots up.
   For example:
     ifconfig eth0 txqueuelen 10000
     ip link set dev eth0 txqueuelen 10000



2. Take note that the name for the txqueuelen setting used by the "ifconfig", "ip" and "systool" commands are "txqueuelen", "qlen" and "tx_queue_len" respectively.
   For example:
     # /sbin/ifconfig eth0
     eth0  Link encap:Ethernet  HWaddr 00:0C:29:35:79:97  
           inet addr:192.168.17.135  Bcast:192.168.17.255  Mask:255.255.255.0
     ...
           collisions:0 txqueuelen:10000 


  # /sbin/ip address show eth0
  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 10000
    link/ether 00:0c:29:35:79:97 brd ff:ff:ff:ff:ff:ff
    inet 192.168.17.135/24 brd 192.168.17.255 scope global eth0
    ...


  # /usr/bin/systool -vc net eth0
  Class = "net"
    Class Device = "eth0"
    Class Device path = "/sys/devices/pci0000:00/0000:00:11.0/0000:02:01.0/net/eth0"
      addr_assign_type    = "0"
      addr_len            = "6"
      address             = "00:0c:29:35:79:97"
      broadcast           = "ff:ff:ff:ff:ff:ff"
      ...
      tx_queue_len        = "10000"
      ...



3. Take note that "ifconfig" command is deprecated since SLES 15.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000019932
  • Creation Date: 26-Mar-2021
  • Modified Date:14-Apr-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.