Right value of "Maximum number of worker processes" in IIS 6.0 for a web garden?

D

Dominic

I'd like to tune the performance of my application in a web garden.
Our server has dual processors. Is there any guideline to set this
"maximum number of worker processes" for web garden? In my
application, stress test shows that setting it to 2 gives a better
performance result. In other words, web garden helps. My first
question is if it helps to set a number larger than the number of
processors in the server. Are they related at all?

If they are not related, how is the performance negatively affected if
I set it to a very large number?

Finally, I read somewhere saying that IIS 6.0 manager settings (e.g.
this value) overrides the values set in machine.config <ProcessModel>
attributes (e.g. webGarden and cpuMask). Is that true? If it's true,
does it mean that I can keep webGarden as false and cpuMask as
0xffffffff by default?

Thanks
Dominic
 
P

Pat [MSFT]

As a starting point WebGardens = #CPU or =#CPU+1 is a good starting point.
The degree to which adding more helps is highly dependent on the
implementation of the application. If the application makes a large number
of long blocking calls (e.g. long SQL/Oracle Queries), more worker processes
will help (assuming that the backend can handle the connection load). If
the application is mostly quick transactions with few (or no) blocking
calls, fewer web gardens will help.

A lot of the performance improvement that you are seeing is the effect of
decreasing contention on some of the locks (e.g. memory/heap). This helps
to a point, but eventually the context switching overhead of the additional
threads eats up more time than the contention, so you go slower. Also, for
every process, there is some amount of memory that is used up. So, the more
memory you dedicate to overhead, the less is available for other performance
enhancing features, like a large cache.


Pat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top