Re: output queue size
Re: output queue size
- Subject: Re: output queue size
- From: Terry Lambert <email@hidden>
- Date: Tue, 23 Sep 2008 14:46:40 -0700
On Sep 23, 2008, at 9:44 AM, Michael Tüxen wrote:
Dear all,
is there a way to look at the output queue sizes of ethernet
interfaces?
And can I configure these sizes?
Do you mean the MTU or do you mean the ring buffer size?
The MTU is negotiated with the other end of the wire, and can be set
lower, but generally not higher unless you use jumbograms and both
ends of the wire support the same implementation of jumbograms. You
can get the MTU via the IO Registry, the ifconfig command, or via
ioctl() to a control socket for the device.
The ring buffer size is an artifact of the supported division between
transmit and receive buffers in the chipset (the chipset vendor
generally documents this in their technical reference) and the choices
made by the driver author in selecting control register values for the
chip. The internal ring buffer depends on the allocation of available
mbufs as dma targets and the number of headers supported by the chip,
and out of those, how many the driver author chose to use. The socket
send buffer depth is set on a per socket basis; the default value is
set via sysctl, and there are setsockopt() values to alter this up or
down, with a top limit at the hard limit. Out of these, the only
thing you can examine/set without bit-banging or being the driver
author is going to be the per-socket send and receive queue sizes,
unless there is a documented vendor private control message (as far as
I know, there are none that have been defined by any network adapter
vendor I am aware of).
Generally the thing that matters to most people is the per socket send/
receive queue depth, since that's going to be the limiting factor on
how much data you can write at once before your write is blocked, and
the other limiting factor will be the MTU, since the network stack is
never going to try and send more than that to the card at a time for a
given socket, or how much will be available to read, maximum.
-- Terry _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden