Scenario for maintaining a targeted amount of memory

The scenario in this topic shows how you can maintain a targeted amount of memory in applications that have memory limitations.

Suppose you want to specify that when the database server has 10 MB or less of free memory, it starts running the low memory management processes that can stop applications and free memory. Suppose you also want to specify that the server stops running the low memory management processes when the server has 20 MB or more of free memory:
  1. Set the LOW_MEMORY_MGR configuration parameter to 1 and restart the server, or run an onmode -wf command to change the value of the LOW_MEMORY_MGR configuration parameter.
  2. Run an SQL administration API command with the scheduler lmm enable argument and low memory parameters, as follows:
    EXECUTE FUNCTION task("scheduler lmm enable",
    	"LMM START THRESHOLD", "10MB",
    	"LMM STOP THRESHOLD", "20MB",
    	"LMM IDLE TIME", "300");
  3. Run the onstat -g lmm command to display information about automatic low memory management settings, including the amount of memory that the server is attempting to maintain, the amount of memory currently used by the server, the low memory start and stop thresholds, and other memory-related statistics.

    You can also view low memory management information in the online.log file.


Copyright© 2019 HCL Technologies Limited