記憶體不足 (OOM) 系統

此檔案包含監控及回應記憶體不足 (OOM) 事件的系統相關資訊。

行為

當系統記憶體不足且核心 OOM 執行緒正在執行時,您應該會看到一系列記錄訊息,例如:

OOM: 5915.8M free (+0B) / 8072.4M total
OOM: oom_lowmem(shortfall_bytes=524288) called
OOM: Process mapped committed bytes:
OOM:   proc  1043  397M 'bin/devmgr'
OOM:   proc  2107   88M 'driver_host'
OOM:   proc  1297   12M 'virtual-console'
OOM:   proc  3496   17M 'netstack'
OOM:   proc  4157  170M 'flutter:userpicker_device_shell'
OOM:   proc 28708  353M 'flutter:armadillo_user_... (+3)'
OOM:   proc 31584    9M 'dart:weather_agent'
OOM:   proc 32093   14M 'dart:mi_dashboard.dartx'
OOM: Finding a job to kill...
OOM:   (skip) job  57930 'story-8cf82cb9f742d9ecc77f1d449'
OOM:   (skip) job  37434 'story-10293ae401bc0358b3ce52d2a'
OOM:   *KILL* job  29254 'agent'
OOM:        + proc 32093  run 'dart:mi_dashboard.dartx'
OOM:        = 1 running procs (1 total), 0 jobs
OOM:   (next) job  29247 'agent'
OOM:   (next) job  29240 'agent'
OOM:   (next) job  29233 'agent'

第一行顯示系統記憶體的目前狀態:

OOM: 45.8M free (-12.4M) / 8072.4M total

下一節將列印耗用大量記憶體的程序清單 (沒有特定順序):

OOM: Process mapped committed bytes:
OOM:   proc  1043  397M 'bin/devmgr'
OOM:   proc  2107   88M 'driver_host'
OOM:   proc  1297   12M 'virtual-console'
OOM:   ...
             ^koid  ^mem

下一節將展示關於排名工作清單的逐步操作說明、列印略過的工作 (沒有可終止的程序子系)、即將終止的工作,以及切斷區塊的後續工作:

OOM: Finding a job to kill...
OOM:   (skip) job  57930 'story-8cf82cb9f742d9ecc77f1d449'
OOM:   (skip) job  37434 'story-10293ae401bc0358b3ce52d2a'
OOM:   *KILL* job  29254 'agent'
OOM:        + proc 32093  run 'dart:mi_dashboard.dartx'
OOM:        = 1 running procs (1 total), 0 jobs
OOM:   (next) job  29247 'agent'
OOM:   (next) job  29240 'agent'
OOM:   (next) job  29233 'agent'

                   ^koid ^name

*KILL* 項目也會顯示待殺工作的所有程序子系。

元件

OOM 排名工具驅動程式庫

TODO(dbort/maniscalco):實作和文件。