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
>         [EMAIL PROTECTED]
>
> 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 [EMAIL PROTECTED]
> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to