I have a program that produces large number of small files (say, 10,000 files). After they are created, another script accesses them and processes one by one.
Questions:
I run Debian with ext4 file system
Related
ext4: Maximum number of files: 232 - 1 (4,294,967,295)
The ext4 file system can support volumes with sizes up to 1 Exabyte (EB) (1,000 Terabytes = 1018 Bytes) and files with sizes up to 16 Terabytes (TB). Ext4 is backward compatible with ext3 and ext2, making it possible to mount ext3 and ext2 as ext4.
NTFS File Size Maximum disk size: 256 terabytes. Maximum file size: 256 terabytes. Maximum number of files on disk: 4,294,967,295. Maximum number of files in a single folder: 4,294,967,295.
You can put 4,294,967,295 files into a single folder if drive is formatted with NTFS (would be unusual if it were not) as long as you do not exceed 256 terabytes (single file size and space) or all of disk space that was available whichever is less.
10k files inside a single folder is not a problem on Ext4. It should have the dir_index
option enabled by default, which indexes directories content using a btree-like structure to prevent performance issues.
To sum up, unless you create millions of files or use ext2/ext3, you shouldn't have to worry about system or FS performance issues.
That being said, shell tools and commands don't like to be called with a lot of files as parameter ( rm *
for example) and may return you an error message saying something like 'too many arguments'. Look at this answer for what happens then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With