How can I set the transmit queue length for a network interface on Mac OSX? On linux the command would be
ifconfig en0 txqueuelen 5
but OSX doesn't recognize txqueuelen as a valid option. Where does BSD manage this kind of configuration?
As far as I can tell it's not possible to explicitly set the output queue length (it seems to be hard-coded in the xnu kernel: bsd/net/if.h:#define IFQ_MAXLEN 50).
But you can 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:
Usually, 'sysctl' is used for tuning TCP parameters. I looked through the output of
and while I don't see anything that might be an exact match, there are a few possible parameters. I must point out that BSD and Linux differ greatly in their internals, and there might not be an analogous txqueuelen adjustment. (ie: the paradigm may not apply to MacOS's networking implementation)