title: High rate of Gen 1 garbage collections
body: <p>I am profiling an application(using VS 2010) that is behaving badly in production. Once of the recommendations given by VS 2010 is:</p>
  
  <blockquote>
    <p>Relatively high rate of Gen 1 garbage collections is occurring. If, by
    design, most of your program's data structures are allocated and
    persisted for a long time, this is not ordinarily a problem. However,
    if this behavior is unintended, your app may be pinning objects. If
    you are not certain, you can gather .NET memory allocation data and
    object lifetime information to understand the pattern of memory
    allocation your application uses.</p>
  </blockquote>
  
  <p>Searching on google gives the following link=> <a href="http://msdn.microsoft.com/en-us/library/ee815714.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ee815714.aspx</a>. Are there some obvious things that I can do to reduce this issue?I seem to be lost here. </p>
  
  <blockquote>
    <p>Double-click the message in the Errors List window to navigate to the
    Marks View of the profiling data. Find the .NET CLR Memory# of Gen 0
    Collections and .NET CLR Memory# of Gen 1 Collections columns.
    Determine if there are specific phases of program execution where
    garbage collection is occurring more frequently. Compare these values
    to the % Time in GC column to see if the pattern of managed memory
    allocations is causing excessive memory management overhead.</p>
    
    <p>To understand the application’s pattern of managed memory usage,
    profile it again running a.NET Memory allocation profile and request
    Object Lifetime measurements.</p>
    
    <p>For information about how to improve garbage collection performance,
    see Garbage Collector Basics and Performance Hints on the Microsoft
    Web site. For information about the overhead of automatic garbage
    collection, see Large Object Heap Uncovered.</p>
  </blockquote>