From owner-freebsd-hackers Fri Jul 13 11: 3:40 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by hub.freebsd.org (Postfix) with ESMTP id A6C1537B406 for ; Fri, 13 Jul 2001 11:03:28 -0700 (PDT) (envelope-from bicknell@ussenterprise.ufp.org) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.11.1/8.11.1) id f6DI3QE24339; Fri, 13 Jul 2001 14:03:26 -0400 (EDT) (envelope-from bicknell) Date: Fri, 13 Jul 2001 14:03:26 -0400 From: Leo Bicknell To: Terry Lambert Cc: Matt Dillon , Leo Bicknell , hackers@FreeBSD.ORG Subject: Re: Network performance tuning. Message-ID: <20010713140326.A23982@ussenterprise.ufp.org> Mail-Followup-To: Leo Bicknell , Terry Lambert , Matt Dillon , Leo Bicknell , hackers@FreeBSD.ORG References: <15.16ffaf54.287f3d4d@aol.com> <20010712135629.A49042@ussenterprise.ufp.org> <200107130128.f6D1SFE59148@earth.backplane.com> <3B4F36AE.857511FF@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B4F36AE.857511FF@mindspring.com>; from tlambert2@mindspring.com on Fri, Jul 13, 2001 at 10:58:06AM -0700 Organization: United Federation of Planets Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Jul 13, 2001 at 10:58:06AM -0700, Terry Lambert wrote: > > We can do all of this without ripping out the pre-allocation of > > buffer space. I.E. forget trying to do something fancy like > > swapping out buffers or virtualizing buffers or advertising more > > then we actually have etc etc etc. Think of it more in terms of > > the system internally sysctl'ing down the send and receive buffer > > space defaults in a dynamic fashion and doing other reclamation to > > speed it along. > > The problem is that the tcpcb's, inpcb's, etc., are all > pre-reserved out of the KVA space map, so that they can > be allocated safely at interrupt, or because "that's how > the zone allocator works". I think the only critical resource here is MBUF's, which today are preallocated at boot time. There are memory fragmentation concerns with allocating/deallocating them on the fly. I am not going to even attempt to get into the world of kernel memory allocators, that's way out of my league. That said, the interesting cases (in increasing order of difficulty): 1) Allowing an admin to change the number of MBUF's on the fly (with sysctl). Presumably these would be infrequent events. 2) Allowing MBUF's to be allocated/deallocated in fixed size blocks easy for the allocator to deal with. (Eg, you always have 128k to 4 M of MBUF's allocated in 128k chunks.) 3) Allowing MBUF's to be fully dynamically allocated. I'm not sure I see any value to #3. I see huge value to #1 (when you run low, you can say double the number on an active server). If we get the warning I want (from another message) #1 becomes even more useful. #2 would take some study. The root question is does allocating them in blocks eliminate the memory fragmentation concern for the kernel allocator? If the answer is yes, it's probably something to look into, if the answer is no, probably not. -- Leo Bicknell - bicknell@ufp.org Systems Engineer - Internetworking Engineer - CCIE 3440 Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message