Listen queue overflow: N already in queue awaiting acceptance

Luigi Rizzo rizzo at
Fri Jul 12 09:57:55 UTC 2013

On Fri, Jul 12, 2013 at 12:25:27PM +0400, Gleb Smirnoff wrote:
> On Thu, Jul 11, 2013 at 05:43:09PM +0200, Andre Oppermann wrote:
> A> I'm currently looking into a) applying a rate limiter to the message (as suggested
> A> by Luigi); and b) add a per-socket accept queue overflow statistic that is visible
> A> via netstat.  I'll post patches for testing when done.
> What about the following generic idea: syslogd periodically queries the kernel
> about various error counters, and remembers the values. Those, that increased since
> previous query are logged.
> This can be implemented in different ways, either syslogd knows all the sysctls,
> or kernel "pushes" a list of values to syslogd. These are details to be discussed.
> What do you think about the plan itself?

good idea in principle as it enables global throttling of
messages and reduces the overhead ih the error path.

However sounds complex in practice, as counters can be created
dynamically (sysctl_add*() and friends), and are spread all
over the place and with different methods.
So the "pull" model (sysctl performs a scan to request values)
will perform poorly. Just think of how expensive is to try and
pull all the unchanged counters.

Gleb, what is your intended goal ?

global throttling ? this can probably be implemented
still using the push model, with a
variations of the macros I proposed (and some machinery to make
sure that messages do not starve because someone else is taking up
all the space; that is basically a trivial scheduler)

delegating the sprintf to sysctl ? that is harder i believe,
because you'd need some way to store the values used to build
the message.

> -- 
> Totus tuus, Glebius.
> _______________________________________________
> freebsd-net at mailing list
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at"

More information about the freebsd-net mailing list