From owner-freebsd-net@freebsd.org Thu Jul 16 08:50:20 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2482435B1D8 for ; Thu, 16 Jul 2020 08:50:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6nyN080Dz4GBn; Thu, 16 Jul 2020 08:50:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id C34022B974; Thu, 16 Jul 2020 08:50:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 046BF1C7CA; Thu, 16 Jul 2020 10:50:17 +0200 (CEST) From: "Kristof Provost" To: "Patrick Lamaiziere" Cc: "Eugene Grosbein" , freebsd-net@freebsd.org Subject: Re: poor performance with Intel X520 card Date: Thu, 16 Jul 2020 10:50:17 +0200 X-Mailer: MailMate (1.13.1r5671) Message-ID: <0B227515-A53A-4354-86C5-EADFEDC65CAD@FreeBSD.org> In-Reply-To: <20200716095732.728c0917@mr185033.univ-rennes1.fr> References: <20200710084530.777ce321@mr185033.univ-rennes1.fr> <7b994967-17cd-8f4f-cb4d-8fcff349f7e9@grosbein.net> <20200716095732.728c0917@mr185033.univ-rennes1.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 08:50:20 -0000 On 16 Jul 2020, at 9:57, Patrick Lamaiziere wrote: > On Wed, 15 Jul 2020 17:07:23 +0700 > Eugene Grosbein wrote: > > Hello, > >>> That is mostly for the record but it looks like the intel X520 is >>> not very good and generates a high level of interrupts. >>> >>> On a router / firewall with 500 Kpps in input (dropped by pf) is >>> enough to put the CPUs at 100% busy. >> >> [skip] >> >>> Well, do you think another NIC cards can help to reach a better pps >>> rate ? I think 500 Kpps is quite low for such a machine. >> >> I'm sure pf is the bottle-neck. Try testing such card without any >> packet filter enabled and you'll see great difference definitely. > > That's not a good news as I don't see how to simplify the ruleset :( > But thanks anyway :) > I’d strongly recommend that you look at Olivier’s recommended tools (specifically pmcstat) to try to diagnose the bottleneck. I see no reason to assume this must be pf (it’s possible, but I see no specific evidence for it). On this hardware I’d expect pf to be able to push around 3.5Mpps. Even a single core system (or in a situation where you end up with a lock of lock contention) it should be able to do 1.5-1.8Mpps. Best regards, Kristof