From owner-freebsd-hackers Wed Sep 26 12:26:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253]) by hub.freebsd.org (Postfix) with ESMTP id DE5F037B42A for ; Wed, 26 Sep 2001 12:25:52 -0700 (PDT) Received: (from wkb@localhost) by freebie.xs4all.nl (8.11.6/8.11.6) id f8QJP4H26685; Wed, 26 Sep 2001 21:25:04 +0200 (CEST) (envelope-from wkb) Date: Wed, 26 Sep 2001 21:25:04 +0200 From: Wilko Bulte To: Matt Dillon Cc: Poul-Henning Kamp , David Greenman , Seigo Tanimura , bright@wintelcom.net, hackers@FreeBSD.ORG Subject: Re: Conclusions on... was Re: More on the cache_purgeleafdirs() routine Message-ID: <20010926212504.B26461@freebie.xs4all.nl> References: <96469.1001237641@critter> <200109231040.f8NAeXw86352@earth.backplane.com> <20010923124702.B9914@freebie.xs4all.nl> <200109232109.f8NL9kU88657@earth.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109232109.f8NL9kU88657@earth.backplane.com>; from dillon@earth.backplane.com on Sun, Sep 23, 2001 at 02:09:46PM -0700 X-OS: FreeBSD 4.4-STABLE X-PGP: finger wilko@freebsd.org 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 Sun, Sep 23, 2001 at 02:09:46PM -0700, Matt Dillon wrote: > > :Has the problem of small-memory machines (< 64M IIRC) solved now? As I > :understand it vmiodirenable is counter-productive for these boxes. > :Maybe one could decide on-boot whether the amount of mem is enough to > :make it useful? > : > :Just a thought of course. > : > :| / o / /_ _ email: wilko@FreeBSD.org > > Small memory machines never had a problem. Even though there can be Then I suggest the following to be changed: # # This file is read when going to multi-user and its contents piped thru # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details. # # $FreeBSD: src/etc/sysctl.conf,v 1.5 2001/08/26 02:37:22 dd Exp $ vfs.vmiodirenable=1 # Set to 1 to enable the use of the VM subsystem to # back UFS directory memory requirements. Because of # the amount of wasted memory this causes it's not # advised for machines with less than 64MB of RAM, # on machines with more than 64MB it can provide a # substantial benefit related to directory caching. That was what I read and confused me ;) > considerable memory inefficiencies using vmiodirenable (e.g. a directory > less then 512 bytes eats 512 bytes of physical ram with vmiodirenable > turned off, and 4K with it turned on), there are two compensating factors: > First, the VM Paging cache is a cache, so the cached directory blocks can > be thrown away. Second, the VM Page cache has all of memory to play > with while the buffer cache with vmiodirenable turned off on a 64MB > machine will reserve less then a megabyte to cache directories. #2 is > important because it leads to more I/O which has a far greater effect > on the system then memory waste. Also, if you look at the typical > program's memory footprint and assume that actively accessed directories > eat 4K, the memory used to hold the active directories winds up being > almost nothing compared to the RSS of the program using those directories. > Single-use directories (e.g. make buildworld) are recycled in the VM Page > cache and do not eat as much memory as you might otherwise think. > > So even though the memory inefficiency can be up to 8:1 (4096/512), > this factor is somewhat deceptive in regards to the actual effect on > the system. > > -Matt ---end of quoted text--- -- | / o / /_ _ email: wilko@FreeBSD.org |/|/ / / /( (_) Bulte Arnhem, The Netherlands To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message