Last post May 20, 2010 04:02 PM by mgp22
May 19, 2010 03:59 PM|mgp22|LINK
In my ASP.NET application, I have customer profile photos in a sub-folder. The customer photo is displayed on their web profile using a simple html IMG tag. With regard to performance, how many files can I store in a folder before performance starts to
degrade due to seek time - the web server accessing the file system to find the specified file?
May 20, 2010 02:27 AM|fashfaq|LINK
minimum 500 or 1000 images per folder is better
May 20, 2010 02:39 AM|alaa9jo|LINK
That's a difficult question because it depends on many things;the capabilities of the server (CPU speed, hard-drive (speed,size and file system;NTFS,..etc),memory,cache,...etc) and on the operating system too (i.e. Windows server 2008 can access/seek files
faster than windows server 2003).
Anyway,I think that you will have to do a test on the server and see how many files/sub directories can a folder show within i.e. 1second.
May 20, 2010 08:37 AM|SGWellens|LINK
The inner search structure is a binary tree. That means the relationship between the number of files and the search time is logarithmic (reverse exponential).
If the number of files increases from 2 to 4, the search time increases 1 nanosecond
If the number of files increases from 2g to 4g, the search time increases 1 nanosecond.
May 20, 2010 02:05 PM|mgp22|LINK
Thank you all!
I should mention that the .NET app is hosted on a Windows 2008/IIS 7 shared hosting server by CrystalTech. I guess I'm just looking for a rough estimate of how many I image files I should limit the folder to before creating a new folder...
May 20, 2010 02:08 PM|galratner|LINK
My general rule for this is: create a new folder for year and month. Its easy to implement and it works great.
May 20, 2010 04:02 PM|mgp22|LINK
that's a good idea. i still hope to find out how many files is the limit for good performance.. :(
UPDATE: I found this on the web: "Although this isn't an answer to your question, keep in mind that with many file systems performance will start to degrade if a directory has more than X files. I think it around 30,000."