1

I have FTP that should handle about 1 million files if not more. file sizes are variable between 1MB to 100Mb but the have average of 30MB. We have about 1000 resources and hundreds of thousand site users which we keep their record. Therefore I thought that have this kind of file tree is good.

res1 ->
        user1
        user2
        .
        .
        user(m)
.
.
.
res1000->
        user1
        user2
        .
        .
        user(n)

The other approach is to put all files in one directory. I want to know which approach is more effective in terms of speed.

1 Answer 1

0

A huge amount of directory entries is never a good idea, not even with a fast filesystem like btrfs.

A rather difficult question would be what the optimal combination of depth and width is. But if the question is just "1,000 x 100,000" vs. "1 x 100,000,000" then the answer is clear. Use the two-level approach.

But you should consider an additional hierarchy step and limiting the folder entries to 1,000 to 10,000.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .