From owner-freebsd-hackers Fri Aug 24 1:35:12 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from alpha.dante.org.uk (alpha.dante.org.uk [193.63.211.19]) by hub.freebsd.org (Postfix) with ESMTP id 5713537B414 for ; Fri, 24 Aug 2001 01:35:04 -0700 (PDT) (envelope-from konstantin.chuguev@dante.org.uk) Received: from theta.dante.org.uk ([193.63.211.7] helo=dante.org.uk) by alpha.dante.org.uk with esmtp (Exim 3.12 #4) id 15aCQK-0003m2-00; Fri, 24 Aug 2001 09:34:41 +0100 Message-ID: <3B8611AB.1C86DB23@dante.org.uk> Date: Fri, 24 Aug 2001 09:34:51 +0100 From: Konstantin Chuguev Organization: Delivery of Advanced Network Technology to Europe Ltd. X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.6 sun4u) X-Accept-Language: ru, en MIME-Version: 1.0 To: Darryl Okahata Cc: Alfred Perlstein , freebsd-hackers@FreeBSD.ORG Subject: Re: secure Filesystem References: <200108231726.KAA03359@mina.soco.agilent.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 That's cool! Maybe we can have a patch changing these cpp vars in the cfs port? Regards, Konstantin. Darryl Okahata wrote: > 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 -- * * Konstantin Chuguev Francis House * * Application Engineer 112 Hills Road * Tel: +44 1223 302992 Cambridge CB2 1PQ D A N T E WWW: http://www.dante.net United Kingdom To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message