<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>Brad Rutkowski's Blog : Memory</title><link>http://blogs.technet.com/brad_rutkowski/archive/tags/Memory/default.aspx</link><description>Tags: Memory</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>I PTE the fool: !SYSPTES 4 works in Vista SP1/WS08</title><link>http://blogs.technet.com/brad_rutkowski/archive/2008/02/21/i-pte-the-fool-sysptes-4-works-in-vista-sp1-ws08.aspx</link><pubDate>Thu, 21 Feb 2008 03:21:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2917032</guid><dc:creator>Brad Rutkowski</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/brad_rutkowski/comments/2917032.aspx</comments><wfw:commentRss>http://blogs.technet.com/brad_rutkowski/commentrss.aspx?PostID=2917032</wfw:commentRss><description>&lt;P&gt;&lt;EM&gt;&lt;FONT size=2&gt;System Page Table Entry (PTE) issues are some of the top support issues for servers that run large server applications and have a relatively large amount of Random Access Memory (RAM). PTEs are structures used to track pages of RAM, similar to the way a telephone number is used to track a telephone to a specific location.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=+0&gt;You can now track down those &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms793941.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/ms793941.aspx"&gt;&lt;FONT size=2&gt;3f bugchecks&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt; using !sysptes using the public symbols.&amp;nbsp; Usually when we hit a server running out of system PTEs, it will just tip over and we don't see an actual bugcheck.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Prior to Vista SP1/Windows 2008 if you tried to run SYSPTES 4 on a server with public symbols you'd get this error message: "Unable to get System PTE individual lock consumer information".&amp;nbsp; Well Windows Dev has fixed the bug.&amp;nbsp; Below is an example of what we would typically see, and then how we'd use !sysptes to narrow down who is consuming the space.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=+0&gt;&lt;STRONG&gt;&lt;EM&gt;You find this sort of output in !VM:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=+0&gt;&lt;FONT face=cour size=2&gt;0: kd&amp;gt; !vm 1 &lt;BR&gt;*** Virtual Memory Usage *** &lt;BR&gt;Physical Memory: 999242 ( 3996968 Kb) &lt;BR&gt;Page File: \??\C:\pagefile.sys &lt;BR&gt;Current: 927744 Kb Free Space: 884312 Kb &lt;BR&gt;Minimum: 927744 Kb Maximum: 927744 Kb &lt;BR&gt;Page File: \??\E:\pagefile.sys &lt;BR&gt;Current: 3072000 Kb Free Space: 3024624 Kb &lt;BR&gt;Minimum: 3072000 Kb Maximum: 3072000 Kb &lt;BR&gt;Available Pages: 265887 ( 1063548 Kb) &lt;BR&gt;ResAvail Pages: 933615 ( 3734460 Kb) &lt;BR&gt;Locked IO Pages: 1679 ( 6716 Kb) &lt;BR&gt;Free System PTEs: 500 ( 2000 Kb)&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;********** Running out of system PTEs **************&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;******* 416179544 system PTE allocations have failed ******&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;Free NP PTEs: 1630 ( 6520 Kb) &lt;BR&gt;Free Special NP: 0 ( 0 Kb) &lt;BR&gt;Modified Pages: 478 ( 1912 Kb) &lt;BR&gt;Modified PF Pages: 477 ( 1908 Kb) &lt;BR&gt;NonPagedPool Usage: 8814 ( 35256 Kb) &lt;BR&gt;NonPagedPool Max: 32351 ( 129404 Kb) &lt;BR&gt;PagedPool 0 Usage: 10590 ( 42360 Kb) &lt;BR&gt;PagedPool 1 Usage: 994 ( 3976 Kb) &lt;BR&gt;PagedPool 2 Usage: 958 ( 3832 Kb) &lt;BR&gt;PagedPool 3 Usage: 972 ( 3888 Kb) &lt;BR&gt;PagedPool 4 Usage: 931 ( 3724 Kb) &lt;BR&gt;PagedPool Usage: 14445 ( 57780 Kb) &lt;BR&gt;PagedPool Maximum: 54784 ( 219136 Kb) &lt;BR&gt;Shared Commit: 4163 ( 16652 Kb) &lt;BR&gt;Special Pool: 0 ( 0 Kb) &lt;BR&gt;Shared Process: 10930 ( 43720 Kb) &lt;BR&gt;PagedPool Commit: 14485 ( 57940 Kb) &lt;BR&gt;Driver Commit: 1963 ( 7852 Kb) &lt;BR&gt;Committed pages: 747541 ( 2990164 Kb) &lt;BR&gt;Commit limit: 1952440 ( 7809760 Kb)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;So what now?&amp;nbsp; If you don't have the registry value set below, well for all intents and purposes you SOL.&amp;nbsp; So reboot, set the value, and then wait for repro.&amp;nbsp; Usually when we see the issue it comes back pretty quickly as some driver is eating up the space.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trackptes&amp;nbsp;&amp;nbsp;&amp;nbsp; REG_DWORD&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Once the waiting is over and the system tips over, run !sysptes 4 and it will tell you what is allocating the PTEs and how many per call.&amp;nbsp; The “!SYSPTES 4” command only lists driver PTE allocations. This is because, historically, drivers have made the most use and misuse of system PTEs.&amp;nbsp; Sometimes you'll find one heavy hitter with a huge count (like in the article linked below), or in other instances you might find a certain sequence allocating many times, in either case you now have a clue as to who is using the PTEs and can either investigate that driver via break points, or contact the vendor who is eating up all the PTEs.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;EM&gt;Cleaned up a bit for sanity's sake:&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;2: kd&amp;gt;!sysptes 4&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;VA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MDL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PageCount Caller/CallersCaller&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;f0769080 fce7fb18 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mrxsmb+0x2bed2/mrxsmb+0x2da71 &lt;BR&gt;efbbb8b8 fce0f658 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rdbss!RUserBuffer+0x2f/rdbss!UserBufferForLowIo+0x2b &lt;BR&gt;f1c17080 fd0eb7a8 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mrxsmb+0x2bed2/mrxsmb+0x2da71 &lt;BR&gt;eff41820 fd41bc70 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rdbss!RUserBuffer+0x2f/rdbss!UserBufferForLowIo+0x2b &lt;BR&gt;f1d10080 fcd91950 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mrxsmb+0x2bed2/mrxsmb+0x2da71 &lt;BR&gt;f027f108 fd051f88 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rdbss!RUserBuffer+0x2f/rdbss!UserBufferForLowIo+0x2b &lt;BR&gt;efbf7080 fd7f3e80 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mrxsmb+0x2bed2/mrxsmb+0x2da71 &lt;BR&gt;f1cede10 fce71460 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rdbss!RUserBuffer+0x2f/rdbss!UserBufferForLowIo+0x2b &lt;BR&gt;ef8a8080 fcedde80 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mrxsmb+0x2bed2/mrxsmb+0x2da71 &lt;BR&gt;ef963730 fc9c2868 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rdbss!RUserBuffer+0x2f/rdbss!UserBufferForLowIo+0x2b &lt;BR&gt;f0281080 fccc52c0 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mrxsmb+0x2bed2/mrxsmb+0x2da71 &lt;BR&gt;f1dfaff8 fd156650 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rdbss!RUserBuffer+0x2f/rdbss!UserBufferForLowIo+0x2b &lt;BR&gt;f0141080 fc6e82c0 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mrxsmb+0x2bed2/mrxsmb+0x2da71 &lt;BR&gt;ef8f3508 fd003a30 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rdbss!RUserBuffer+0x2f/rdbss!UserBufferForLowIo+0x2b &lt;BR&gt;ef637080 fee1dde0 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mrxsmb+0x2bed2/mrxsmb+0x2da71 &lt;BR&gt;eff3fa18 fd304050 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rdbss!RUserBuffer+0x2f/rdbss!UserBufferForLowIo+0x2b&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;The actual process of tracking down the PTEs is thoroughly explained here: &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=ed0e8084-abf7-4c00-ba6a-7d658cdb052a&amp;amp;displayLang=en" target=_blank mce_href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=ed0e8084-abf7-4c00-ba6a-7d658cdb052a&amp;amp;displayLang=en"&gt;&lt;FONT size=2&gt;Detection, Analysis, and Corrective Actions for Low Page Table Entry Issues&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;So next time your system is acting up, get in there with &lt;A href="http://blogs.technet.com/brad_rutkowski/archive/2007/04/13/did-you-know-there-is-live-noninvasive-debugging.aspx" target=_blank mce_href="http://blogs.technet.com/brad_rutkowski/archive/2007/04/13/did-you-know-there-is-live-noninvasive-debugging.aspx"&gt;Live KD&lt;/A&gt; and see what's going on!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2917032" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Business+up+front/default.aspx">Business up front</category><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Vista+and+Lognhorn/default.aspx">Vista and Lognhorn</category><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Memory/default.aspx">Memory</category></item></channel></rss>