<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP Application, Large Memory Needs, and 64bit IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2006/02/01/ASP-Application-Large-Memory-Needs-and-64bit-IIS6.aspx</link><description>Ok... I still have not gotten around to writing that uber blog entry/guide on the ins and outs of 64bit IIS6 and WOW64... so I wager I should take little bites here and there as motivation. Writing big long technical articles that try to answer lots of</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: ASP Application, Large Memory Needs, and 64bit IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2006/02/01/ASP-Application-Large-Memory-Needs-and-64bit-IIS6.aspx#523574</link><pubDate>Fri, 03 Feb 2006 01:09:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:523574</guid><dc:creator>sam</dc:creator><description>Thanks for the info.
Sorry i was not clear. I am recycling the memory based upon the virtual memory size. I presumed that by virtual memory it means memory stored on disk in the page file. Is this not the case?

There is still physical ram free on the machine when i see the out of memory problems leading me to suspect either a memory leak or memory fragmentation. 

I see the virtual bytes counter rise quickly to 1500mb (2-3 times a day) whereas the physical Ram used by the w3wp process is only a few hundred MB with plenty of RAM left to spare. I'm not sure why the virtual memory grows so high when there is enough Physical RAM. I have tried using DebugDiag but the report generated is too high a level for me to understand without more 
documentation.

An example from the DebugDiag report on the w3wp process when it had a high virtual memory usage:

Virtual Memory Summary
      Size of largest free VM block   75.21 MBytes
      Free memory fragmentation   88.13%
      Free Memory   633.53 MBytes   (30.93% of Total Memory)
      Reserved Memory   1.03 GBytes   (51.29% of Total Memory)
      Committed Memory   364.06 MBytes   (17.78% of Total Memory)
      Total Memory   2.00 GBytes
      Largest free block at   0x00000000`685ba000


This is the heap I identified as using the most memory

      Heap Name   msvcrt!_crtheap
      Heap Description   This heap is used by msvcrt
      Reserved memory   868.25 MBytes
      Committed memory   89.16 MBytes (10.27% of reserved)
      Uncommitted memory   779.10 MBytes (89.73% of reserved)
      Number of heap segments   12 segments
      Number of uncommitted ranges   8207 range(s)
      Size of largest uncommitted range   32.20 MBytes
      Calculated heap fragmentation   95.87%


Top Allocation - Allocation Size - 1048 29.42 MBytes 29435 allocation(s)

There are 12 heap segments and nearly all have extremely high fragmentation and they have allocated a lot of reserved memory. The commited size in each segment is very low so i'm unsure why that is the case and where i go from here to debug the application further. This has been driving me nuts for months now and there isn't anyone i know to ask other than you experts who 
write this stuff...

Going back to your article you say that i should run the ASP on iis in a 64 bit process and that it will automatically create a seperate dll host for all the 32 bit com objects. Do i need to set the flag Enable32BitAppOnWin64 for this to work? How do i register the 32 bit components. Is it a case of simply using regsvr32?
</description></item><item><title>More on Virtual Memory, Memory Fragmentation and Leaks, and WOW64</title><link>http://blogs.msdn.com/david.wang/archive/2006/02/01/ASP-Application-Large-Memory-Needs-and-64bit-IIS6.aspx#532448</link><pubDate>Wed, 15 Feb 2006 14:31:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:532448</guid><dc:creator>David Wang</dc:creator><description>I found myself writing a very long response to a recent comment to this blog entry, so I decided to make...</description></item><item><title>re: ASP Application, Large Memory Needs, and 64bit IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2006/02/01/ASP-Application-Large-Memory-Needs-and-64bit-IIS6.aspx#532452</link><pubDate>Wed, 15 Feb 2006 14:33:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:532452</guid><dc:creator>David.Wang</dc:creator><description>sam - Ended up taking me a little longer to explain...&lt;br&gt;&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/david.wang/archive/2006/02/14/More_on_Virtual_Memory_Memory_Fragmentation_and_Leaks_and_WOW64.aspx"&gt;http://blogs.msdn.com/david.wang/archive/2006/02/14/More_on_Virtual_Memory_Memory_Fragmentation_and_Leaks_and_WOW64.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;//David</description></item><item><title>How Many Virtual Servers Should Be Associated with a Single Application Pool?</title><link>http://blogs.msdn.com/david.wang/archive/2006/02/01/ASP-Application-Large-Memory-Needs-and-64bit-IIS6.aspx#590508</link><pubDate>Fri, 05 May 2006 08:05:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:590508</guid><dc:creator>SharePoint Cafe</dc:creator><description /></item></channel></rss>