Web Garden - What's The Benefit?

  • Thread starter Thread starter Cramer
  • Start date Start date
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.
 
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

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

********************************************
| Think outside the box! |
********************************************
 
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.





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
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)
 
Back
Top