Memory requirements on the server

Memory management on the process server

The Adonix process that executes the Sage X3 code on the server, manages two segments of memory to handle the resources it has access to.

Available variables

Two variables exist that define the maximum size allowed to a process for each segment: maxmem and maxheap. Assigning a given value to each does not imply that the process will use the whole amount of memory immediately. The process will allocate the memory without exceeding the fixed limits.

How to dimension these variables

Usually, default values for these two variables are defined in the configuration file APL.ini, that contains assignments of variable done by the engine when a process starts. A reassignment can be done at any time in a script.

A measure of the remaining memory of every type is given by the two functions freemem and freeheap.

If, at a given point, the required memory to manage the buffer exceeds the limit, an error (more memory available) will appear. You should measure the memory consumption in the scripts handling the biggest resource size, in order to be sure that this error will not appear at execution time.

The amount of memory managed by 'maxmem' and 'maxheap' is not used immediately by the process. It is the upper limit of memory consumption managed by a process.

Every parameter can be set up independently:

Database buffers

The sadora or sadodbc processes, that handle the database connection, use the value of variable sadmem to dimension buffers. The value of this variable can only be defined in the configuration file APL.ini. A reassignment cannot be done dynamically in a script.