Luis Delgado
Luis Delgado

Reputation: 3744

How to measure memory consumption in Azure web roles

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

Upvotes: 2

Views: 891

Answers (2)

RedGreenCode
RedGreenCode

Reputation: 2299

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.

Upvotes: 1

Sandrino Di Mattia
Sandrino Di Mattia

Reputation: 24895

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

Upvotes: 1

Related Questions