Iis – Serving images with IIS 7.5

iisimages

My website has quite a lot (>1M) of different image files.

I have separate subdomain for images. I do not need asp.net for them so I set it not to use .net framework.

  • Maximum working processes is set to 50.
  • Logging is disabled.
  • Queue length is 10000.
  • System memory cache is about 1GB
  • Avarage number of requests is 20 requests per second.
  • System has 2xSAS HDD (mirror)

I am noticing that images occasionally are not serving properly. Just no answer without http error.

When I enabled logs for 1 hour I noticed that about once per minute, it takes more than 30 second to serve a file (most of them are less than 100KB)

How I can improve or troubleshoot it? What is the best way to serve random images on Windows?

Is it ok that time taken is so high? (does it depend on client connection?)

How to distinct network/datacenter error from iis issue?

Best Answer

Try enabling caching of all files served, by setting the frequentHitThreshold to 1 (instead of the default value of 2 consecutive requests within 10 seconds). This should take some load off of the disks if that's your bottleneck. For more info on setting this attribute, see: http://www.iis.net/ConfigReference/system.webServer/serverRuntime

You might also wan't to configure HTTP Compression for static content like this: http://technet.microsoft.com/en-us/library/cc754668(WS.10).aspx