From owner-freebsd-net@freebsd.org Fri Jul 10 16:21:24 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 420CE36D59A for ; Fri, 10 Jul 2020 16:21:24 +0000 (UTC) (envelope-from olivier@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 4B3JFc0hDVz4nNb for ; Fri, 10 Jul 2020 16:21:24 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: olivier/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id ED53B2EA1A for ; Fri, 10 Jul 2020 16:21:23 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: by mail-pg1-f177.google.com with SMTP id z5so2739781pgb.6 for ; Fri, 10 Jul 2020 09:21:23 -0700 (PDT) X-Gm-Message-State: AOAM531lQSh78K+AebOKEJeTUWLPviKLApcALsUjNL1oCQtC/YVpiGPM D7ve+DQlPy5CDgL+93+2s5lA+iN57LeuEDHKEcQ= X-Google-Smtp-Source: ABdhPJxfsVmcaWt2yDmHHZL6ae/gRl9gfhHr5FT9tpUa0T1a3ZRxdjcD+rTF4PmerhZKHl4ApbLncbX05z5ML8HW42M= X-Received: by 2002:a62:1782:: with SMTP id 124mr15505036pfx.204.1594398082895; Fri, 10 Jul 2020 09:21:22 -0700 (PDT) MIME-Version: 1.0 References: <20200710084530.777ce321@mr185033.univ-rennes1.fr> In-Reply-To: <20200710084530.777ce321@mr185033.univ-rennes1.fr> From: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Date: Fri, 10 Jul 2020 18:21:11 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: poor performance with Intel X520 card To: Patrick Lamaiziere Cc: freebsd-net@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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: Fri, 10 Jul 2020 16:21:24 -0000 On Fri, Jul 10, 2020 at 8:45 AM Patrick Lamaiziere 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. > > Hi Patrick, yes 500 Kpps is quite low: Do you have a very complex long pf rule set? A 8 core Atom C2758 with an old Intel 10G 82599 is able to reach about 1.6Mpps (with one pf rule), so I would expect more on your setup. https://github.com/ocochard/netbenches/blob/master/Atom_C2758_8Cores-Intel_82599/forwarding-pf-ipfw/results/fbsd12-stable.r354440.BSDRP.1.96/README.md So, try this: - Identify the bottleneck: pmcstat and flamegraph are the tools for that; - Use FreeBSD -head or a 12-stable minimum but not less; - You should follow instruction here: https://wiki.freebsd.org/10gFreeBSD/Router Regards, Olivier