]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove IPSEC from GENERIC due to performance issues
authorgallatin <gallatin@FreeBSD.org>
Thu, 9 May 2019 22:38:15 +0000 (22:38 +0000)
committergallatin <gallatin@FreeBSD.org>
Thu, 9 May 2019 22:38:15 +0000 (22:38 +0000)
commitd0514c054297cad36305407bbcf5281cf3157ca8
treef93889921a4834755e0223e0bf2624a89e1f936e
parent6e6b09f5c19b08ee74054576b4f936b487793527
Remove IPSEC from GENERIC due to performance issues

Having IPSEC compiled into the kernel imposes a non-trivial
performance penalty on multi-threaded workloads due to IPSEC
refcounting. In my benchmarks of multi-threaded UDP
transmit (connected sockets), I've seen a roughly 20% performance
penalty when the IPSEC option is included in the kernel (16.8Mpps
vs 13.8Mpps with 32 senders on a 14 core / 28 HTT Xeon
2697v3)). This is largely due to key_addref() incrementing and
decrementing an atomic reference count on the default
policy. This cause all CPUs to stall on the same cacheline, as it
bounces between different CPUs.

Given that relatively few users use ipsec, and that it can be
loaded as a module, it seems reasonable to ask those users to
load the ipsec module so as to avoid imposing this penalty on the
GENERIC kernel. Its my hope that this will make FreeBSD look
better in "out of the box" benchmark comparisons with other
operating systems.

Many thanks to ae for fixing auto-loading of ipsec.ko when
ifconfig tries to configure ipsec, and to cy for volunteering
to ensure the the racoon ports will load the ipsec.ko module

Reviewed by: cem, cy, delphij, gnn, jhb, jpaetzel
Differential Revision: https://reviews.freebsd.org/D20163
UPDATING
sys/amd64/conf/GENERIC
sys/arm/conf/std.armv6
sys/arm/conf/std.armv7
sys/arm64/conf/GENERIC
sys/i386/conf/GENERIC
sys/powerpc/conf/GENERIC
sys/powerpc/conf/GENERIC64
sys/riscv/conf/GENERIC
sys/sparc64/conf/GENERIC