Date: Thu, 23 Aug 2001 10:26:21 -0700 From: Darryl Okahata <darrylo@soco.agilent.com> To: Alfred Perlstein <bright@mu.org> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: secure Filesystem Message-ID: <200108231726.KAA03359@mina.soco.agilent.com> In-Reply-To: Your message of "Thu, 16 Aug 2001 16:02:03 CDT." <20010816160203.N38066@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
A while back, Alfred Perlstein <bright@mu.org> wrote: > > However, on a somewhat aging 128MB laptop, a 200+MB cfsd puts the > > system into swap h*ll pretty quickly. I think cfsd has some linked > > lists which thrash a lot of pages. > > That's unfortunate. Good thing is that cfs is open source. > "Got Patches" ? :) A couple of months back, I briefly looked into it, but nothing (simple) came to mind. However, upon perusing the code again, cfsd appears to be using a plain hash table with 1024 buckets and a linked list at each bucket. The number of buckets is controlled by two simple #define's in cfs.h: #define HSIZE 1024 #define HMASK 0x3ff /* change these together, please */ These are pretty easy to change (HSIZE must currently be a power of 2), and you generally don't have to worry about hash function issues (the file inode is used as the "hash function"). My test case has 200000+ files, occupying ~1.4GB, and increasing the hash table size (number of buckets) to 1M (1024*1024) greatly improved swap performance (not surprising, as following the linked lists is what unnecessarily dragged in lots of pages). On my laptop with 128MB RAM, there was a significant change in resident memory footprint: VM used RES (max) original 1024 bucket cfsd: ? ? 128K bucket cfsd: 445MB 80-90MB 1024K bucket cfsd: 458MB 30-35MB (<20MB typ) Of course, increasing the number of buckets increased the initial cfsd size (to 14-16MB, in the case of the 1M buckets), but that's acceptable. [ And the cfsd process doesn't shrink when you cdetach .... ;-( ] -- Darryl Okahata darrylo@soco.agilent.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion, or policy of Agilent Technologies, or of the little green men that have been following him all day. 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?200108231726.KAA03359>