1

We are using Azure Websites as our platform provider and I am debugging some memory problems related to a managed application that we need a practical way of knowing why my application consumes so much memory .

We have got like 50 users online but consuming 1.5 GB of IIS process coming from 120 threads. I tried taking memory dump but I did not get enough clues to solve the problem. In the past I was using yourkit.net profiler. It was so smooth to spot the issues as I was able to monitor the thread and their memory usage.

My working set as the amount of memory in the private working set plus the amount of memory the process is using that can be shared by other processes is very close to the private_memory.

My private bytes is the current size, in bytes, of memory that my process has allocated that cannot be shared with other processes. So it looks like I am using all these memory.

But could not decide how come I use this much memory. Every user costs like more than 25 megabytes for my system. And that creates a real concern for my scalability.

I installed NewRelic and I did not get so much help from there.

Azure WebSites

New Relic

Rıfat Erdem Sahin
  • 1,738
  • 4
  • 29
  • 47
  • Personally I prefer ANTS memory profiler tool to identify which instance causes memory problem. – hkutluay Jan 13 '15 at 12:24
  • We use Azure Websites. So the problem is I could not generate the same traffic on my pc. And the environment in the Azure is very different. – Rıfat Erdem Sahin Jan 13 '15 at 12:26
  • 1
    Does the application use Session? Cache? Other memory intensive resources? Are you keeping data stored in any static types? There are many things that can cause memory consumption, without seeing your code, answering this is a stab in the dark. – danludwig Jan 13 '15 at 12:32
  • If every user uses ~25MB each - is this the case on your local environment too? Or is it the case that the first 10 users use 1MB each but then it takes a jump when the 11th enters (for example)? – Fermin Jan 13 '15 at 12:38
  • The profilers all support dump analysis, so you should first get a dump generated from Azure, http://azure.microsoft.com/blog/2014/07/08/daas/ – Lex Li Jan 13 '15 at 12:46
  • tried Daas not enough information for me to spot the issue. Also we build a continuous deployment system and the systems code changes daily. – Rıfat Erdem Sahin Jan 16 '15 at 09:39

3 Answers3

2

Why don't you download the GC dump and analyse it on your laptop (I use Visual Studio Ultimate, but maybe yourkit.net profiler can import it as well?)

GC Dump

Eelco Koster
  • 138
  • 1
  • 3
1

Take a look at the DaaS site extension (you can access it from http://.scm.azurewebsites.net). It has a memory dump analyzer which can analyze your memory dumps for you and highlight any issues that it finds.

You can find more details here: http://azure.microsoft.com/blog/2014/07/08/daas/

Zain Rizvi
  • 23,586
  • 22
  • 91
  • 133
  • the thing is Daas does not provide the information we need on production system. And taking dump using Daas kills on active sessions as it puts a pressure on the system which is under high stress – Rıfat Erdem Sahin Jan 16 '15 at 09:41
  • @RıfatErdemSahin That's true. What if you could use the DaaS dump analyzer on a dump you manually took, only having to pay for the resource utilization of the dump analysis? Interested? – Zain Rizvi Jan 16 '15 at 19:59
  • Tried that with no success. We need to be able to see what creates the leak. That requires multiple dumps on our production site.And it takes too much time to collect these. Also the dump results did not create meaningful results for me so I installed yourkit.net to my local machine. And found this http://stackoverflow.com/questions/27980800/system-web-optimization-assetmanager-increases-memory-usage – Rıfat Erdem Sahin Jan 19 '15 at 08:32
0

Azure recently launched the ServiceProfile. This tool should help you determine memory usages on intensive processes. https://serviceprofiler.azurewebsites.net/

pmeyer
  • 890
  • 7
  • 31