Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2000 23:05:54 +0200 (CEST)
From:      Marius Bendiksen <mbendiks@eunet.no>
To:        Steve Carlson <stevec@nbci.com>
Cc:        freebsd-fs@FreeBSD.ORG
Subject:   Re: FFS performance for large directories?
Message-ID:  <Pine.BSF.4.05.10008022300520.34912-100000@login-1.eunet.no>
In-Reply-To: <B5AB2266.BEA%stevec@nbci.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>     I'm trying to figure out at what point I can expect performance issues
> with an FFS filesystem if I have directories with a massive number of small
> files or symlinks.  As far as I understand it, there are a number of inodes

Small files or symlinks will usually be no problem, if they stay very
small (IIRC, something like 40-60 bytes). However, directory performance
may be very poor under many access patterns, due to the employment of
linear scans. Also, if multiple levels are traversed depth-first, you will
get very poor performance, as FFS uses a width-first layout, giving a
worst-case interaction (ref. find(1) and /usr/ports).

> located within a cylinder group, and the inodes for files are ideally placed
> in the same cylinder group as their parent directory.  But if I were to have
> a massive number of small files or symlinks in a directory, wouldn't I run
> out of local inodes and thus start to see a performance issue when working

These parameters can be tuned by newfs. You may want to go as low as 512
bytes per inode for the layout you've described.

> in that directory?  How can I determine the maximum number of files I should
> safely place in a directory without my performance suffering?  I've been
> unable to find commentary on this in print or on the web - everything I've
> read centers only on performance issues when the disk becomes full.

The "safe" number of files in a directory will depend on the length of the
names, and how you define "suffer". UFS (which is the terminating layer of
FFS et al) uses a linear directory layout.

Marius



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.10008022300520.34912-100000>