Reducing Linux memory fragmentation

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

  1. Edit your SOAM > SSM > osTypes > osType 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>
  2. Save your application profile changes.
  3. Run the soamreg command for the changes to take effect.