Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2017 14:19:22 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        lev@FreeBSD.org, freebsd-net@freebsd.org, freebsd-stable@freebsd.org
Subject:   Re: Low default setting of UDBHASHSIZE leads to unresponsive system
Message-ID:  <59FAC6FA.3070804@grosbein.net>
In-Reply-To: <f6cb0e2b-1272-c039-1370-1d0c96310aeb@FreeBSD.org>
References:  <f6cb0e2b-1272-c039-1370-1d0c96310aeb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01.11.2017 22:35, Lev Serebryakov wrote:
> 
>  Now 11-STABLE (and 12-CURRENT too) have this:
> 
> sys/netinet/udp_usrreq.c:#define   UDBHASHSIZE     128
> 
>  Looks like such low value could lead to 100% consumption of CPU by
> interrupt threads (igb queues in my case) on heavy incoming UDP traffic
> (torrents with uTP in my case).
> 
>  My system (E3-1220v3 with I210 NICs) becomes completely unresponsive
> (nut complains about lost connection to UPS, ssh to system times out,
> etc) when system downloads torrent with many uTP (UDP) peers. Four igb0
> queues consume 100% CPU each in this scenario.
> 
>  Total traffic could be very low like 500KiB/s (yes, 500KiB/s, not
> MiB/s!), I don't speak about 1Gbit/s or even 100Mbit/s here!
> 
>   Rebuilding kernel with UDBHASHSIZE=16384 seems to help.
> 
>   Why is this value so low and why I need to patch sources to change it?
> Many such settings are changeable via sysctl and/or tunables, but this
> one looks hardcoded.

You should fill a PR. Attach these performance numbers you got.

If possible, attach a patch introducing new loader tunnable, that should be easy.
Keep me CC'd.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?59FAC6FA.3070804>