1

How can I set the transmit queue length for a network interface on OS X? On linux the command would be:

ifconfig en0 txqueuelen 5

but OS X doesn't recognize txqueuelen as a valid option (nowhere mentioned in the man, nor an equivalent). Where does OS X manage this kind of configuration?

Note: might be similar on BSD system...

4
  • Can you please explain your note? Might the answer you are looking for similar to an answer for BSD systems?
    – guwac
    Nov 7, 2012 at 19:47
  • 1
    Basically, OS X is based on a kernel (Darwin) which derives from one of the BSD UNIX (FreeBSD, NetBSD, etc. I don't remember which one) and OS X uses many of the BSD tools, ifconfig and sysctl being one of them. So for me OS X is just another BSD UNIX flavour, and the command to change the network interface buffer should be identical on FreeBSD and OS X.
    – Huygens
    Nov 7, 2012 at 21:55
  • 1
    Thank you for the explanation. This might help to find and understand possible answers. Thus, +1 for the comment.
    – guwac
    Nov 7, 2012 at 21:58
  • 2
    There's a duplicate question (with a few answers): superuser.com/questions/322027/…
    – Pierz
    Jun 12, 2019 at 16:05

1 Answer 1

1

To set the default transmit queue: (e.g to 150 packets):

sysctl -w net.link.generic.system.sndq_maxlen=150

and default receive queue: (e.g to 260 packets)

sysctl -w net.link.generic.system.rcvq_maxlen=260

To check the system defaults queue sizes for send and receive (current defaults on MacOSX10.4 are 128 (send) and 256 (recv) respectively):

sysctl net.link.generic.system.sndq_maxlen
sysctl net.link.generic.system.rcvq_maxlen

It's unclear if it is possible to set a per interface queue length. The output queue length's default is set in the [xnu] kernel: bsd/net/if.h:#define IFQ_MAXLEN 128

On older kernels (OSX10.7) you could to set the maximum input queue length on OSX as follows (e.g. to 100 packets) - which can be useful for tuning performance with incoming packets flows - it's the internal queue that packets are put when they come off the incoming interface:

sysctl -w net.inet.ip.intr_queue_maxlen=100

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .