Problems with FFS and directories of over 1000 entries....

2004-03-04 Thread Forrest Aldrich
I understand that FFS has some performance problems in directory/file 
structures that have over 1000 entires... though I'm not sure this 
applies to FFS under FreeBSD-5.x.   Can someone comment on this?

Forrest

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problems with FFS and directories of over 1000 entries....

2004-03-04 Thread Matthew Seaman
On Thu, Mar 04, 2004 at 02:42:54PM -0500, Forrest Aldrich wrote:
 I understand that FFS has some performance problems in directory/file 
 structures that have over 1000 entires... though I'm not sure this 
 applies to FFS under FreeBSD-5.x.   Can someone comment on this?

No -- you understand incorrectly.  Large directories have not been a
problem since UFS_DIRHASH went into the tree, which was, oh, two and a
half years ago:


http://docs.freebsd.org/cgi/getmsg.cgi?fetch=18975+0+archive/2001/freebsd-fs/20010624.freebsd-fs

Not that UFS did badly before that: 1000 entries in one directory
probably wouldn't have been problematic.  10,000 could have been a
different matter.  100,000 would have been difficult to deal with.

UFS_DIRHASH is enabled in the GENERIC kernel, and has been since 2001:


http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/conf/GENERIC.diff?r1=1.246.2.36r2=1.246.2.37only_with_tag=RELENG_4

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Re: Problems with FFS and directories of over 1000 entries....

2004-03-04 Thread Dan Nelson
In the last episode (Mar 04), Forrest Aldrich said:
 I understand that FFS has some performance problems in directory/file 
 structures that have over 1000 entires... though I'm not sure this 
 applies to FFS under FreeBSD-5.x.   Can someone comment on this?

I see no issues on my systems, either 4.x or 5.x, with up to 10k files
in a directory.  Enabling the UFS_DIRHASH kernel option (available in
4.4 and later) will greatly speed up access to large directories, at
the cost of a little memory (adjustable via sysctl).

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]