Last post Oct 11, 2010 04:54 PM by atconway
Oct 08, 2010 01:01 PM|yashgt|LINK
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?
Oct 11, 2010 04:54 PM|atconway|LINK
I probably sound like a broken record at times with these IIS questions, but the reason you are probably not getting much traction on this question here is that most that visit this forum have enough knowledge to be dangerous with IIS, but most are not server
or infrastructure aficionados. The IIS forum folks could answer these types of questions really well. However, I will put this in from the link below which may help, as usually most I see (including myself) seek out a 'web farm' as opposed to a web garden:
"The old motto "not everything that shines is gold" is an apt quotation here. Web gardening enables multiple worker processes to run at the same time. However, you should note that all processes will have their own copy of application state, in-process
session state, ASP.NET cache, static data, and all that is needed to run applications. When the Web garden mode is enabled, the ASP.NET ISAPI launches as many worker processes as there are CPUs, each a full clone of the next (and each affinitized with the
corresponding CPU). To balance the workload, incoming requests are partitioned among running processes in a round-robin manner. Worker processes get recycled as in the single processor case. Note that ASP.NET inherits any CPU usage restriction from the operating
system and doesn’t include any custom semantics for doing this.
All in all, the Web garden model is not necessarily a big win for all applications. The more stateful applications are, the more they risk to pay in terms of real performance. Working data is stored in blocks of shared memory so that any changes entered
by a process are immediately visible to others. However, for the time it takes to service a request, working data is copied in the context of the process. Each worker process, therefore, will handle its own copy of working data, and the more stateful the application,
the higher the cost in performance. In this context, careful and savvy application benchmarking is an absolute must. "
The Web Garden Model:
ASP.net WebGarden and Webfarm:
Web Gardens and Threading Issues:
...and like I mentioned, you might want to check out the IIS forum as well:
Hope this helps a bit!