此文件包含监控和响应内存不足 (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-ranker 驱动程序
TODO(dbort/maniscalco):实施并记录。