1752672 Members
5931 Online
108789 Solutions
New Discussion юеВ

filesystem limitation

 
SOLVED
Go to solution
Juergen Nagel_1
Frequent Advisor

filesystem limitation

Is it possible to store 180000 files in one directory? Exists a limitation? What is the best filesystem to do this? The files are approximately 25k.
Thanks
4 REPLIES 4
eran maor
Honored Contributor
Solution

Re: filesystem limitation

Hi

if you are working on a vxfs file system that have dym. inode increase you can create this number of file ( not open files !!)

see answer :
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xadbf53921f1ad5118fef0090279cd0f9,00.html
love computers
Wodisch
Honored Contributor

Re: filesystem limitation

Hello Juergen,

the sizes of the files or NOT a problem, but the amount of
space needed for all those names in a single directory
will slow down everything accessing those files!!!

UN*X reads and writes directories at once - I am getting
tired of telling this to everybody ;-) Ask Eran - I showed
him a couple of weeks ago in Tel Aviv by doing this:

f="This-is-a-very-long-file-name-and-is-just-used-to"
f="${f}-show-what-is-happening-to-you-when-you"
f="${f}-use-huge-directories-on-any-UNIX-system"
mkdir /tmp/bigdir
cd /tmp/bigdir
ls -ld $PWD
n=0
while [ $n -lt 100000 ]; do touch $f.$n; ((n = n +1)); done
ls -ld $PWD

while this is running, watch the output of "sar -a 1 1000"
in another terminal window - especially look for the
column "dirbk/s" - it shows the amount of directory blocks
processed. If you have a recent system, that be some
dozen megabytes per second - on directories alone!

Hence, think about storing many, many files in a single
directory!

HTH,
Wodisch
TrustNo1
Regular Advisor

Re: filesystem limitation

Hi Juergen,
Another aspect you should consider, is backup and restore of such large amount of files.
Depending on which backup solution you use this can very. We use Omniback, and I can tell you from experience, there are many things to consider when backing up such a large amount of files, memory, database size, etc..
We have one with 200000+, and if I had known then what I know now, it would have never happened.
I believe the max. amount of files in one directory is 2 million, but DO NOT even consider attempting to backup-restore such a beast, I'm not for sure it would even be possible! Consider a tiered directory layout, it would be well worth the effort, and after all, planning is half the fun!
~jdk
Dare to Dream
Wodisch
Honored Contributor

Re: filesystem limitation

Hello,

IIRC, there is a limit for the amount of directories on a
single VxFS...

Wodisch