[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <65634d660804281051i1ce3deb1m626bb9b64473b536@mail.gmail.com>
Date: Mon, 28 Apr 2008 10:51:12 -0700
From: "Tom Herbert" <therbert@...gle.com>
To: "David Miller" <davem@...emloft.net>
Cc: andi@...stfloor.org, johnwheffner@...il.com, rick.jones2@...com,
netdev@...r.kernel.org
Subject: Re: Socket buffer sizes with autotuning
> > If NIC is interrupt driven, enough data must be queued to span
> > consecutive interrupts. So for instance if a 10G NIC is generating an
> > interrupt every 100us, about 125,000 bytes needs to queued at each
> > interrupt to prevent starvation-- this doesn't translate to a fixed
> > number of packets. Limiting by packets seems somewhat ad hoc; if the
> > limit is to small and the link will be starved, too big and
> > over-queuing results.
>
> Yes, however when packets are small the limiting factor becomes
> per-transfer transaction related overhead.
>
The gist of our algorithm is to determine when the device has been
starved (ie. when all packets queued to the device have been sent, and
there are packets ready in host queues). When the device is starved,
the byte limit is increased by some amount; if the device is not
starved, the byte limit is decreased by an amount subject to some
mechanisms to prevent hysteresis. If throughput is less than line
rate, because of small packets for example, the byte limit will
decrease accordingly since fewer packets are needed to be queued to
prevent starvation. This algorithm requires no a priori knowledge of
link speed or interrupt rate, it will adjust the byte queue limit to
such variable parameters.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists