We're creating an ASP.Net MVC site that will need to store 1 million+ pictures, all around 2k-5k in size. From previous ressearch, it looks like a file server is probably better than a db (feel free to comment otherwise).
Is there anything special to consider when storing this many files? Are there any issues with Windows being able to find the photo quickly if there are so many files in one folder? Does a segmented directory structure need to be created, for example dividing them up by filename? It would be nice if the solution would scale to at least 10 million pictures for potential future expansion needs.
4Kb is the default cluster size for NTFS. You might tune this settings depending on usual picture size. http://support.microsoft.com/kb/314878
I would build a tree with subdirectories to be able to move from one FS to another : How many files can I put in a directory? and avoid some issues : http://www.frank4dd.com/howto/various/maxfiles-per-dir.htm
You can also have archives containing associated pictures to load them with only one file open. Thoses archives might be compressed is the bottleneck is I/O, uncompressed if it's CPU.
A DB is easier to maintain but slower... so it's up to you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With