Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jun 2000 06:21:28 -0700
From:      David Greenman <dg@root.com>
To:        Bosko Milekic <bmilekic@dsuper.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: mbuf re-write(s), v 0.1 
Message-ID:  <200006291321.GAA25048@implode.root.com>
In-Reply-To: Your message of "Tue, 20 Jun 2000 13:43:42 EDT." <Pine.BSF.4.21.0006201313440.3697-100000@jehovah.technokratis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>	In an attempt to eliminate or significantly reduce the hogging of
>  physical memory by unused mbufs, I have begun re-writing some of the mbuf
>  subsystem. I've re-written the allocator and designed an actual free
>  routine, and have also considerably re-written the MGET, MGETHDR, and
>  MFREE macros. I still have some work to do with this, notably
>  optimisation, but I have not been able to do any profiling whatsoever as
>  profiling, I repeat, seems presently broken on -CURRENT.
>
>	This is particularily useful for machines which see "peak" mbuf usage
>  periods, where many mbufs are allocated, only to be freed a little while
>  later, but which will unfortunately remain on the free list, holding on
>  to physical memory (for a graphical example, see the THIRD graph at
>  http://www.technokratis.com/stats/mbuf.html).

   We used to do this in FreeBSD, but found that it was a bad idea for
performance reasons. Freeing and reallocating memory from the high-level
VM system is quite expensive and the trend in NICs these days is towards
needing the code to be even faster, not slower. Further, if the 'peak' is
reached often, then you're probably not really gaining much by freeing
the memory back to the common pool.

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
Manufacturer of high-performance Internet servers - http://www.terasolutions.com
Pave the road of life with opportunities.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006291321.GAA25048>