How many files can I have safely in a subdirectory?
Stephen Samuel (gmail)
darkonc at gmail.com
Tue Sep 1 17:50:31 UTC 2009
Well, if you presume the possibility of running into bugs when the
directory gets over 2GB,
and directory entries averaging under 20 bytes, then you might see a
problem at around
100million entries.
You can probably expect performance issues before that point.
If you expect these directories to keep growing year after year,
you might want to consider doing directory hashing...
If nothing else, it could get ugly if someone decides to do an 'ls'
on a directory with 10million entries.
On Sun, Aug 30, 2009 at 9:00 AM, z0diac<web2009 at zeroreality.com> wrote:
>
> Ok, I'm running a vBulletin forum (3.8.4) and found that all user attachments
> go into 1 single directory for each user. For each attached file in the
> forum, there's 2 files on disk (*.attach and *.thumb), for pictures that is.
>
> One user already has over 100,000 attachements, thus, over 200,000 files in
> his attach directory.
>
> Someone recently told me to 'keep an eye on it' because certain setups can't
> hold more than X number of files in a single directory. Yet someone else
> said I could have over 1 trillion files in a single directory if the HDD was
> large enough...
>
> Here's my setup:
>
> linux version: 2.6.18-92.1.10.el5
> php: 5.1.6
> mySQL: 5.0.45
> File system: ext3
>
> vB support has told me any limitation there might be, will not be the result
> of vB, so now I'm looking at either Linux and the way it handles files, or
> the ext3 file system.
>
> Does anyone know if I can just keep going with putting files into one
> directory? (there will be over 1million probably by year's end. Hopefully
> not more than 5 million ever).
>
> And, will having so many files in a single directory cause any performance
> problems? (ie: slowdowns)
>
> My only option is to hire a coder to somehow have it split the 1M+ files
> into several subdirs, say 50,000 per subdir. But even though it's messy, if
> it really doesn't make a difference in the end whether they're in 50
> subdirs, or just 1 dir, then I won't bother (and can sigh a breath of
> relief)
>
>
> Thanks in advance!!
> z0diac is offline
> Looking for Linux Hosting? Click Here.
>
> --
> View this message in context: http://www.nabble.com/How-many-files-can-I-have-safely-in-a-subdirectory--tp25212801p25212801.html
> Sent from the Ext3 - User mailing list archive at Nabble.com.
>
> _______________________________________________
> Ext3-users mailing list
> Ext3-users at redhat.com
> https://www.redhat.com/mailman/listinfo/ext3-users
>
--
Stephen Samuel http://www.bcgreen.com Software, like love,
778-861-7641 grows when you give it away
More information about the Ext3-users
mailing list