From owner-freebsd-net@freebsd.org Wed Jun 14 16:44:39 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEC81BEF212 for ; Wed, 14 Jun 2017 16:44:39 +0000 (UTC) (envelope-from jim@netgate.com) Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCD35709EC for ; Wed, 14 Jun 2017 16:44:39 +0000 (UTC) (envelope-from jim@netgate.com) Received: by mail-oi0-x22a.google.com with SMTP id k145so3863711oih.3 for ; Wed, 14 Jun 2017 09:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netgate.com; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=g4igfzHqJeOEqCfuaAjt1VmpVJPCLU6TV3BGOOm2I4c=; b=IWlPZ9ZDtO0oLi1UDYqcNh43dXna2NFckznVr5x8prbenIIfjUBK3ZNaDW9obLFRW3 w4MfrUJLb5wHLEuTEzkkTy/PAQiU9jKyVS4Kj+1U6j6bEctOHW+nC6Vy2mS3RN4CFoM5 LkQVcjzz7CYvuRTeXpUyCls04zzyXlT1Sqryg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=g4igfzHqJeOEqCfuaAjt1VmpVJPCLU6TV3BGOOm2I4c=; b=U9Bo8b1XkaJbZshOew1CndaU5N1/YkSwByaHizTiQGvc9gFbhZScMm/PP7/+qOYhTw FLF4Pius6B+YCfdT94uJRDjqmhhwRRE3aT9OeXQDEDj7YT9NorGnEIl3Hh3TWv6k4FYI moFWAbtnNSaoU7KJZNnWAeGNiL9n6kluwIUod0b0I4+kJili8BV9Yb2yS6bXKhSUUDXS S9iRry3p8guoOnyYX6eFQiiemgNDJBaN5S6A3ETSMXBkaV7oFiMCEKAbDBPqQQz8O+AW 7+HtwqY9d1a1pTfLPtCCIyz/fkSVVyUXNq+9vDu4jkVvCyKRr7U67RfhwHNNaEbgVaxg sR4g== X-Gm-Message-State: AKS2vOzdapGLdbZO5znRfDEgQnnijW2qjp7vy8fAVbJp3xYHz0KHYH0n jk5xxaGXnZIaNDYl7xyA0g== X-Received: by 10.202.58.136 with SMTP id h130mr745735oia.62.1497458678905; Wed, 14 Jun 2017 09:44:38 -0700 (PDT) Received: from [172.27.33.51] ([208.123.73.28]) by smtp.gmail.com with ESMTPSA id 67sm260410ott.40.2017.06.14.09.44.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jun 2017 09:44:38 -0700 (PDT) From: Jim Thompson Message-Id: <64C72460-54F3-481B-9A2C-044822F6F52B@netgate.com> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: state of packet forwarding in FreeBSD? Date: Wed, 14 Jun 2017 11:44:35 -0500 In-Reply-To: Cc: FreeBSD Net To: John Jasen References: X-Mailer: Apple Mail (2.3273) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2017 16:44:40 -0000 > On Jun 14, 2017, at 9:48 AM, John Jasen wrote: >=20 > Our goal was to test whether or not FreeBSD currently is viable, as = the > operating system platform for high speed routers and firewalls, in the > 40 to 100 GbE range. We recently showed IPsec running at 36.32Gbps (8 streams, 32.68Gbps = single stream). =20 At 36.32Gbps, we were limited by the 40Gbps cards we used. (Framing overheads take up about 10% of the bandwidth.) = https://conferences.oreilly.com/oscon/oscon-tx/public/schedule/detail/5672= 7 = We can send 64 byte tiny grams through the tunnel at 10.45 Mpps with = AES-128-CBC + HMAC-SHA1. AES-128-GCM performance is 32.98Gbps (4 = streams, 32.72Gbps single-stream). Hardware used was essentially an =E2=80=9Cultimate white box router=E2=80=9D= : https://www.netgate.com/blog/building-a-behemoth-router.html = with = Intel xl710 NICs and 8955 CPIC QAT cards. The same hardware will l3 forward 42.6Mpps (64 byte packets). It can = forward 14.05Mpps on a single core. No tuning was done in the above, = just bringing up VPP configuring the interfaces and SPDs, and running = iperf3 or (DPDK=E2=80=99s) pkggen on a pair of outside =E2=80=98hosts=E2=80= =99. It=E2=80=99s likely that we can get the 42.6Mpps figure higher. In other tests on smaller (Atom 8 core) hardware we=E2=80=99ve achieved = 12Mpps l3 forwarding with a full BGP routing table. Likely that we can = achieve even higher PPS results with a bit more tuning work. Using Olivier Couchard-Labb=C3=A9=E2=80=99s =E2=80=9Cestimated IMIX=E2=80=9D= (PPS * ( 7*(40+14) + 4*(576+14) + (1500+14) )/12*8), one only needs = 27Mpps to fill a 100Gbps interface. We have a couple larger machines with unreleased Xeons in them, 4 = 100gbps NICs, and some =E2=80=9Cnext generation=E2=80=9D QAT cards that = Intel says are good for 100Gbps encryption offload. We plan to re-run = the tests at 100Gbps sometime this summer. These results are all on Linux, using VPP over DPDK, but nothing really = restricts that work from moving back to FreeBSD. VPP also supports = netmap, but we=E2=80=99ve not attempted any performance work using the = netmap interfaces as yet. = https://fd.io/news/announcement/2017/06/fast-data-fdio-project-issues-four= th-release-furthers-position-universal = gnn@ was working on such a port for us, but other things took over his = time. https://github.com/gvnn3/vpp . = I=E2=80=99m sure we=E2=80=99ll get back to it. (This is all the basel for our =E2=80=9Cnext generation pfSense=E2=80=9D, = btw.) > In our investigations, we tested 10.3, 11.0/-STABLE, -CURRENT, and a = USB > stick from BSDRP using the FreeBSD routing improvements project > enhancements (https://wiki.freebsd.org/ProjectsRoutingProposal). >=20 > We've tried stock and netmap-fwd, have played around a little with > netmap itself and dpdk, with the results summarized below. The current > testing platform is a Dell PowerEdge R530 with a Chelsio T580-LP-CR = dual > port 40GbE card. >=20 > Suggestions, examples for using netmap, etc, all warmly welcomed. >=20 > Further questions cheerfully answered to the best of our abilities. >=20 > a) On the positive side, it appears that 11.0 is much faster than = 10.0, > which we tested several years ago. With appropriate cpuset tuning, 5.5 > mpps is achievable using modern hardware. Using slightly older = hardware, > (such as a Dell R720 with v3 xeons), around 5.2-5.3 mpps can be = obtained. >=20 > b) On the negative side, between the various releases, netmap appeared > to be unstable with the Chelsio cards -- sometimes supported, = sometimes > broken. Also, we're still trying to figure out netmap utilities, such = as > vale-ctl and bridge, so any advice would be appreciated. >=20 > b.1) netmap-fwd is admittedly single-threaded and does not support = IPv6. There is a version of netmap-fwd (not on GitHub) that supports IPv6, and = has some early work on threading. Unfortunately netmap bugs stopped the threading work. The developer (loos@) recently updated netmap in -CURRENT based on a = patch from Vincenzo Maffione. BTW, we=E2=80=99ve seen over 5mpps using netmap-fwd using a (single core = of a) E3-1275. See around 17:07 = https://www.youtube.com/watch?v=3DcAVgvzivzII > These clearly showed in our tests, as we were unable to achieve over = 2.5 > mpps, saturating a single CPU and letting the others fall asleep. > However, bumping a single CPU queue from around 0.6 mpps to 2.5 mpps = is > nothing to ignore, so it could be useful in some cases. >=20 > c) The routing improvement project USB stick performed incredibly, > achieving 8.5 mpps out of the box. However, it appears > (https://wiki.freebsd.org/ProjectsRoutingProposal/ConversionStatus), > that many of the changes are still pending review, and that things = have > not moved much in the last 18 months > (https://svnweb.freebsd.org/base/projects/routing/) >=20 > d) We've not figured out dpdk (dpdk.org) yet. Our first foray into = the > test examples, and we're stuck trying to get the interfaces online. DPDK on FreeBSD is a bit of a mess. Jim =20=