Lots of small files in 1 directory?

Hey guys,

Would it be bad practice to store lots of small files in a single directory on a Linux server?

For example I have 30,000 + items, all of which have 3 cache files of ~14kb, would it be bad practice to store all these in 1 directory?

Or should I split it into sub directories?

i think it is better to split in sub-directories. it is easy to search and manage

Thanks.

In what way would you determine what sub-directory they go in? Would you maybe do it based on the first letter / number of the file name? Therefore splitting them all into 36 sub folders? a-z0-9

Lots depends on what you are doing with these files – if it is something involving enumerating files in the folder, it might not work so good. But if you are just writing and reading files directly, I would keep it in a single folder until I found something forcing me to change. Presuming the caching code manages it’s own file structures, switching should not be horribly painful.