Operating System - Linux
1828921 Members
2791 Online
109986 Solutions
New Discussion

Re: How many files per directory

 
SOLVED
Go to solution
Ragni Singh
Super Advisor

How many files per directory

Hi All, I have a Dl380 running AS 3, update 8. we are running ext3 on our server. Can anyone tell me how many files per directory the OS will support?

Thanks and point will be assigned.
6 REPLIES 6
Alpha977
Valued Contributor

Re: How many files per directory

Hello!

i don't have idea, but i belive the limit is only your diskspace.

I hope i'm not wrong, but in ext3 this limit doesn't exist.
Ivan Ferreira
Honored Contributor
Solution

Re: How many files per directory

You can create as many files as you want into any directory for a specific file system as log as you have free inodes.

You can check the inode usage with df -i. You can use dumpe2fs to view the number of inodes for a file system (ext2/ext3).
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Jeroen Peereboom
Honored Contributor

Re: How many files per directory

It used to have a performance penalty if you have too many files in one directory.
I don't know how many (thousands?) and if this is still true.

JP
Ragni Singh
Super Advisor

Re: How many files per directory

In Solaris there is a limitation on the number of subdirectories that can be created, is that not the case with Linux? How many inodes can be created before hiting a limit.

Thaks and points will be assigned.
Patrick Terlisten
Honored Contributor

Re: How many files per directory

Each file or directory need at least one inode, so the number of file / directories is limited by the number of free inodes, visible with the "df -i" command (as Ivan said).

Regards,
Patrick
Best regards,
Patrick
Ivan Ferreira
Honored Contributor

Re: How many files per directory

I don't find anywhere the information about a specific directory limits. The inode limit is a fact. Anyway, too many files or directories on just one directory will affect the performance a lot. If you want to do that, consider the use of directory index:

http://wiki.archlinux.org/index.php/Ext3_Filesystem_Tips
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?