1) What is an Application Pool?
Application pool is a collection of one or more websites running as a single process called w3wp.exe with a single identity.
Application pools provide encapsulation among hosted web applications so that any applications that are running outside a given application pool cannot affect the applications in the application pool. You can have multiple websites running under a single application pool, but you can not have a single website running in multiple application pools.
2) What is Private Memory of Application Pool?
Private memory is the Maximum amount of memory (in KB) a worker process can consume before causing an application pool to recycle.
In case of dedicated application pool, certain amount of private memory is assigned. For example, If you allocate 250 MB of memory to a website, it cannot use private memory more than 250 MB. If this application attempts to occupy more than 250 MB RAM, application pool will get automatically recycled. Additionally, website with 250 MB private memory only takes 100 MB while running, its 150 MB memory can be utilized to serve other websites.
3) What is Shared Application Pool?
An Application pool is denoted as Shared, if there are several web applications/websites running under the same application pool.
If you set single application pool to 20 websites, for all of them only one W3WP.EXE process will be created. On a contrary, if all 20 website have separate application pools, 20 W3WP.EXE processes are created. Hence, there's a large memory overhead to run number of w3wp.exe processes.
By running several websites on shared application, you can conserve significant amount of RAM and other resources as well.
Shared application pool has significant benefit of sharing the server resources. Therefore, If you have no specific reason for splitting them up, it's better to keep them together.
4) What is Dedicated Application Pool?
An application pool is said to be Dedicated, if each web application has its own application pool.
In other words, each website is isolated with other websites having separate application pool. Isolating websites over application pools allow more rigid security between the applications, as well as preventing one website from crashing if another one does. Dedicated application pools have following advantages over shared application pool:
- You can assign resource-intensive websites separate application pools so that the performance of other applications does not decrease.
- If an application in one application pool fails, applications in other application pools are not affected.
- By isolating applications, you reduce the chance that one application will access the resources of another application.
- You can have different application pool settings for different applications.
- You can run untrusted and third party applications in a very restrictive environment so they do not get un authorised access to other applications.
- The event when you need to recycle the Application Pool, you can do so for only one site without affecting the performance of the others.
- Each application pool will have has its own private memory along with its own processes. Therefore, it will consume more server resources especially memory.
5) What is the Best Practice? Should I create an Application Pool for each application OR share an Application Pool with numbers of applications?
It really depends on the number of websites, server resource, type of web application and website requirements. When several applications run inside the same application pool they have the same resource and same security level. Therefore, if one website starts having issues, it could cause frequent application pool recycles that could impact all other. To be in safe side, you can assign one application pool per website. Although, it's not necessary in all cases. Following are some of the things, you can consider:
If your web application is important, assign separate application pool.
If your web application is third party application and you are uncertain about its code, definately separate application pool.
If your application is resource-intensive and creating major resource Spikes, separate application pool.
6) How do I determine memory requirement of website?
At first place, you should have web server with the enough resources. Now, give the application an above-average amount of memory and monitor it for a few days, under normal usage.
This will give you better estimate of the resource requirements of this application. Now, decrease the application memory gradually. Meanwhile, continue measuring the impact of the changes. Determine lowest amount of memory at which your Website gives the Optimal performance. This specific memory amount is memory requirement of your application.
7) How do I configure WebsitePanel to automatically assign dedicated application pool when website is being created?
Please follow our step by step guidance here.