Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Websites Memory Usage For Multiple Websites with same DLLs

We are moving a range of Cloud services Web Roles to Azure websites - currently running on App Service plan/pricing tier - Standard 1 medium.

The websites are all identical and at some point we will re-write out code base to be properly multi-tenanted. However we are currently hosting them as multiple websites on a single Azure web hosting plan.

In terms of memory usage will Azure share the identical Dlls e.g. all the Nuget packages/core application Dll? Or do we need enough memory to load a copy of each Dll per websites? Effectively I am hoping to share you can share common assemblies across AppPools.

I have seen mention of settings that MS was adding to IIS to support better density for shared hosting providers. I believe .Net 4.5 added support for interned Dll. Are there any settings etc that affect how Azure handles this situation? We are currently running at 94% memory consumption of our 3.5GB and wanted to understand whether we would need to scale up soon. I would hope Azure would be able to do something under the covers as obviously MS want to maximize density.

like image 880
GraemeMiller Avatar asked Mar 24 '15 15:03

GraemeMiller


1 Answers

Each WebApp is isolated by the app-pool so if you have multiple copies of the same site, even if they are identical, they will all load their own copy of the assembly into memory.

There is also the security sandbox due to the multitenant nature of the service so interning will not work against that.

To monitor memory usage, you can look at the app service plan. Also useful is process explorer (WebApp>tools>process explorer)

like image 115
Byron Tardif Avatar answered Oct 21 '22 11:10

Byron Tardif