Home | History | Annotate | only in /system/core/lmkd
Up to higher level directory
NameDateSize
Android.bp21-Aug-2018903
include/21-Aug-2018
liblmkd_utils.c21-Aug-20182.1K
lmkd.c21-Aug-201843.7K
lmkd.rc21-Aug-2018176
OWNERS21-Aug-201818
README.md21-Aug-20182.6K
statslog.c21-Aug-20183.1K
statslog.h21-Aug-20182.6K
tests/21-Aug-2018

README.md

      1 Android Low Memory Killer Daemon
      2 ================================
      3 
      4 
      5 Introduction
      6 ------------
      7 
      8 Android Low Memory Killer Daemon (lmkd) is a process monitoring memory
      9 state of a running Android system and reacting to high memory pressure
     10 by killing the least essential process(es) to keep system performing
     11 at acceptable levels.
     12 
     13 
     14 Background
     15 ----------
     16 
     17 Historically on Android systems memory monitoring and killing of
     18 non-essential processes was handled by a kernel lowmemorykiller driver.
     19 Since Linux Kernel 4.12 the lowmemorykiller driver has been removed and
     20 instead userspace lmkd daemon performs these tasks.
     21 
     22 
     23 Android Properties
     24 ------------------
     25 
     26 lmkd can be configured on a particular system using the following Android
     27 properties:
     28 
     29   ro.config.low_ram:         choose between low-memory vs high-performance
     30                              device. Default = false.
     31 
     32   ro.lmk.use_minfree_levels: use free memory and file cache thresholds for
     33                              making decisions when to kill. This mode works
     34                              the same way kernel lowmemorykiller driver used
     35                              to work. Default = false
     36 
     37   ro.lmk.low:                min oom_adj score for processes eligible to be
     38                              killed at low vmpressure level. Default = 1001
     39                              (disabled)
     40 
     41   ro.lmk.medium:             min oom_adj score for processes eligible to be
     42                              killed at medium vmpressure level. Default = 800
     43                              (non-essential processes)
     44 
     45   ro.lmk.critical:           min oom_adj score for processes eligible to be
     46                              killed at critical vmpressure level. Default = 0
     47                              (all processes)
     48 
     49   ro.lmk.critical_upgrade:   enables upgrade to critical level. Default = false
     50 
     51   ro.lmk.upgrade_pressure:   max mem_pressure at which level will be upgraded
     52                              because system is swapping too much. Default = 100
     53                              (disabled)
     54 
     55   ro.lmk.downgrade_pressure: min mem_pressure at which vmpressure event will
     56                              be ignored because enough free memory is still
     57                              available. Default = 100 (disabled)
     58 
     59   ro.lmk.kill_heaviest_task: kill heaviest eligible task (best decision) vs.
     60                              any eligible task (fast decision). Default = false
     61 
     62   ro.lmk.kill_timeout_ms:    duration in ms after a kill when no additional
     63                              kill will be done, Default = 0 (disabled)
     64 
     65   ro.lmk.debug:              enable lmkd debug logs, Default = false
     66