Sunday, April 29, 2012

Linux Increasing The Transmit Queue Length (txqueuelen)

How do I set txqueuelen (the length of the transmit queue) length of the network card device under Linux? How do I set it for a high latency and/or a high speed network for bulk transfer from disturbing interactive traffic like ssh too much?

You can set the length of the transmit queue of the device using /sbin/ifconfig command as follows:
  1. Small value for slower devices with a high latency like modem links and ISDN.
  2. High value is recommend for server connected over the high-speed Internet connections that perform large data transfers.

Increasing The txqueuelen

Increase the txqueuelength parameter to a value between 1000 and 20000 per interface:
ifconfig ${interface} txqueuelen ${size}
ifconfig eth1 txqueuelen 10000
ifconfig eth0 txqueuelen 5000

Setting the txqueuelen permanently

Edit /etc/rc.locale, enter:
vi /etc/rc.local
Append the following setting per interface:
/sbin/ifconfig eth1 txqueuelen 10000
/sbin/ifconfig eth0 txqueuelen 10000

No comments:

Post a Comment