Web Garden - What's The Benefit?

C

Cramer

I think I understand *what* a Web garden is (app running on a server with
multiple processors). But what's the benefit?

I have googled this and have found only articles that describe WHAT and HOW
to set up a Web garden, but not WHY - what's the advantage, and how would I
take advantage of the multiple processors? Is it as simple as me making my
app multi-threaded whereever it is possible and makes sense to do so?

If I run an ASP.NET web app on a server that has multiple processors, is it
automatically considered to be a Web garden? If not, what changes would I
make to the app to cause it to be a Web garden?

Thanks.
 
C

Cowboy \(Gregory A. Beamer\)

Web gardens have nothing to do with multiple processors. They have to do
with multiple web processes. The reason you do this is to spread out your
work across multiple processes (essentially multiple threads, if you want
the simple view) so you can increase the performance by spreading the work
across multiple processes (not processors, although the processes will use
multiple processors, if you have them).

Benefits:
1. Increased performance and availability - a locked process won't stop
every other request
2. Reduced contention for resources
 
J

Juan T. Llibre

re:
!> Web gardens have nothing to do with multiple processors.

It does have to do with multiple processors, Cowboy.
A Web garden is a multiprocessor system on which multiple processors run the same worker process.

Were you thinking of a "Web Farm" ?
In a Web farm, each incoming request can be served by a different machine.

Deploying an ASP.NET application in "Web garden" mode requires two steps.

First, you need to tell the ASP.NET runtime that web gardening is enabled.
To do this, set the webGarden attribute of <processModel> to true.

Then, define the CPU mask through the cpuMask attribute. By default, all CPUs are enabled.

The ASP.NET ISAPI module can then schedule one process per each CPU set in the mask.
 
B

bruce barker

say you have a 4 proc machine and 1 website.

if not in web garden mode, you will have asp.net worker process that hosts
the appdomain. it will create threads and they run on all four procs. because
they are all running in the same appdomain, there will be some contention
between threads and due to locks and context switches.

in web garden mode, you could create a 2 worker processes, each using 2
procs (or 4 worker processes each using 1 proc). in this mode mutilple
requests can be processed by seperate appdomains with dedicated procs. a lock
in one appdomain does not effect the other.

-- bruce (sqlwork.com)
 

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,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top