How to control ntvdm.exe memory use?

Status
Not open for further replies.

gbhall

Posts: 2,419   +77
It may have been the first time I ran an old Dos program since I upgraded memory of XP-pro SP3 to 2Gb, but I was somewhat staggered to find that the Dos subsystem (NTVDM.EXE) which starts to run that Dos program was occupying 1.2Gb of memory and using 100% cycles to do it.....bad boy....that never used to happen when I only had 512Mb memory.

Since the actual Dos program has memory useage of just 8Kb, I find it a bit offensive :mad:

Does anyone have knowledge of a registry setting to cut down on this memory abuse by ntdvm.exe ?
 
NTVDM.exe (NT Virtual Dos Machine) allows execution of 16-bit applications (ie DOS programs running in Windows)

Tame Version 6.0 Release Candidate Test Version - Updated: February, 2009
http://www.tamedos.com/downloads/tame60rc12.exe
Tame Allows DOS programs to run smoothly under modern operating systems. The latest version of Tame supports Windows Vista, Windows 2003 server, Windows XP, Windows 2000, Citrix, and Windows NT.

You are provided a license to use this software free of charge for 30 days for the purpose of evaluating the effectiveness of Tame in your environment. If you decide to use Tame beyond the 30 day period then it must be registered.

Also read here:

Long PATH Environment Variable Causes 16-bit Apps to Hang
http://support.microsoft.com/default.aspx?scid=kb;[LN];169171

Troubleshooting NTVDM and WOW Startup Errors
http://support.microsoft.com/default.aspx?scid=kb;en-us;220155

Troubleshooting MS-DOS-based programs in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;314106


Here's an easier better way ;)

Turn off the 16 Bit application from starting with Windows
Run Startup Control Panel: http://www.mlin.net/StartupCPL.shtml
Or just uninstall the application all together

Hope this help :)
 
Thanks for the advice, Kimsland. The program does not start with Windows, so no problem there. I already looked at all the memory settings and as they are now seems to be the only way the program (Foxpro for Dos 2.66) will run at all, and as I said, it's own memory footprint is a mere 8Mb. This resulted from months of trials, as implied below.

I will look at one of the MS support items I have not seen before, and also the tamedos looks interesting.

Fact is, the best result I have so far is to set the CPU priority of NTDVM.EXE down to minimum. This brings overall CPU down from 100% to 50% and allows all other processes to remain responsive, so that is enough for the casual use of Foxpro.

Problem does exist that this program is still in use worldwide in my company, and instructing users worldwide in how to set it up to run at all in XP/Vista has been a problem. A re-write in Vfp is long overdue, but I have tried to get all those users to use our(my) website instead. Some are a bit resistant ?!?
 
You just need a small command line (batch file will do) to run Foxpro for Dos 2.66 in low priority or resource rather. That should be quite simple ;)
 
Following up that suggestion, if I open a copy of command.com, navigate to foxpro26 and type 'fox' I get a perfectly normally sized memory footprint.

If I create a desktop .pif file with the same statements in it, I get a huge footprint, DESPITE the fact that my comspec says to use command.com. Why would executing a .pif have different effects from doing the same thing manually? No idea.

However I have the final solution. You see, foxpro has two versions. If you start FOX.EXE it decides of it's own whether to use a 'normal' or 'extended memory' version, which is FOXPRO.EXE or FOXPROX.EXE

When a command.com box is opened, it shows the content a certain memory situation, and foxpro.exe is chosen. When command.com is started via a .pif, it presents an entirely different memory configuration, and foxprox.exe gets chosen.

The solution therefore is in a .pif, or batch file calling foxpro, I must explicitly execute FOXPRO.EXE every time. Easy when you know !

Now there is another question. How to tame the CPU usage of ntvdm.exe when executing this .pif, ntvdm.exe always starts with 100% CPU on 'normal' priority, and has to be manually changed to 'low' priority. Know of a way to do this via the registry or via the calling batch file, or the .pif that calls the batch file?
 
Its in the definition of a PIF file ;)
Short for Program InFormation file, a type of file that holds information about how Windows should run a non-Windows application. For example, a PIF file can contain instructions for executing a DOS application in the Windows environment. These instructions can include the amount of memory to use, the path to the executable file, and what type of window to use. PIF files have a .pif extension .
 
Dont think so, Kimsland, the pif allows memory control, but as far as I can see, no control whatever over the ntvdm.exe priority setting?
 
I thought that was the point
The memory issue is causing the ntvdm.exe high CPU issue
I was even going to say delete and don't use the PIF file, and run the Foxpro in a direct direct command line; but when I confirmed that memory can be adjusted within the shortcut PIF file, I thought well that way may be better
 
Well this is irritating. The memory excess use is solved (only 3Mb in use), but not only is the CPU now 100% all the time the .pif is running, adjusting priority of ntvdm.exe to 'low' directly does nothing now. It did when memory was HUGE. Seems I can only have one thing or the other...not both.
 
Status
Not open for further replies.
Back