title: Huge amount of objects in GC finalizer queue
body: <p>I am investigating a slow and steady increase in memory footprint of our server .NET application. To facilitate investigation I run a stress test with 6 clients mimicking real load that repeat the same usage pattern over and over.
  As I run over overnight I can see the memory footprint goes up for about few hundred MB. Upon analyzing and comparing the server memory snapshots that are 12 hours apart it turns out that most of the difference is due to <code>ReaderWriterLock</code> instances waiting in a finalizer queue. There are over 6,000,000 of them!?!</p>
  
  <p>Analyzing my code and looking at the GC roots reveals that all the <code>ReaderWriterLock</code> live instances come from <code>DataSet</code> instances in our software. So, I went after <code>DataSet</code> instance creations to try to eliminate it as much as possible. After cleaning up some code and caching some <code>DataSet</code> instances to avoid unnecessary allocations the difference went down by about 25%, but looks like there are more of them.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Why there are so many instances in the finalizer queue - not sure what is causing this?</li>
  <li>I would assume size of finalizer queue can have negative impact on GC and overall application performance (it looks slow to me after a while)?</li>
  <li>What should I do to reduce the size of finalizer queue? Call dispose on every <code>DataSet</code> instance that I do not need anymore?</li>
  </ol>
  
  <p>Note that I am using 'Server' mode GC as our server does process requests in parallel on different threads.</p>