In our site, users can have many private files. We are thinking what could be the best distribution so as to avoid destroying the server's performance, These files are served through Apache and should be listed each time the user needs to manage them.
Our first approach right now is:
var first_level = (int) $user_id/100;
var files_folder = /uf/$first_level/$user_id
This gives us a first level of 100 folders and many second level folders. Since not all users have files and right now we are at about ~80k users, this means about 800 folders per second level folder.
What do you think about this approach?