Iis – How to calculate the “ideal” value for maxProcesses for an IIS 7 web garden

iisiis-7windows-server-2008-r2

Reading e.g.:

and googling ever keywords I can think of, I still seem to find now answer to my question:

How can I calculate what a good number for the maxProcesses value in IIS would be?

I would have expected some rules-of-thumb like:

  • "Never go above 50" or
  • "Divide your available RAM by 20" or
  • "One process per 100 concurrent requests"

Can someone give me some hints on how to find out?

Update 2014-01-21

I've came accross the article "Boosting performance using an IIS web garden" which seems to recommend something like 1 process per physical processor core.

Best Answer

OK, flip the question and answer this one: Why are you web gardening? Rule of thumb is: Don't web garden.

If you must use a web garden, then the "right" way to do it depends on the reason that brought you there:

Too much memory for a single 32 bit process?

  • How much memory does your app need?
  • Would a 64-bit worker process be more efficient?

Some sort of thread exhaustion issue? (long-running threads tying up "all" your app framework's thread pool)

  • Can you increase the thread pool within the same process?
  • How many threads is the limit?
  • How many do you need?

Process-level lock/mechanism causing some sort of perf issue

  • What point can the app scale to?
  • How many processes would achieve the scale required?

Etc, etc.

The key thing to notice about every example above is that it depends. It depends on your app's characteristics. It depends on why Web Gardening is an appropriate solution to your problem. It depends on performance measurements you need to have taken in order to sensibly reach the conclusion that web gardening is the solution for your problem.

Each of the characteristics above would lead you to a different answer - some about memory utilization, some about thread concurrency, some about actual tested performance issues and resolutions for them.