Solved

IIS 7 Application Pool Guidance

Posted on 2009-07-03
14
2,915 Views
Last Modified: 2013-11-07
Hi All

I am looking for some guidance on application pool usage within Server 08, IIS7 and .NET 2.0 (if it helps the server is a dual quad core xeon 2.6 with 8gb ram and fast HDD's)

On our server we have approximately 100 sites. They all use a common DLL and set of files. Each website is configured with locally relevant files in d:/webfiles/websitename/wwwroot/
Then each website has a virutal directory that maps to a d:/webfiles/common/ folder. The application runs locally and within the shared virtual directory.

All websites and virtual directories are currently using the same "Default Application" pool setup in IIS. We also have DLL's running the Global Assembly Cache, but I believe this is of no consequence here.

My question is, which is a better setup in terms of performance and resiliancy?
1 website = 1 application pool serving the local website and virtual directory?

or

Stick with current layout mapping all websites and VD's to the same Application Pool?

I know that each website and virtual directory must use the same app pool because of the way our virtual directory utilises session management with the Common directory. I am happy with running it 1 website, 1 app pool.

However, my thoughts are for every application/virtual directory running the Application Pool (whether individual or shared) must load into memory a copy of that DLL and other managed code. It must then also swap memory and process requests all inside the same shared piece of memory and worker process (possibly only utilising one CPU?).

Are there limitations on how many requests a single work process can handle, and would it be more efficient to let each website have its own worker process and utilise the 8 core's and 8gb of memory more efficiently? Would it make a difference?

Thanks for your help.
0
Comment
Question by:eonic
  • 6
  • 3
  • 2
14 Comments
 
LVL 37

Expert Comment

by:meverest
Comment Utility
Hi,

it is always best to isolate applications into independent app pools.  When the applications are small or seldom used, then it is OK to group them into a single pool.

the idea of seperation is so that when there is a problem with any application, it does not affect any other one.  The idea of sharing an application pool is to reduce resource overheads when there are a large number of relatively low demand apps.

at the very least, you should make a seperate application pool per customer (or per web site)

cheers.
0
 
LVL 1

Author Comment

by:eonic
Comment Utility
Hi,

Can you pass any comment on the usage of the CPU cores and app pools, would I be right in saying that if you share a single app pool that app pool can only utilise 1 of the available 8 cores on my server?

Also would it cause performance issues with it only using that one piece if allocated memory.

I am confident it is better for redundancy, however performance is also a big concern.

Thanks for your help
Anthony
0
 
LVL 37

Expert Comment

by:meverest
Comment Utility
Hi,

you can set processor affinity for individual application pools, if you want to - check out SmpAffinityMask settings.

>> would I be right in saying that if you share a single app pool that app pool can only utilise 1 of the available 8 cores on my server?

only if you /intend/ to do that.

cheers.
0
 
LVL 22

Assisted Solution

by:cj_1969
cj_1969 earned 250 total points
Comment Utility
Just to throw this into the mix ...
Using app pools will also depend on how you use the applications on the server.
Using app pools will logically seperate the applications from each other, not only for execution for also for interaction.  
SO ...
If any of the applications need to redirect to another then you should try this ... they might have to stay in the same application pool if they need to do this or to share data or pass variables or something along these lines.
0
 
LVL 1

Author Comment

by:eonic
Comment Utility
Hi

In terms of interacting with each other, the Websit Root & Common virtual directory (found inside every website) uses the same app pool. This is required as you said to ensure session data etc is transferred. No data is transferred cross domain, only within the /root and /common folder of each website.

So to try and acheive a solution for me...

What would you suggest. Bearing in mind 150 completely seperate websites. But all utilising the same DLL in seperate applications. This means if i set it up al usng same app pool, there would be 150 applications all loading and using a copy of the same DLL into that app pool.

All in one? or Each website in seperate app pool?

Bearing in mind i am trying to acheieve a good balanc between performance and resiliancy.

Thanks
Anthony
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 37

Expert Comment

by:meverest
Comment Utility
Hi,

I maintain that it is /always/ preferable to separate your applications into independent pools.  the only reason that you would not do it is because you don't want to.  You might not want to if you have lots of low-utilisation applications and you want to share resources for them all.

Regarding sharing of session information between applications, there are two comments that I would like to make:

1.  you will only share session information if the applications are accessed by the same hostname - the browser will not submit the session cookie between web sites (that is a security requirement)
2.  if you are sharing session data, then they are arguably the same application.  If you really need to share data between applications, then session data is not the way to do it anyhow.

I don't understand why access to a single dll would require only one application pool.  If the dll is constructed properly thread-safe, then it should not make any difference if it is accessed via one application pool or many.

Cheers!
0
 
LVL 22

Expert Comment

by:cj_1969
Comment Utility
I agree ... seperate app pools is the preferred way to go.
meverset,
in your comment you identified the reason why you MIGHT need to do a single app pool ... "If the dll is constructed properly " ... IF being the operative word.  I've worked with too many apps and programmers to assume that it is.  This would need to be tested and verified.
0
 
LVL 1

Author Comment

by:eonic
Comment Utility
Can a single app pool utilise more than one processor?

Is there a limit on the amount of memory a 64bit worker process can utilise?

Anthony
0
 
LVL 37

Accepted Solution

by:
meverest earned 250 total points
Comment Utility
Hi,

>> Can a single app pool utilise more than one processor?

they do by default.  you can change this behaviour if you want to:

http://technet.microsoft.com/en-us/library/cc780123(WS.10).aspx

>> Is there a limit on the amount of memory a 64bit worker process can utilise?

not that I am aware of.  but again, you can define a limit (if you want to) by causing it to recycle when it reaches a defined consuption level.

Cheers.
0
 
LVL 37

Expert Comment

by:meverest
Comment Utility
I believe that the question has been fully answered by the two expert participants.
0
 
LVL 37

Expert Comment

by:meverest
Comment Utility
hello suggest split: solution http:#24894109 assist http:#24784426  

cheers.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now