Dual CPU and Webgardening

R

RezaA

We are using a webserver with dual processors.Web gardening is set to off
and our application is in an application pool with *ONLY* one
workerprocess.I just wondered if our application in this case can take
advantage of the other processor of box in which the webserver is
installed.I was reading this article :

http://msdn.microsoft.com/library/d...us/cpgenref/html/gngrfProcessmodelSection.asp

In this it say that if WebGarden is set to false this :
"Indicates that CPU usage is scheduled by the Windows operating system. The
cpuMask attribute is ignored and only one worker process will run. The
default is false."

Dose this mean that OS will use the other CPU automatically without having
webGarden enabled in our application?


Thanks For your help.

Reza Alirezaei
April/18/2005
 
B

Brock Allen

Dose this mean that OS will use the other CPU automatically without
having webGarden enabled in our application?

Yes, the OS will be able to run multiple threads of the worker process on
2 CPUs at once. WebGardening runs a copy of the worker process for each CPU.
The intent is to reuse cache and other lower level optomizations as such.
 
R

RezaA

OS will be able to run multiple threads of the worker process on 2 CPUs
**at once** refferes to the fact that OS consider all 2 CPUs as one stronger
CPU for example and it dosen't load balance it on 2 CPUs ,am I right?

Thanks
 
B

Brock Allen

OS will be able to run multiple threads of the worker process on 2
**at once** refferes to the fact that OS consider all 2 CPUs as one
stronger CPU for example and it dosen't load balance it on 2 CPUs ,am
I right?

The OS schedules threads. If the process (the worker process in this case)
has more than one thread then it's possible that two different threads from
that process will be running at the same time. So when I said "at once" I
really meant "at the same time" (sloppy wording on my part).

So in both configurations, both CPUs will get used. It's just that with a
web garden each process is marked as having a preference as to which CPU
it runs on, and the OS tries to honor that. This saves the OS from having
to flush the cache and this is a perf boost.

Did that help?
 
R

RezaA

Yes it really helped,but I'm still kind confused what is the difference
between "at once" and " at the same time":)
Let's pretend that there are 5 threads in worker process :

1) you mean OS runs for instance two threads of worker process on CPU#1 and
3 threads of worker process in CPU#2?

2)This might be an stupid question ,each person who is working with the
application creates a thread in worker process?each instance of our
application is one thread?

Thanks
 
B

Brock Allen

Let's pretend that there are 5 threads in worker process :
1) you mean OS runs for instance two threads of worker process on
CPU#1 and 3 threads of worker process in CPU#2?

It could, but it will only run one thread on one processor at one time. So
you can't run two threads on a single processor at the same time.
2)This might be an stupid question ,each person who is working with
the application creates a thread in worker process?each instance of
our application is one thread?

In ASP.NET there is a pool of threads per worker process. As a request arrives
into ASP.NET a thread is removed from the pool to handle the request. Once
the request is complete the thread is returned to the pool. By default, the
worker process has a maximum of 25 threads per CPU. This is configurable
in machine.config.
 
J

Juan T. Llibre

Maybe we should add that a worker process handles
all the requests for all the Applications which run under
it in the same Application Pool.

So, we can have multiple application pools, each running
in its own worker process, and each of them taking care
of as many threads as are configured for each worker process.

The CPU affinity determines whether 1, 2, 3, 4 or more,
processors are able to handle ASP.NET requests.

The guys who wrote ASP.NET are geniuses!
 

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,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top