From owner-freebsd-mips@FreeBSD.ORG Sun Sep 8 05:57:30 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 13C5AE1B; Sun, 8 Sep 2013 05:57:30 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x233.google.com (mail-ea0-x233.google.com [IPv6:2a00:1450:4013:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2126C2AC5; Sun, 8 Sep 2013 05:57:28 +0000 (UTC) Received: by mail-ea0-f179.google.com with SMTP id b10so2449585eae.10 for ; Sat, 07 Sep 2013 22:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=k7hEDBTfwMDx4LKQsjGR2EkW4dG4naRWhPaGjkNZxtY=; b=CzELVKoeY9PGOcdUW+bStnpSFfVIw/r70EMgPUWyhCI2OtGruBI8w759NeJ/KfwPro R4PHfmMREHv5cQtlWMcSwEjwJdCKssdus9EiyoTnyUITOJZFCN7na4bCcW6TVS6zZ3IF 6ApdQ4orKt5o1aIFrQP/aCkdRa+tAzBo8MkG4X7HatmEhXt/44/W10cP8VvNo/5wLSvD 6+GpvKcE5TUF2UHSEMHlS3Lkd1bXb6yT+6CCpzzfyR695QVdXuwGc5zbaGbcc2fDWAs3 ZhlwO4/DJGhfodOBlbmpNcUhOznGWIM67cIlVcQK07n86ExZzgiWdoBCff4DJjuqokYf H5zg== MIME-Version: 1.0 X-Received: by 10.14.4.1 with SMTP id 1mr19181474eei.21.1378619847484; Sat, 07 Sep 2013 22:57:27 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Sat, 7 Sep 2013 22:57:27 -0700 (PDT) In-Reply-To: References: <9CBFAD35-D651-4E28-BEBB-DC3717F38567@bsdimp.com> <1378583762.1111.512.camel@revolution.hippie.lan> Date: Sat, 7 Sep 2013 22:57:27 -0700 Message-ID: Subject: Re: mbuf autotuning effect From: hiren panchasara To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Net , "freebsd-mips@freebsd.org" , Ian Lepore X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2013 05:57:30 -0000 On Sat, Sep 7, 2013 at 1:39 PM, Adrian Chadd wrote: > On 7 September 2013 12:56, Ian Lepore wrote: > > >> I think the part of this that strikes me as strange is calling 20% of >> physical memory used for network buffers a "very low value". It seems >> outrageously high to me. I'd be pissed if that much memory got wasted >> on network buffers on one of our $work platforms with so little memory. >> >> So the fact that you think it's crazy-low and I think it's crazy-high >> may be a sign that it's auto-tuned to a reasonable compromise, and in >> both our cases the right fix would be to use the available knobs to tune >> things for our particular uses. >> > > Well, which limit is actually being hit here? 20% of 32mb is still a lot > of memory buffers.. > > Now, for sizing up the needed buffers for wifi: > > assuming 512 tx, 512 rx buffers for two ath NICs. > > another 512+512 buffers for each arge NICs. > > So, 4096 mbufs here, 2k each, so ~ 8mb of RAM. > And we are only getting 6mb of maxmbufmem with current setup. Index: mips/include/vmparam.h =================================================================== --- mips/include/vmparam.h (revision 255320) +++ mips/include/vmparam.h (working copy) @@ -119,7 +119,7 @@ * is the total KVA space allocated for kmem_map. */ #ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (3) +#define VM_KMEM_SIZE_SCALE (1) #endif /* As I mentioned on another reply in the same thread, VM_KMEM_SIZE_SCALE is 1 for amd64. If I do the same for mips as above, we get # sysctl -a | grep maxmbuf kern.ipc.maxmbufmem: 14407680 Now, do we want to have this much rams assigned to mbufs is another question. cheers, Hiren