Answer the question
In order to leave comments, you need to log in
Does the number of files in a directory affect the speed of writing (creating new files) in ext4?
Does the number of files in a directory affect the speed of writing (creating new files) in ext4?
Listing doesn't matter.
Answer the question
In order to leave comments, you need to log in
Affects, but depending on how many files. File hashes are indexed, so you can find the file pretty quickly.
The difference between 100 and 1000 files will be minimal (less than a percent).
The difference between 100 and 1.000.000 files will be slightly noticeable, but only until the blocks containing the directory are cached in memory.
Compared to ext3, ext4 is VERY much optimized for dealing with a lot of files.
Below , edo1h provided an example test, but it incorrectly used an external command, getting the main load on the processor, not on the disk. My comment was too long, so I decided to add it to the answer:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question