The Linux® malloc_trim function releases free
memory from Linux heap. You can leverage malloc_trim with
IBM® Spectrum Symphony on Linux to enable it in SSM. This way, you can control how often free memory is
released from the heap, therefore, reducing memory fragmentation for IBM Spectrum Symphony on Linux.
About this task
To call the malloc_trim function in SSM, add the SOAM_MALLOCTRIM_INTERVAL environment variable to
the application profile, and specify how often to call. By default the value is 0, to indicate that
the malloc_trim function will not be called.
Procedure
-
Edit your
section of your application profile and add the SOAM_MALLOCTRIM_INTERVAL environment variable. Set
the value of this environment variable to the number of seconds that IBM Spectrum Symphony should wait before calling
the malloc_trim function to release free memory from the heap. Valid values are 1 to 4294967295. If
its value is 0, malloc_trim will not be called.
Here is an example of specifying the
malloc_trim function to run in 60 second intervals (that is, to run every 60
seconds):
<SSM ……>
<osTypes>
<osType name="all" workDir="${EGO_CONFDIR}/../../soam/work">
<env name="SOAM_HOME">${EGO_TOP}/soam</env>
<env name="SOAM_MALLOCTRIM_INTERVAL">60</env>
……
</osType>
</osTypes>
......
</SSM>
-
Save your application profile changes.
- Run the soamreg command for the changes to take effect.