Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Nov 2018 10:44:35 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Wolfgang Zenker <wolfgang@lyxys.ka.sub.org>, freebsd-net@freebsd.org
Subject:   Re: epair(4) and net.route.netisr_maxqlen
Message-ID:  <5afe5838-d2df-009d-af85-99e793f1927c@grosbein.net>
In-Reply-To: <20181111232320.GA87730@lyxys.ka.sub.org>
References:  <20181111232320.GA87730@lyxys.ka.sub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
12.11.2018 6:23, Wolfgang Zenker wrote:

> on a jail with quite a lot of somewhat bursty network traffic I get
> warnings from netdata recently about packets being dropped because of
> net.route.netisr_maxqlen being to small. Before I start setting this
> value to some random value I'ld like to find out what it actually means.
> A search for documentation turned up nothing; a look at the sources
> found that it is used for the size of a "software interrupt queue" in
> epair(4). But what does it mean? And does this give me enough
> information to find a good value to set for this sysctl?

netisr packet queues keep packets received by the interface and
not yet processed by destined subsystem or userland application
that may be short of CPU cycles or blocked for some reason.

First, the system won't allow you to raise net.route.netisr_maxqlen over the limit net.isr.maxqlimit.
The limit itself can be changed with /boot/loader.conf and reboot.
Default value of limit is 10240. I generally raise the limit upto 102400
for hosts with heavy/bursty traffic. Note that actual increase of net.route.netisr_maxqlen
somewhat increases usage of kernel memory and that could be important for 32 bit kernel
and/or system with very low amount of RAM.

There may be several netisr packet queues in the system and raising net.route.netisr_maxqlen
allows all of them to grow. epair(4) has its own setting net.link.epair.netisr_maxqlen
that defaults to net.route.netisr_maxqlen if unset, so you may be start experimenting with
net.link.epair.netisr_maxqlen first, instead of system global net.route.netisr_maxqlen.

Don't set net.route.netisr_maxqlen to random value but double its current value
and see if that would be enough. If not, double it again. If 4096 apears not enough,
you should check your applications why they can't keep with incoming traffic rate.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5afe5838-d2df-009d-af85-99e793f1927c>