From owner-freebsd-net@FreeBSD.ORG Thu Jul 17 20:56:53 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2852637B401 for ; Thu, 17 Jul 2003 20:56:53 -0700 (PDT) Received: from godel.mtl.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 717C743F93 for ; Thu, 17 Jul 2003 20:56:52 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: from godel.mtl.distributel.net (localhost [127.0.0.1]) h6I00wEH024666; Fri, 18 Jul 2003 00:00:58 GMT (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by godel.mtl.distributel.net (8.12.9/8.12.9/Submit) id h6I00vH8024665; Fri, 18 Jul 2003 00:00:57 GMT X-Authentication-Warning: godel.mtl.distributel.net: bmilekic set sender to bmilekic@technokratis.com using -f Date: Fri, 18 Jul 2003 00:00:57 +0000 From: Bosko Milekic To: Scot Loach Message-ID: <20030718000057.GA24620@technokratis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: "'freebsd-net@freebsd.org'" Subject: Re: Kernel tuning for large maxsockets X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 18 Jul 2003 03:56:53 -0000 On Thu, Jul 17, 2003 at 08:45:29PM -0400, Scot Loach wrote: > Bosko: > > The problem I have is that each of the four pcb types has its own zone that > is preallocated to hold maxsockets pcbs. This is a waste of kva that could > be better used. Since I'm not using divert sockets or raw sockets, I would > rather cap these zones to a small constant number, and increase the others > as much as possible. > > I should have a patch for this next week sometime. The kva is not pre-allocated. The more allocations you have for that pcb type, the more memory and kva space will be reserved for them. As I said, the kva used for the pcbs will come out of kmem_map. If you're allocating the pcbs, then you're not wasting the kva. When you free them, the kva and memory stayed reserved, but this is required for type stable storage, which the pcbs appear to be. -- Bosko Milekic * bmilekic@technokratis.com * bmilekic@FreeBSD.org TECHNOkRATIS Consulting Services * http://www.technokratis.com/