Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Foxpro for DOS 2.6a processor Overutilisation

Status
Not open for further replies.

cstella23

Technical User
Oct 4, 2002
5
0
0
US
I'm running foxpro 2.6a for DOS on a win XP pro machine (2.0 gighz P4). Whenever I run Foxpro or Foxprox, my processor runs up to 100% utilisation. I've tried just about every patch I can find, and I also AM using the following in my config.fp:

CATMAN=OFF
STATUS=ON
TALK=ON
DEBUG = OFF
CLOCK=ON
MEMLIMIT = 60, 2048, 16384
MVCOUNT = 512
TMPFILES = d:\fpd26\temp
sortwork = d:\fpd26\temp
progwork = d:\fpd26\temp
editwork = d:\fpd26\temp


Anoyne have any ideas as to how to fix this? It becomes a problem when I'm running prg's that take a long time to run, and try to do other things with the computer.

Any help apriciated!
 
Hello

1. load that utility before start your app (is russian)
2. undocumented environmental setting

"To correct possible FoxPro's Dos Extender's "Extended Memory Hog" Problems, where Fox's DOS Extender apparently takes ALL of your memory instead of only allocating extended/expanded memory when needed and freeing it when finished, the following undocumented environmental setting may be useful when placed in your AUTOEXEC.BAT, especially when it is necessary to virtually display large document images (over 1 Meg. in size):

For Example, on a PC with 16 Meg of Memory, the following settings are reasonable and useful, when added to your AUTOEXEC.BAT (or autoexec.cfg):

SET FOXPROX=-MAXXMSMEM 2000000 -MAXVCPIMEM 2000000
-MAXXMSMEM=Amount in Bytes
-MAXVCPIMEM=Amount in Bytes"

3. NTVDM is DOS/WIN31 in WIN XP.
"CUSTOMIZING NTVDM.EXE’S BEHAVIOR
In HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\WOW
the default value of the cmdline value is %SystemRoot%\system32\ntvdm.exe, and you can add any of these switches at the end of this string:
-a = Specifies a command to pass to the VDM
f = Specifies the directory of NTVDM.EXE
m = Hides the VDM console window
w = Specifies the WOW VDM
In addition to the custom command line switches, there is also another value that may be of use to you. This value is another listed under the WOW subkey containing the cmdline value and is described below:
Value Name: size
Default Value: 0
Type: REG_SZ
Value Range: Amount of memory, in megabytes, from 0 to available memory.
This value sets the maximum possible size of the VDM created for DOS-based applications. This includes all conventional, extended, expanded, and DPMI memory required by the application. Although typically, you wouldn’t need to modify this value, it may be useful if you wish to manually limit the maximum size for all DOS applications (or a particular one) to conserve memory on the system for other processes."
 
you must change "clock = off" and that will change your processor utilization
 
Vroaita, could you explain why CLOCK = OFF is important.
Is it only important in the config file?
Does it make a difference in an app too?

Just to add to this thread, under WinXP (Athalon 1200, 512 mem) I can start Sidekick 98 in the blink of an eye. Certainly less than 1 second.
If I have a FPD26 window running, Sidekick takes over 4 seconds to start.
If just a dos box is running (no FPD26) Sidekick takes around 2 seconds.
Ken F
 
In my 2.0+NT+2GHz (unfortunately no MEMLIMIT),
CPU usage is 100%.
I use hot key (for example Alt+z) to user reduce it 3%
to speed up other tasks.
In main prg.... do keylab, and

proc switch_off
flush
do keylab
jemenu = .F.
if !set('SYSM')='OFF'
jemenu = .T.
set sysm off
endif
set clock off
defi wind hled from 0,0 to 24,79 none
acti wind hled
set curs off
wait ''
* waiting for any user action (for example left mouse click)
* CPU is reduced, other task may better operate
deac wind hled
rele wind hled
set clock on
if jemenu
set sysm on
keyb '{F10}'+'{ENTER}'
endif
set curs on
do keylab
retu

proc keylab
if on("KEY","ALT+Z") = ''
* activate all my "on key label"
on key label RIGHTMOUSE keyb '{CTRL+END}'
on key label F1 do fdhelp
on key label F3 do actkal
* ...
on key label ALT+Z do switch_off
else
* deactivate all my "on key label"
on key label RIGHTMOUSE
on key label F1
on key label F3
* ...
on key label ALT+Z
endif
retu

Tesar
 
Is there no way to limit memory and cpu usage?
Lifo has sugested a program called resfree (from Russia, with Russian help file) but i'm afraid I can't follow the reasoning behind it or the way it should be used.
Tesar suggests a user intervention that helps 3%.

There must be an answer to it.
I guess everyone is still on Xmas break.
Ken F
 
There is a really simple answer.

STOP using Foxpro for DOS.

It was never designed to work on a multitasking operating system.

 
Tilltek,
from 100% to 3% is not bad result, I think...
Tesar
 
Sorry Tesar but I took your line...
"I use hot key (for example Alt+z) to user reduce it 3%"
to mean reduce it BY 3% and you were saying TO 3%.

Yes, a reduction to 3% is great but I have several thousand lines in over 100 associated .fxp files.

I am trying TAME and so far it seem OK.
The only problem is the mouse is a little inconsistant.

Thanks for your input
Ken F
 
Tilltek,
my english is very bad,
each word I find in dictionary...
In fact, "switch_off" procedure was necessary former,
for computers < 1000MHz (typically 133MHz).
At present time, although overutilisation is nearly 100,
is not need - other tasks worked sufficiently fast.
Tesar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top