- To: marghanita@xxxxxxxxxxxx
- Subject: Re: [SLUG] Linux and Apache limits on number of files in a directory
- From: peter@xxxxxxxxxxxxxxxxxx
- Date: Mon, 09 Apr 2012 14:41:48 +1000
- Cc: slug <slug@xxxxxxxxxxx>
- User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)
>>>>> "Marghanita" == Marghanita da Cruz <marghanita@xxxxxxxxxxxx> writes:
Marghanita> Peter did you mean can or can't create a new link to the
Marghanita> second directory? peter@xxxxxxxxxxxxxxxxxx wrote:
>> You can't create a new link in that directory.
No, each name in a directory is a link to a file. When the directory
is full, you can't create a new link --- i.e. you can't put a new
name in the directory. Practically speaking you run into other
limitations way before that --- typically you run out of inodes in an
inode-based filesystem, or your directory search time becomes
excessive if you're using a filesystem that uses linear search.
For a given workload it's worth testing different filesystems to find
out which is best. They vary enormously depending on the underlying
hardware and workload. For highly multithreaded workloads on high
performance storage arrays, XFS is often a good choice; for single
spindle or single-threaded workloads, ext3 is pretty good in my
experience. btrfs looks as if it could perform really well for some
workloads, but it's still somewhat unstable --- I think the on-disk
format may still need some work. I haven't found a workload where JFS
performs well yet, and I haven't done enough benchmarking on ext4 to say
anything about it.
Peter C