Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


June 06, 2000

A Windows NT Temporary Pagefile Lesson


RSS
Subscribe to Windows IT Pro | See More Domains Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

You probably noticed that my column didn't appear in last week's newsletter. The primary reason was that my local telephone provider couldn't repair my DSL line for 5 days, but I experienced other problems as well. A few days before the newsletter deadline, one of my Windows NT 4.0 domain controllers started misbehaving—the desktop was extremely sluggish and unresponsive, services logged error messages in the system event log, Exchange logged startup and runtime error messages in the Application Event Log (AEL), and WINS refused to start, even after I removed the database and all the log files in the WINS directory.

When I booted the crippled domain controller, NT sometimes installed the correct graphics driver and other times started up in VGA mode, despite the fact that both my Control Sets had identical configurations. I never did figure out why NT alternated between the two modes (and no, I didn't select the VGA restart option from the boot menu). At the low point in this experience, I could enter only one or two GUI or command-line commands before the system hung and forced me to reboot—a lesson in patience. The desktop became more responsive after I reinstalled the video driver, but every time I logged on, NT reported that I was running without a properly sized pagefile.

When I checked the pagefile settings, the Performance tab indicated I had a permanent pagefile more than three times the size of the installed memory, but I could see a pagefile.sys of the correct size on my NTFS formatted boot drive. Hoping for an easy solution, I set the size of the pagefile to zero, rebooted, manually deleted the old pagefile.sys, created a new pagefile on the Performance tab of My Computer\Properties, and rebooted. Unfortunately, NT displayed the same error message when I logged on again. After repeating the pagefile purge procedure a few more times without success, I started digging in the Registry to find out why NT thought there was not a properly sized pagefile, even though the setting in the GUI was correct and the file appeared on the hard disk.

NT memory management and pagefile settings reside in the Registry key HKEY_LOCAL_MACHINE\CurrentControlSet\ Control\Session Manager\Memory Management. When I looked at the Memory Management value entries, the PagingFiles entry was set to system32\temppf.sys, an important clue. I compared the other Memory Management value entries to those on a running NT 4.0 system, and I found two entries that didn't appear on my other NT 4.0 systems. I don’t remember exactly what the value entries were called, but one indicated the number of pages in the pagefile allocated to the system, and the other indicated that the system was using a temporary paging file. Hoping for another quick fix (hope springs eternal), I set the PagingFiles value entry to the pagefile on my boot drive, changed the temporary pagefile value from one to zero, and rebooted—a technique that produced no results.

Next, I deleted all three value entries and rebooted. When I logged back on, NT displayed the same pagefile error message. Now, armed with indisputable evidence that the pagefile problem was not the result of incorrect memory management Registry settings, I examined the temporary pagefile more closely. I verified that the file was, in fact, in the system32 directory. Its size, 20MB, explained why the system was so slow—20MB is inadequate to start most standard system services (especially on a system with 128MB of RAM), let alone all the Exchange services I needed to run my mail server. The only rational explanation for the domain controller’s behavior is that whenever this file exists in the system32 directory, NT uses it as the pagefile, even though a valid and properly sized pagefile exists somewhere else.

So, here was my dilemma: How could I delete a temporary pagefile that was open while the system was running? Two methods came to mind. Either I could install a second system root, boot up, delete the temporary pagefile in the original system root, reboot the original system, and recreate the pagefile—or I could find a utility that would let me boot NT from a disk and delete the file. I tried option one, and the install failed several times, often while NT attempted to load the kbdus.dll file. This left option two.

I sent Mark Russinovich (one of our contributing editors) a desperate plea for help, and he replied promptly with a copy of the Emergency Repair Disk (ERD) Commander Pro utility. ERD Commander Pro creates a set of three NT boot disks with a robust set of command-line commands that operate on NTFS volumes. After I granted Everybody access to the boot drive, I could delete the temporary pagefile, reboot, and create a permanent pagefile. Lo and behold, my system was up and running in fine form. To clean up after the failed installs, I reapplied the NT and Exchange service packs, set all the services to start automatically, and proceeded to pick up 5 days of mail, smiling all the while.

So how does an NT system end up in this state? Because the domain controller had so many problems, it’s hard to backtrack to one specific cause. I tried several times to reinstall NT in the existing system root or in an alternate root, and the install failed repeatedly. Perhaps the installation procedure creates a temporary pagefile, and when the install fails, it doesn’t delete the temporary pagefile from the system root. Also, I’m sure that NT creates a temporary pagefile when you purge your pagefile (as I did repeatedly) and reboot. When I tried to recreate the permanent pagefile, the system hung after I entered only one or two commands, and it wouldn't shut down. To clear the hang, I abruptly powered the system down, so NT might have started to delete the temporary pagefile but not completed the operation because I hit the restart button at just the wrong time. File this lesson away for future troubleshooting and share my celebration of a successful conclusion to yet another tech story from the trenches.

End of Article



Reader Comments
Hello,

The registry key is in fact HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\... instead of HKEY_LOCAL_MACHINE\CurrentControlSet\....

Regards.

Maurice.

Maurice Gasco June 07, 2000


Where might I find Emergency Repair Disk (ERD) Commander Pro utility that was talked about in this artical.
Thanks

Dennis Davidson June 07, 2000


I have a NT workstation that display the similar error message and all pagefile settings appear to be okay. So where can I get a copy of ERD Commander Pro disks?

Ken Miner June 07, 2000


While what you did worked and your happy, I was hoping for more out of the article. First Windows 2000 Recovery Console is FREE with any version of 2000 and would have fixed the problem in short order. And for FREE. Instead of a shameless promotion of a co-workers product!

Second, you never said what happened, so how is the reader supposed to learn anything? The last paragraph is very sad. Sorry to be cruel but don't you paid to dig this kinda thing out? I looked it up in Technet Q101773 and Q105058 were returned. No mention of these in your article.

Lastly, you never mention how much hard disk space is free or anything else about the system specs. Would have been nice.

Rodney R. Fournier June 07, 2000


ERD Commander can be found at http://www.winternals.com/ . Also see the related excellent freeware and information site http://www.sysinternals.com/ .

Michael Embree June 08, 2000


ERD Commander Pro is made by Winternals. Available from most resellers. Costs about $275.

Bill Leonard June 08, 2000


I too would like to get a copy of the EDR commander Pro. Where can it be found?

Jack Aitken June 08, 2000


Instead of booting manually using EDRCP, why did you not turn off paging, reboot, delete the file, turn on paging, reboot?
Or is this just a way of selling EDRCP?

Rob McQualter June 08, 2000


To avoid that nasty purge of pagefile(s), i usually create an extra partition and putting one large, fixed pagefile on that "swap" partition. The partition type will be FAT16, if the systems security policy allows, or NTFS otherwise.
I suggest at least 1GB as size for swap partition, and "size-5MB" for the swap file.
Using FAT16 as Filesystem instead of NTFS for the pagefile area (swap partition), the system seems to act a little bit faster (figured out empirically). Probably since FAT16 produces less overhead in file security handling.

I set all other pagefiles to "0" size (deleting them), implicitly accepting not to have a dumpfile for tracking and tracing when a stop error might occur. I don't know much people beeing able to track the reasons for a stop error condition from an NT kernel dump ;-) and i do not know any commercial organization, that spends the time or the money to let some experts track what happened.
Thus, i disabled the ability to dump.

Nikolaus Schmitt January 31, 2001


Although i have a similar pagefile problem on my demo w2k advance server, i'm not sure if it relates to the inability of the system to load the kbdus.dll when i try to upgrade the demo to a real copy. Is there anything that deals specifically with this problem?

G. Brugellis February 05, 2001


 See More Comments  1   2 

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

How can I stop and start services from the command line?

...


Exchange Server and Outlook Whitepapers Email Controls and Regulatory Compliance

Take Control of Your Email: Understand the Business Reasons for Email Storage Management

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Bail Out Your Exchange Environment

Check out our list of Free Email Newsletters!

Exchange Server and Outlook eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

The Expert's Guide for Exchange 2003: Preparing for, Moving to, and Supporting Exchange Server 2003

Related Exchange Server and Outlook Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

Exchange & Outlook UPDATE eNewsletter
News, strategies, products, and developments in Exchange Server and Outlook messaging.

Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement