Article ID: 2206869 - Last Review: February 22, 2011 - Revision: 4.2

.Net Application Consuming High Memory

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Expand all | Collapse all
Microsoft Professional Advisory Services is a support option that provides short-term, proactive, consultative support beyond break-fix product maintenance needs. This includes working with the same technician for assistance with issues like product migration, code review, or new program development and is a remote, phone-based support option. This service is typically used for shorter engagements, and is designed for developers and IT professionals who do not require the traditional onsite consulting or sustained account management services that are available from other Microsoft support options.

For additional information on Microsoft Advisory Services, including on how to engage, refer to this Microsoft web page:

http://support.microsoft.com/gp/AdvisoryService (http://support.microsoft.com/gp/AdvisoryService)

Microsoft Advisory Services Engagement Scenario - .Net Application Consuming High Memory

Customers write various applications based on .NET. Unfortunately lots of customer are under  the impression that the Garbage collector takes care of the memory management and a developer one doesn't have to worry about memory management. Unfortunately this is not true in cases where developers misuse the memory. Garbage Collector takes care of memory management as long as the developers do diligent coding. When this breaks, the app runs into performance issues, Out Of Memory issues.

Microsoft Advisory Services Engagement

Scoping questions

  1. What version of CLR the app is on, check the latest.
  2. Is this a 32 bit or a 64 bit application?
  3. What type of application? Generally any database related, graphics related app would consume high memory compared to normal regular application.
  4. Is the app running into OOM? Customer's easily get confused with memory consumption with actual memory leak.
  5. Is the app using heavy System String objects? If so, consider using String Builder rather than creating string objects recursively.
  6. Is the app heavily using Pinning?

Self-Help resources for this scenario

Below is a list of self-help resources or this scenario. These resources may also be used by Microsoft Support Engineers during an Advisory Services engagement.

Good understnading of pinning (http://blogs.msdn.com/yunjin/archive/2004/01/27/63642.aspx)

Garbage Collector (http://msdn.microsoft.com/en-us/magazine/bb985010.aspx)

Maoni's blog on Garbage Collector (http://blogs.msdn.com/maoni)


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use (http://go.microsoft.com/fwlink/?LinkId=151500) for other considerations.

APPLIES TO
  • Microsoft .NET Framework 2.0 Service Pack 1 (x86)
  • Microsoft .NET Framework 3.0 Service Pack 1
  • Microsoft .NET Framework 3.5
  • Microsoft .NET Framework 3.5 Service Pack 1
  • Microsoft .NET Framework 4
Keywords: 
kbproadvisory kbinfo kbsurveynew kbtshoot kbnomt kbproperformance kbpronetframework kbprodeveloper KB2206869