Change Txqueuelen Under Linux

How do I change txqueuelen (transmit queue) under Linux for eth0 card to improve performance? How can I modify txqueuelen of my network interface card (NIC) under Debian or Ubuntu Linux?

Let us see how to modify txqueuelen value for given network interface card (NIC) on RHEL, Fedora, Ubuntu, and Debian Linux.
Tutorial details
Difficulty Easy (rss)
Root privileges Yes
Requirements Linux with ip command
Time 1m

How to modify txqueuelen network interface card (NIC) values

You need to type the following command to set txqueuelen under Linux (the following will set it to 10000):
ifconfig eth0 txqueuelen 10000
OR use the ip command:
# ip link set eth0 txqueuelen 10000
A value between 1000 and 20000 per interface is recommended. The txqueuelen parameter to ifconfig set the length of the transmit queue of the device.

Change Txqueuelen Under Linux permanently

Edit the /etc/network/interfaces under Debian or Ubuntu Linux. For instance:
vim /etc/network/interfaces
And add at the end of the line for your interface:
post-up /sbin/ip link set eth0 txqueuelen 10000
Here is how it looked:

auto eth0
iface eth0  inet static
 dns-domain sweet.home
 post-up /sbin/ip link set eth0 txqueuelen 10000

After the Linux system was rebooted, the txqueuelen value is set to 10000 for eth0 network interface on my Debian Linux 10 server. See “How to set up static IP address on Debian Linux 10/11” for more information on the /etc/network/interfaces config options.

Setting up txqueuelen for network interface card under RHEL or CentOS Linux

Edit or create a new file called /sbin/ifup-local
# vim /sbin/ifup-local
Append the following code:

/sbin/ip link set dev eth0 txqueuelen 10000

Make sure you set up executable permissions using the chmod command:
# chmod +x /sbin/ifup-local
I tested above config on CentOS and Red Hat Enterprise Linux version 5/6/7.


The queue length set up using the ip command or ifconfig command. The txqueuelen set up the length of the transmit queue (qdisc) of the device. Typically we set up small values for slower network interfaces with high latency. If packets are dropping, then we set up large values for NIC. Of course, you need to test your setup with various values.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Thiago Rodrigues Feb 19, 2021 @ 20:43

    Realizar essa alteração. Quando reiniciei minha maquinha voltou para configuração antiga que era ip link set eth0 txqueuelen 1000.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @