Is there a logical limit as to how many folders I can store inside a single folder in a hosting server (linux)? I`m talking about tens of thousands of folders.

link|improve this question
it depends entirely on the filesystem you use. note: using many folders is not good from performance perspective... – yi_H Feb 8 at 13:10
1  
32000 on ext3 64000 or even more on ext4 – Banthar Feb 8 at 13:15
ReiserFS wins with up to 1,200,000 files per dir limited by r5 hash as to 3.6 version. – maverik Feb 8 at 13:21
then how to deal with the situation that you have tens of thousands of repeating data that are all of the same category? how to store them on the server in a good way? – Mahmoud Badri Feb 8 at 13:32
Try using a DBMS – Garrett Feb 8 at 16:26
feedback

migrated from stackoverflow.com Feb 8 at 14:57

This question came from our site for professional and enthusiast programmers.

1 Answer

Is there a logical limit as to how many folders I can store inside a single folder in a hosting server (linux)?

Yes, there is a limit. You have a limit with everything inside the computer, because each computer is of limited resources. Especially with hard-drives, they have a limited amount of space. As each directory consumes space for it's name at least, this will be always limited by the space of the drive.

Next to that, the file-system itself has limits in the way how it organizes the data. This depends on the type and version of file-system you're using then.

link|improve this answer
I have no problem with the disk size. my concern is if it is ok to store 30000+ subfolder in a folder – Mahmoud Badri Feb 8 at 14:20
Your concern is right, 30000+ might be over the maximum logical limit the device and it's software abstraction layer is able to offer you. You should first of all tell what is the absolute maximum number of folders you want to support (not a + at the end, but the real maximum, real in the sense of sepcification, that and no more must be supported). Then you should address which file-system you're using. – hakre Feb 8 at 14:23
feedback

Your Answer

 
or
required, but never shown