Hi!

I have developed an EXE [in VFP 9] which the User is intends run to
execute certain tasks (like importing, exporting data etc.). In order
make use of this all the user does is set the task and the time which
the task have to run.
The EXE will be run in the background and checks [each 10 minutes] if
any task have to be executed. If any scheduled tasks fall within
current time range then the task would be run.

This EXE is installed on Windows 2003 Server.
Microsoft SQL Server 2000 is used as the back end.

The issue I'm facing is whenever this EXE tries to execute tasks the
CPU Memory usage of the Client's PC goes high [mostly up to 100%
usage]. There can 100 thousand records or more involved in the import/
export at a given time. I've been under the impression that the CPU
Memory usage goes when the EXE executing tasks is due to the high
volume data and the memory would get released as soon as the process
is over. But this is not case; the memory is not released once the
task is completed execution. The CPU Memory is freed after very long
time.

At present this single EXE consists of all the data import/ export
tasks. I'm planning to have multiple EXE's for each task where the
main EXE would call the relevant sub EXE to execute a task. The main
reason for me to come up with such a method is the expectation that
the CPU Memory would freed / released immediately after the execution
of a sub EXE.

Can anyone of you help out with some suggestion as to how to over come
this issue.

Thanks in advance...

Cheers...
:-)

Re: Releasing Memory After Completion of a Process by tg

tg
Sun Mar 09 05:11:07 CDT 2008

~F~u~J~i~ schrieb:
> is over. But this is not case; the memory is not released once the
> task is completed execution. The CPU Memory is freed after very long
> time.
>
> At present this single EXE consists of all the data import/ export
> tasks. I'm planning to have multiple EXE's for each task where the
> main EXE would call the relevant sub EXE to execute a task. The main
> reason for me to come up with such a method is the expectation that
> the CPU Memory would freed / released immediately after the execution
> of a sub EXE.
>
A poolmanager calling other exes will look better in the task manager -
no doubt about that and by process isolation be a slightly better
design. But the memory shown in Taskman is usually swapped out within
minutes, so it should NOT affect performance of the server when resting.

This is "common windoze behaviour" and most texts say don't try to alter
it. You *can* force the process to trim the memory shown in Taskman with
WinApi-functions (something like SetWorkingSetSize, google or MSDN) but
most authors say this cosmetic effect is bad: whenever the process
starts to work it has to assigh the needed memory again.

So you might read a bit about windows memory usage before deciding to
follow your idea. Have you measured/documented worse overall server
performance after the vfp memory went high but the vfp process is resting ?

HTH

thomas