How to control ntvdm.exe memory use?

By gbhall ยท 9 replies
Mar 28, 2009
  1. 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 ?
  2. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    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
    Also read here:

    Long PATH Environment Variable Causes 16-bit Apps to Hang;[LN];169171

    Troubleshooting NTVDM and WOW Startup Errors;en-us;220155

    Troubleshooting MS-DOS-based programs in Windows XP;en-us;314106

    Here's an easier better way ;)

    Turn off the 16 Bit application from starting with Windows
    Run Startup Control Panel:
    Or just uninstall the application all together

    Hope this help :)
  3. gbhall

    gbhall TechSpot Chancellor Topic Starter Posts: 2,431   +77

    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 ?!?
  4. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    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 ;)
  5. gbhall

    gbhall TechSpot Chancellor Topic Starter Posts: 2,431   +77

    Following up that suggestion, if I open a copy of, 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 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 box is opened, it shows the content a certain memory situation, and foxpro.exe is chosen. When 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?
  6. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    Its in the definition of a PIF file ;)
  7. gbhall

    gbhall TechSpot Chancellor Topic Starter Posts: 2,431   +77

    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?
  8. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    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
  9. gbhall

    gbhall TechSpot Chancellor Topic Starter Posts: 2,431   +77

    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.
  10. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...