Azure Websites Memory Usage For Multiple Websites with same DLLs
Asked Answered
B

1

7

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.

Bernabernadene answered 24/3, 2015 at 15:24 Comment(4)
A worthwhile question, have you tried to use this aspnet_intern.exe in any of your web roles. I don't think microsoft does interning on websites as its shared hosted like model.Pectoral
No. We have never needed to aspnet_intern on web roles as each customer had their own web role. For websites we have aren't using the shared hosting option. I have no idea how MS have that setup internallyBernabernadene
I have just now tweeted this to Scott Hanselman and Vettorio. Lets wait for them to respond back, they are the experts that I can think of in MSPectoral
Good call - if Scott Hanselman doesn't know about awesome features who would :)Bernabernadene
S
2

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)

Stamm answered 26/10, 2015 at 19:59 Comment(2)
If I have a single large reserved server isn't that mine though? Or are other users sharing that IIS instance? If not couldn't interning work? I guess it is probably not a common scenario.Bernabernadene
I currently have 238 websites all sharing multiple dlls (32 of them), it would be perfect to be able to 'intern' these. I have found that I have to keep each webserver at 80% memory otherwise during peak times they run out and all the sites are unresponsive. I created an azure feedback for this: feedback.azure.com/forums/169385-web-apps-formerly-websites/…Cadmann

© 2022 - 2024 — McMap. All rights reserved.