adaptivemmd(8)

NAME
adaptivemmd - Memory optimizer daemon

SYNOPSIS
adaptivemmd [-dvhs] [-m max_gb] [-a level]

DESCRIPTION
adaptivemmd daemon monitors the state of free memory on the system and optimizes availability of free pages as much as possible.

adaptivemmd monitors current state of free pages overall and free pages of each order. Based upon current rate of free pages consumption and memory fragmentation, it predicts if system is likely to run out of memory or if memory will become severely fragmented in near future. If so, it adjusts watermarks to force memory reclamation if system is about to run out of memory. If memory is predicted to become severely fragmented, it triggers compaction in the kernel. The goal is to avert memory shortage and/or fragmentation by taking proactive measures. To arrive at this prediction, adaptivemmd samples free pages of each order on each node periodically and fits a straight line using method of least squares to these sample points. It also computes current reclamation rate by monitoring /proc/vmstat. The equation derived for best fit line is used to compute when free memory exhaustion will occur taking into account current reclamation rate. If this exhaustion is imminent in near future, watermarks are adjusted to initiate reclamation.

OPTIONS
adaptivemmd supports following optional command line arguments:

-d  Debug mode. adaptivemmd will not run as daemon in debug mode.

-v  Enable verbose mode. Use multiple -v options to increases verbosity level.

-h  Show command line help

-s  Simulate a run. Combined with -v, this can be used to check what actions adaptivemmd will take if it were running for real. WARNING: This option is of limited use since each action taken by adaptivemmd for real affects free memory state and hence future actions. Actions reported by this option are useful only to understand adaptivemmd behavior and will not correlate necessarily with actions adaptivemmd would have taken if it were running for real.

-m max_gb
    Maximum amount of gap (in GB) allowed between low and high watermarks as adaptivemmd adjusts watermarks. This can be used to set a cap on high watermark for the system.

-a level
    Aggressiveness level for optimizations. Supported levels are:
    1	Low: Sample memory stats at longer interval
    	and make slow gradual adjustments to system
    2	Normal: Sample memory stats at a normal level
    	so as to not add siginificant system load and
    	make adjustments at normal level
    3	High: Sample memory stats more frequently and
    	make frequent adjustments to system to maintain
    	high number of free pages available

CONFIGURATION

Following configuration options are available in the configuration file (/etc/sysconfig/adaptivemmd or /etc/default/adaptivemmd):

VERBOSE (number)
    Verbosity level (0-5), higher level results in more information being logged

AGGRESSIVENESS (number)
    Aggressiveness level (1-3) for optimizations, higher numbers mean more aggressive optimization

ENABLE_FREE_PAGE_MGMT (number)
    Allow adaptivemmd to do free page management. A non-zero value enables free page management while a value of 0 disables it.

MAXGAP (number)
    Maximum amount of gap (in GB) allowed between low and high watermarks

ENABLE_NEG_DENTRY_MGMT (number)
    Allow adaptivemmd to manage number of negative dentries in cache. A non-zero value enables negative dentry management while a value of 0 disables it.

NEG_DENTRY_CAP (number)
    Cap for memory consumed by negative dentries as a fraction of 1000. Range of values supported by kernel is 1-100.

ENABLE_MEMLEAK_CHECK (number)
    Allow adaptivemmd to check for possible memory leaks. A non-zero value enables memory leak check while a value of 0 disables it.

FILES
/etc/sysconfig/adaptivemmd
/etc/default/adaptivemmd

AUTHORS
Khalid Aziz <khalid.aziz@oracle.com>