I'm trying to understand memory reporting in the Azure App Service. I have an Azure App Service plan of "S1" which includes 1.75 gigs of ram.
When I look in the Kudu process explorer and add up and add up all of the "private memory" of various , my app is using ~990mb. I don't have any other processes or deployment slots running. One single App Service, 1 deployment slot running.
However, in the dashboard, it says my memory percentage usage is 82% (very stable between 80-85% btw). 82% of 1.75 gig is 1.4 gig.
So I'm trying to figure out where the other 400 meg is going, or if the dashboard is incorrect? Are there other processes which are running which aren't included in the process explorer? The details of the process explorer is
w3wp.exe (<- main app service) ~765 meg
snapshotuploader64.exe ~33 meg
snapshotuploader64.exe ~33 meg
w3wp.exe (scm) ~126 meg
cmd.exe ~4 meg
DaasRunner.exe ~30 meg
In kudu -> Process Explorer, it only shows the memory used by the scm site and the web instance.
In fact, the memory is also used by the hosting environment like OS / other background tasks, which are not reported in Process Explorer. Even if you create an empty azure web app, in the dashboard, you can still see the memory is used around 50%.
There're some feedbacks / issues about that, see here and here.
Related
I created B1 App Service plan which has 1.75 GB of RAM. I also created one App Service and deployed docker image to it. Right now I stopped the docker image and it has status stopped and it is the only app in that app service plan. The problem is that when I look into Overview of My App Service Plan I see that RAM usage is about 50% - what is using that RAM if my only App Service in that App Service Plan is stopped? How can I check it?
here you can see print screens: https://imgur.com/a/bycVd9U
There are a many things that run in the background. If you have diagnostic logging enabled, backups, any webjobs, etc. those things will cause a rise in your CPU usage.
We recently ran out of memory on our sites under an Azure App Service Plan.
This threw a "Memory Resource Exhausted" error on all Apps.
Clicking "CPU Percentage and Memory Percentage" shows a spike to 82% in last 24 hours.
Navigating to "Metrics per Instance (App Service Plan)" I get a visual of all Web Apps.. Adding up ALL their Working Set in MBs added up to 22% at time of 82% App Service Plan usage.
This SO answer suggests viewing memory usage in Kudu.
Does Azure Dashboard or Kudu have any way to show a break down of specifically "App Service Plan" memory usage?
Watch a quick video to understand different aspects shown in this view
https://www.youtube.com/watch?v=lWeutt1GvRs
Go to the Diagnose and Solve Problems blade for your Azure App in the Azure Portal.
Choose the Availability and Performance category
Choose either Memory Analysis on the left or click on the Memory Usage card on the right
This launches the Memory Analysis tool.
Under the Memory analysis tool:-
The very first thing shown is App Service Plan Density – This checks looks for overstuffed App Service Plans and beeps if it finds that you have too many apps in the same app service plan
An insight is shown if we detect or more apps consuming high memory
Private Bytes consumption for the current app
Physical memory in use for each instance allotted to the App Service Plan
And then Memory Drill down shows Per instance memory drilldown for each app and its associated process running on that instance.
App Level Breakdown
A dated question, but I've found a view that shows this data that I believe did not exist at the time this question was posted.
Go to Diagnose and solve problems and search for "memory" in the input box labeled "Search App Service Diagnostics" at the top of the view. Choose Memory Drill Down in the results.
There you will see a full breakdown of all the apps running per instance on your App Service Plan:
Screenshot 1: Search results for "Memory" in "Diagnose and solve problems" view
Screenshot 2: Full breakdown of memory usages per app per instance on your App Service Plan
I have B3 service plan with 7GB RAM and 3 app services into a resource group. One service requires over 4GB but it throws out of memory exception after 2.4GB usage. It looks like available memory is divided between 3 services evenly. How can I manage RAM usage?
One way I can think of would be to put the apps on separate app service plans. One of your apps requires quite a lot, so why not give it its own plan?
Then you would have one Basic 3 service plan for that app, and maybe a Basic 1 plan for the other 2 if that is enough for them?
Yes, you are correct. The RAM listed for each instance size based on the pricing tier that you choose is for the underlying VM. So, this includes the OS and various infrastructure processes, in addition to IIS and your Web Apps. It is also shared with the App Services deployed under the same App Service plan.
This issue could be related to your web application, you may try the following:
View the memory utilization in Azure new portal
(http://portal.azure.com).
Use kudu Diagnostic Dump to see the information of memory
consumption.
Move the Web App to another App Service plan that has only one Web
App.
I would suggest you refer the blog post How to view the memory utilization of your Azure Web Site for more details.
I am trying to figure out the reason why an Azure WebJob sporadically fails with OutOfMemoryException.
There are 3 App Services assigned to the same Standard 3 App Service plan (4 cores, 7GB RAM). One of them consists of a set of static HTML, CSS and JS files. Another App service is an ASP.NET MVC application. The last one is a set of WebJobs (1 continuous and 3 triggered).
One of the triggered WebJobs is an import which runs at night when there are no traffic from the users. Some times the import fails with an OutOfMemoryException. According to the Azure Metrics graphics, RAM utilization of the Service Plan is never bigger than 50% with an average value of about 40%. The App Service with the job uses up to 1.3 GB of RAM.
My question is how is it possible that OutOfMemoryException occurs, but there is no respective evidence of critical RAM usage on the graphics?
The Azure management dashboard gives you the possibility to monitor metrics such as CPU utilization, network in/out, response time, among others.
But how can you measure consumption/availability of memory? I am running a web app that is memory intensive, and it is hard for me to gauge which instance types (or number of instances) I should provision without having an understanding of the memory situation across time.
Yes, my service is a web role on Azure cloud services, I am not talking about VMs (IaaS) here.
Thanks
In your Azure project, in the Roles folder you'll find a folder for each of your Roles. If you use the latest version of the SDK you'll find a file called diagnostics.wadcfg. This is where you'll be able to configure Performance Counters, like \Memory\Available Bytes. This file will also allow you to configure the sample rate (ex: every 30 sec) and the scheduled transfer period (how frequently the logs should be transferred to your Storage Account).
Then you can use a tool like the Azure Diagnostics Manager to view memory consumption over time.
More information: Using performance counters in Windows Azure
A way to do this from the Management Console:
On the Configure tab for your web role, in the monitoring section, change level to Verbose.
On the Monitor tab at the bottom, click Add Metrics
With monitoring set to Verbose, the available metrics should include Memory Available.