Web Gardens

G

Guest

We are hosting our ASP.NET application on a multi-proc (4) machine but we're using InProc session state. Machine.Config has webGarden=false at the moment and only one ASP.NET worker process in running. Therefore, my guess is that running on a multi-proc box is wasted because only 1 CPU is being used - is this correct

My understanding is that in order to make use of all 4 CPU's we need to

1. Change machine.config (webGarden=true + cpuMask=0x0f
2. Configure web.config to use either the StateServer or SQL Server state machine
3. Make all session state types serializabl
4. Start the StateServer service (or use SQL Server

Are my thoughts correct

Or....is there anyway I can make full use of the 4 CPU's but keep InProc session state? I guess this means I would effectively be giving session affinity to a CPU because each session must be served from the same CPU \ ASP.NET worker process \ InProc session state to read\write to session state. I.e. To prevent subsequent requests from being served from a different ASP.NET worker process and thus not able to access stuff put into session state on a previous request - however, this sounds like a very bad idea

All thoughts on this appreciated

TIA.
 
D

Dino Chiesa [Microsoft]

First, you note that there is just one ASP.NET Worker process, and conclude
that it runs on just one CPU. This is incorrect. Processes contain
multiple threads, and those threads can take advantage of multiple CPUs.
Maybe it's non-intuitive, but a single process can span multiple processors.
Nonetheless, for reasons other than performance, you probably want a web
garden.

2nd: Are you using IIS6 and WS2003? or some earlier version of Windows
Server?
The settings are different.

If you use WS2003 and IIS6, by default ASP.NET uses the IIS 6.0 worker
process isolation mode. The admin of this is done through the IIS6 MMC
panels, and not through the .NET machine.config file. In particular, many
of the System.web\processModel settings in machine.config mostly do not
apply, they are silently ignored. This includes @webGarden. Check the
technet doc describing how and when to configure web gardens, and the
implication for session state.
http://www.microsoft.com/technet/pr...r2003/proddocs/deployguide/iisdg_net_hepj.asp
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconperformanceapplicationpoolsettings.asp

On the other hand, if you are using IIS5 (W2000), then the machine.config
settings apply, including @webgarden and @cpumask. When using webGarden in
this way, each ASP.NET process has its processor affinity set to a
particular CPU. So in this special case, each single process is confined to
a single CPU.

Here's some doc that discusses processor affinity. This is a per-process
property (not per-thread).
http://msdn.microsoft.com/library/e...nosticsProcessClassProcessorAffinityTopic.asp

One <processModel> thing that applies in both WS2003 and W2000 is the number
of IO threads per process.

In the end, you have to test it to see what works best in your situation.
Each app is different. There is no "one-size" solution, which is why the
options are there (InProc vs StateServer vs SQL, web garden vs not, # of io
threads, etc). Also remember performance (max throughput) is not the only,
and should probably not be the primary, criteria for judgement. Probably
you want to consider reliability or average response time, as higher
priorities than max throughput.

-Dino


Alan Partridge said:
We are hosting our ASP.NET application on a multi-proc (4) machine but
we're using InProc session state. Machine.Config has webGarden=false at the
moment and only one ASP.NET worker process in running. Therefore, my guess
is that running on a multi-proc box is wasted because only 1 CPU is being
used - is this correct?
My understanding is that in order to make use of all 4 CPU's we need to -

1. Change machine.config (webGarden=true + cpuMask=0x0f)
2. Configure web.config to use either the StateServer or SQL Server state machines
3. Make all session state types serializable
4. Start the StateServer service (or use SQL Server)

Are my thoughts correct?

Or....is there anyway I can make full use of the 4 CPU's but keep InProc
session state? I guess this means I would effectively be giving session
affinity to a CPU because each session must be served from the same CPU \
ASP.NET worker process \ InProc session state to read\write to session
state. I.e. To prevent subsequent requests from being served from a
different ASP.NET worker process and thus not able to access stuff put into
session state on a previous request - however, this sounds like a very bad
idea?
 
G

Guest

Ok. Thanks for the info. We're using Win2K + IIS5.

When performing some load tests we're seeing that although all 4 procs are being used, 1 in particular is being stressed more than the others.

I know that implementing a web garden has other benefits, but would we get a performance increase by moving to this configuration? I appreciate that threads spun off my the asp.net worker process can span the other cpu's.
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top