Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
dkl
New Member.
431 views

memory consumption with AcuServe

During mass data processing in the following constellation, the memory consumption increases continuously. When the 2GB limit is reached, the runtime crashes.

Prog1

    perform many times

                 read file

                 call "Prog2"

    end-perform

Prog2 (not with "is-initial" because the last state should stay in memory)

   "heavy I-O" , this means: open / read / rewrite / close many files and records

In the windows taskmanager we can see how the memory usage of the runtime-process is constantly increasing. In the debugger the memory consumption (u) "overhead" increases.

This is not the case in a local environment where the files are not addressed by AcuServe notation (@srv:).

Has anyone seen this before?

Runtime & AcuServe Version 10.2.0 as well as 10.2.1

0 Likes
3 Replies
dkl
New Member.

RE: memory consumption with AcuServe

Update:

The cause is that each time prog2 is called, files are opened and closed again.
With the following method additional memory is not allocated with every call:


Prog2
01 call- flag pic 9 value 1.
88 first- call value 1, false zero.
….
if first- call
open i- o files
set first- call to false
end- if

* do not close files when exit !

Once the memory has been allocated by the "open i- o", it will never be released. (not even with cancel all)
You have to finish the runtime.
0 Likes
Micro Focus Contributor
Micro Focus Contributor

RE: memory consumption with AcuServe

I suspect this is due to how the runtime deals with files opened multiple times. When it can detect that the file is the same (usually using an inode or some other unique aspect of a file), it only has the file open once. But when the file is remote, it most likely can't detect that the file is the same as was previously opened.

I suspect your new logic is more correct in any case.
0 Likes
dkl
New Member.

RE: memory consumption with AcuServe

In the original case, I changed the logic. That's okay now.
But I still have a special routine that works similarly. The files used there are the same, but the file path are constantly changing because the files are in different subdirectories. Here I could only help myself by dividing the processing into different blocks and starting a separate runtime session per block.
Perhaps it would be helpful to have a way to tell the runtime that it frees up the used memory for unused (opened) file handles.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.