From owner-freebsd-current@FreeBSD.ORG Sun Jul 12 17:38:50 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 931E0106566B for ; Sun, 12 Jul 2009 17:38:50 +0000 (UTC) (envelope-from sullrich@gmail.com) Received: from mail-ew0-f227.google.com (mail-ew0-f227.google.com [209.85.219.227]) by mx1.freebsd.org (Postfix) with ESMTP id F2E8B8FC08 for ; Sun, 12 Jul 2009 17:38:49 +0000 (UTC) (envelope-from sullrich@gmail.com) Received: by ewy27 with SMTP id 27so1111493ewy.43 for ; Sun, 12 Jul 2009 10:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=uyEB6c/QsoDVrtIqB5yRmRq0MNJMh99zlJEorrjczI4=; b=cAP+eLIjEsmkESssEN5ByhgB7Jrr3WhoYP5L2/pWNKtsd4/GTGKTXr2KLsT30bvj+X O0XsdL916hEKrpmxdhymvfRIX8Kd88RdClWQ5Ig/0+c13WSGHrzhrrNVliEi9Us+EkzN hicj+8ItaWP6YGmsDfwe/jlCCYrMztexY5Sqc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ten8GKAfRU1r3v6B81MCRznppJQ3wEkLibDL3eIvR/oe/yLR3AsjZ8x8kCGhcnMraw 1jCekkEyH1HRkq5KMv6ints/EdV+BbkAA+Jev0Iwy1OujFECz6W/59DwOQu4nxaHdXa2 BHOgi55knySfbuanazw8C97bHzWnU3eQI8CcA= MIME-Version: 1.0 Received: by 10.210.136.15 with SMTP id j15mr997610ebd.38.1247420329163; Sun, 12 Jul 2009 10:38:49 -0700 (PDT) In-Reply-To: <3c1674c90907120009o330da19ds68c45d0dab6ef81f@mail.gmail.com> References: <3c1674c90907120009o330da19ds68c45d0dab6ef81f@mail.gmail.com> From: Scott Ullrich Date: Sun, 12 Jul 2009 13:38:29 -0400 Message-ID: To: Kip Macy Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Current Subject: Re: Flowtables -- any tuning hints? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 17:38:50 -0000 On Sun, Jul 12, 2009 at 3:09 AM, Kip Macy wrote: > You want to avoid hash collisions. So, generally speaking you want the > hash table to be sized 2x larger than the number of unique connection > destinations. =A0You want the maximum number of flows to be as large as > the maximum number of unique destinations x number of cores. When you > get to the case of hundreds of thousands of unique destinations as in > the case of a small ISP doing IP forwarding, you're probably better > off disabling the flowtable. For most other workloads its likely to be > a clear win. Running a process on an 8-core system with 8 threads each > calling sendto(...) with 10 bytes I can push 3.5 - 4Mpps (with cxgb - > you won't get this with most cards) with the flowtable enabled. With > the flowtable disabled lock contention causes performance to degrade > to 330kpps with the aforementioned workload. > > Let me know if you have any issues. Thank you Kip, this sounds like a great addition to FreeBSD. Scott