S
S
Stanislav Fateev2015-11-13 16:03:27
linux
Stanislav Fateev, 2015-11-13 16:03:27

Will there be performance problems if there are ~ 100000 files in the directory (FS - ext4)?

The question arose about organizing storage and access from a web application to a set - about 100,000 small .mp3 files of 3-10 kilobytes each (voicing of words - the user clicks on the button and hears the pronunciation of the word).
The easiest way for me is to throw them all into one folder that the web server serves and send the URL to the necessary file to the frontend. URLs should be stored in the database accordingly. There are other options (store files in the database as binary data, transfer not URLs but binary data at once, do not store 100,000 files in one folder, but split them into several) The file system on the ext4 server.
In general, how best to organize this and what are the pitfalls?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2015-11-13
@svfat

a=md5(a)
/ a[0:2] / [a[2:4] / a.mp3
i.e. 2 folders, one can be, if exactly no more than 100-200k

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question