Why create a web garden?

  • Thread starter Thread starter Yash Ganthe
  • Start date Start date
Y

Yash Ganthe

Hi,

If the server has multiple CPUs, it is argued that in order to keep
all CPUs utilized, we should create a web garden so that multiple w3p
processes are spawned by IIS.

I know that w3p internally uses threads from the CLR thread pool.
My question is, even if we do not create a web garden, will the
multiple threads not be running on multiple CPUs?

Why is CPU utilization the argument in favor of web garden?

Thanks,
Yash
 
Yash Ganthe said:
Hi,

If the server has multiple CPUs, it is argued that in order to keep
all CPUs utilized, we should create a web garden so that multiple w3p
processes are spawned by IIS.

I think if the server has multiple CPUs (as opposed to multiple cores) then
you will run as as web-garden by default.
I know that w3p internally uses threads from the CLR thread pool.
My question is, even if we do not create a web garden, will the
multiple threads not be running on multiple CPUs?

There is more to it than simply multiple threads. In a web-garden you run
multiple worker processes. In a single worker process with multiple threads
each thread runs in the same memory space, which means that they all share
the same global data, the same application cache etc. In a web-garden
because you have multiple worker processes each worker process runs in a
separate memory space, so the threads in one don't share data with threads
in another. So if you rely on data in the application cache then it might
not be there for example.
Why is CPU utilization the argument in favor of web garden?

I think it allows better utilization of the available resources. I wouldn't
have thought that there was much in though, but then I've never benchmarked
it.

On a busy server there may be performance benefits because presumably there
is a limit to how many requests a single worker process can respond to.
 
Back
Top