I’m creating a site where users can upload and share their files. I’m thinking about creating a folder for each individual user to upload their files. Would this slow the site down or cause trouble in the server?
I’m not expecting a million users, but around 100,00 – 200,000. Seems like a lot of folders for each user.
I also have another solution of just renaming the file when they upload, but I would like to keep the file name in tact so users still know which file is which.
Edit: if it helps I plan on using Linux server.
It depends on the file system you are using.
ext2uses linked list. So its slow for large number of files.ext3uses hashed Binary trees. Its much faster. Most server has directory indexing turned on. So accessing 20k folders will not be that slow.Problem is your users will grow. So its better you use a nested directory structure than a single flat directory.