Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Aug 2001 09:34:51 +0100
From:      Konstantin Chuguev <Konstantin.Chuguev@dante.org.uk>
To:        Darryl Okahata <darrylo@soco.agilent.com>
Cc:        Alfred Perlstein <bright@mu.org>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: secure Filesystem
Message-ID:  <3B8611AB.1C86DB23@dante.org.uk>
References:  <200108231726.KAA03359@mina.soco.agilent.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B8611AB.1C86DB23>