# txqueuelen in /etc/conf.d/net?

## dufeu

I'm finally re-visiting my 10G nic configurations in my server and workstation.

Each PC has a Mellanox 10G card connected to SPF+ ports on a switch in the same rack.

I currently have the following configuration to support my usage and faster speed:

Custom sysctl.conf settings

```
#       net.core.rmem_max = 212992  # as initialized by kernel

#       net.core.wmem_max = 212992  # as initialized by kernel

#       -->     for 10G nics - use 16MB, 32MB for long end to end 10G paths

#               in addition, use ifconfig (or similar) to increase txqueulen for 10G nics.

#               set this in equivalent to /etc/rclocal

#                       ifconfig $NIC txqeuelen 10000

#                       ip link set $NIC txqueuelen 10000

net.core.rmem_max = 16777216

net.core.wmem_max = 16777216
```

Custom /etc/conf.d/net configuration. Note that I support up to 3 VMs as normal members of my local LAN.

```
#       single physical nic bridged configuration - intended

#       for vm hosts - in this configuration, we want to support

#       transparent access between vm clients and other devices

#       on the LAN - assumes vm clients are similarly trusted

#               eth0 =  motherboard buil-in 1G nic - leave down

#               eth1 =  melonix 10G add-on nic - in use

#

#               set all physical nics to be not needed/required

#               for network connected services - we'll be using

#               'br0' instead

#

rc_net_lo_provide="!net"

rc_net_eth0_provide="!net"

rc_net_eth1_provide="!net"

config_eth0=null

config_eth1=null

#

#       tun/tap - like eth# above - null defined to avoid DHCP

#               tap# =  need 1 for each concurrent guest session

#                       remaining lines assume single vm session

#       each 'tap#' represents 1 vm session - tap# assignment is done

#       through QEMU invocation using '-net' or '-netdev'

#

#       your installation may mot have /dev/net installed or, it

#       may not have the special mode /dev/net/tun file - it only

#       needs to be created 1 time (from 'root' or sudo):

#               mkdir /dev/net ; mknod /dev/net/tun c 10 200

#

tuntap_tap0="tap"

tuntap_tap1="tap"

tuntap_tap2="tap"

config_tap0=null

config_tap1=null

config_tap2=null

#

#               set bridge address - 'eth1' will service the bridge

#

rc_net_br0_need="net.eth1 net.tap0 net.tap1 net.tap2""

config_br0="192.168.1.200/24"

routes_br0="default via 192.168.1.1"
```

Can I add 'txqueuelen' to /etc/conf./net? If so, do I add it just to 'br0' or to both 'br0' and 'eth1'?

If I can't add txqueuelen to /etc/conf.d/net, should I add 'ip link set br0 txqueuelen 10000' to /etc/rc.conf? Again, if I add the command for 'br0' to /etc/rc.conf, do I also need to add a command for 'eth1'?

----------

## Gatak

You would set it in /etc/conf.d/net using

```
txqueuelen_eth0="10000"
```

But really, isn't 10000 packets a lot? Perhaps look into if byte queue limits can be more useful for your application instead?

----------

