up vote 1 down vote favorite
share [g+] share [fb]

Is it true that in FAT filesystems the maximum number of files per filesystem equals the number of entries in the FAT table. And is it also true that in indexed filesystems the maximum number of files per filesystem equals the number of indexblocks – 1.

I'm reading some stuff and am trying to get a good understanding of it.

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

MS FAT-based filesystems have a limit to the number of files that can be stored in the root directory (a few hundred IIRC), and because of the way long filenames are stored file/directory names longer then the traditional "8+3" wil consume more then on of the entries in the limit.

For subdirectories FAT32 allows ~65,000 entries per sub-directory (again, long filenames take more than one slot), I'm not sure about the older FAT16. Other filesystems have similar limits (ext2/3 has a 32,000 entry limit without certain tweaks) some do not or effectively do not (NTFS allows ~4,000,000,000). You will hit performance issues on some filesystems long before you hit the limit of entries per directory, as some search directories linearly (FAT* do, ext2 does, ext3 does unless you specific indexed directories, ext4 and NTFS do indexed directories by default IIRC).

link|improve this answer
1  
I think it's 256 or 512 files in root, but I also think that's a FAT16 limit. – Randolph West Dec 15 '09 at 15:06
Looks like you are right. en.wikipedia.org/wiki/Fat16 suggests that 512 entries is used by default for large filesystems (presumably less for floppy sized ones - I certainly remember hitting the limit before a few hundred files), and in FAT32 the root directory is a directory table file just like any other sub-directory so has the same ~65000 entry limit. – David Spillett Dec 15 '09 at 22:11
Thanks the both of you. That was a good explanation;) – Avon Dec 18 '09 at 10:48
The ~32k limit in ext2/3 only applies to subdirectories, not to entries (which are limited to 1.3e20). Specifically, 32k is a limit of hardlinks a single directory or file can have. – grawity Nov 1 '11 at 22:57
feedback

In FAT filesyatem each file got at minimum one allocation cluster if file size>0. But directories also occupying clusters. Its indirect limitation. Exact formula depend on some parameters as length of file names Files with size=0 is very special case.

Roughly correct next. If all files have size larger than zero, then maximum number of files is less that nimber of allocation units in FAT table.

May be similar idea applicable for indexed file systems.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown