Re: Max no of files in a directory
- From: Dances With Crows <danceswithcrows@xxxxxxx>
- Date: 30 May 2008 19:33:02 GMT
Smeeta staggered into the Black Sun and said:
On May 30, 10:35 pm, Dances With Crows wrote:
Smeeta staggered into the Black Sun and said:ext3
I want to find out the max number of files possible in a directory.On which filesystem? If ReiserFS, which hash is being used? The
answers to these questions will determine the answer to your
question.
/usr/src/linux/Documentation/filesystems/ext2.txt :
------------
Using a hashed directory index (under development) allows 100k-1M+ files
in a single directory without performance problems (although RAM size
becomes an issue at this point).
The (meaningless) absolute upper limit of files in a single directory
(imposed by the file size, the realistic limit is obviously much less)
is over 130 trillion files. It would be higher except there are not
enough 4-character names to make up unique directory entries, so they
have to be 8 character filenames, even then we are fairly close to
running out of unique filenames.
------------
Hashed dir indexes are present by default now. I know you can fit at
least 50,000 files in one dir on ext3 without serious performance
problems because I've done it. On an ext3 filesystem, the absolute
limit is given by the number of inodes on the filesystem, which is
probably less than 130*10^12.
However, if you're going to be putting tens of thousands of files in one
dir, you should think about ways to split those files up into subdirs.
That will make it easier to deal when you have to deal with millions of
files instead of tens of thousands.
--
The squirrels now live in fear of the magic exploding compost heap.
--Dan Holdsworth
My blog and resume: http://crow202.dyndns.org:8080/wordpress/
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.
- References:
- Max no of files in a directory
- From: Smeeta
- Re: Max no of files in a directory
- From: Dances With Crows
- Re: Max no of files in a directory
- From: Smeeta
- Max no of files in a directory
- Prev by Date: Re: Great Permissions Tutorial
- Next by Date: Re: Things Linux Can Do Without
- Previous by thread: Re: Max no of files in a directory
- Next by thread: Great Permissions Tutorial
- Index(es):
Relevant Pages
|