Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Nov 2017 18:35:43 +0300
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        freebsd-net@freebsd.org, freebsd-stable@freebsd.org
Subject:   Low default setting of UDBHASHSIZE leads to unresponsive system
Message-ID:  <f6cb0e2b-1272-c039-1370-1d0c96310aeb@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--wit383s75hew81jjR4RBrW6HQK8cBIgFB
Content-Type: multipart/mixed; boundary="wjfLrliuG7HlGAqsBuXDWuLl3TCuIwtfX";
 protected-headers="v1"
From: Lev Serebryakov <lev@FreeBSD.org>
Reply-To: lev@FreeBSD.org
To: freebsd-net@freebsd.org, freebsd-stable@freebsd.org
Message-ID: <f6cb0e2b-1272-c039-1370-1d0c96310aeb@FreeBSD.org>
Subject: Low default setting of UDBHASHSIZE leads to unresponsive system

--wjfLrliuG7HlGAqsBuXDWuLl3TCuIwtfX
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable


 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=3D16384 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.

--=20
// Lev Serebryakov


--wjfLrliuG7HlGAqsBuXDWuLl3TCuIwtfX--

--wit383s75hew81jjR4RBrW6HQK8cBIgFB
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEE+W0coLX0MYtnSzMK6rA8WL/cR48FAln56c9fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5
NkQxQ0EwQjVGNDMxOEI2NzRCMzMwQUVBQjAzQzU4QkZEQzQ3OEYACgkQ6rA8WL/c
R4/rQQ/8CsqPftmBflc7rJGdKg6vg+lKqPu4hG58x6I/8Iia6+r+m3XYSbOiyK6F
LRNABz6AcEutv/6ctAchX9Gs+zvtP7qylowqxypJG+BoIXEIXFfrbn1B+yMJ2Tws
7M9EcpRxuHKIdzq5QHq3d/3w3h1muzL9z6V1k451UXfyJkGJXeYLtiuPqZGAJ90L
6lOi6NkE9Q8mc0OqhnIEfedXIVLN28OTlItSGHjKGKt2XSUGEvysy4WhLtXTIaF1
B66M5mPSqKhaexKiIiNKMzA5bw+Rh98HMo2u6+6nhh8JxVnmNPd0GDj/ziAuXNE2
zkiCqjOiU4h3yh6AqwJ0OC7pGMlIYy5Dm4TmSG055hV5SsO0045NucNJJXLOmuH6
/WHibM6xcLKqVmlQR2i9cMhlSwXQh4SlWNWe2gXsEc3XbF95ToACR4Jxrk3AKA8f
2m53K2Q3Sqsh26d4UCCNYQeVA0hwLOkRFihmZVH8u7L8/vXlxtB+n8CU4JfP0+Ri
txyVgDo2hTD4JuNXGzB9d1Hvl9+Fi/Qbb6+fWardwdKewvNzXZuUcWzInvc/41vw
LYqQPeTWO8G+2fPzP4uhZFizvsSyQm1jxwXBh3XtMJ0a7NrwJDhil0tKl5kpqVSU
OvxxJHvBuMGfq6/bjJ3RUEXCmFzd+LMn+UrliZhAa4Eut+ybN7I=
=jvBK
-----END PGP SIGNATURE-----

--wit383s75hew81jjR4RBrW6HQK8cBIgFB--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f6cb0e2b-1272-c039-1370-1d0c96310aeb>