OOM diagnosis

更新时间: 2026-04-01 03:05:10

The out-of-memory (OOM) diagnosis feature helps you identify the causes of OOM events. This topic describes how to use this feature.

Limitations

  • Regional limitations

    This feature is currently available only in the Chinese mainland and China (Hong Kong).

  • Operating system limitations

    Architecture

    Operating system

    x86 architecture

    • Rocky Linux 9.5

    • Rocky Linux 9.1

    • Ubuntu 20.04

    • Alibaba Cloud Linux 3 Container-Optimized Edition

    • Rocky Linux 8.8

    • Ubuntu 22.04

    • Alibaba Cloud Linux 3 Pro

    • Alibaba Cloud Linux 2/3

    • CentOS 7.6 or later, or CentOS 8

    • Anolis OS 7/8

    • Ubuntu 24.04

    ARM architecture

    • Alibaba Cloud Linux 3 Pro

    • Alibaba Cloud Linux 3

Use cases

Scenario

Description

Insufficient system-wide memory

Excessive memory usage on the host exhausts system memory, triggering an OOM event.

cgroup memory limit exceeded

An OOM event occurs when a process within a cgroup exceeds its configured memory limit, causing the cgroup's total memory usage to reach its maximum.

Parent cgroup memory limit exceeded

When the total memory usage of a parent cgroup reaches its limit, the system may trigger an OOM event and terminate a process in a child cgroup.

Insufficient memory on a memory node

In a NUMA architecture, an operating system has multiple memory nodes. You can run the cat /proc/buddyinfo command to view them. If the cpuset.mems parameter restricts a cgroup to use memory from a specific memory node, the OOM Killer may be invoked even if the instance has sufficient free memory overall.

cgroup memory limit exceeded due to excessive shared memory usage

In a cgroup OOM scenario, the diagnosis may find that shared memory consumption exceeds 30% of the cgroup's total user-space memory. In this case, the root cause of the OOM event is likely excessive shared memory usage. Further analysis is required to identify the main consumers.

Prerequisites

  • If you are a RAM user, ensure that the primary Alibaba Cloud account has granted the AliyunECSReadOnlyAccess and AliyunSysomFullAccess system policies to the RAM user.

  • The Operating System Console is enabled.

    When you log on to the Operating System Console for the first time, click Enable Service to enable the service.

Procedure

  1. Go to the Operating System Console.

  2. In the left-side navigation pane, click System Diagnosis.

  3. In the upper-left corner of the page, select the region where your target instance is located.

    image

  4. From the Diagnosis Type list, select Memory Diagnosis. From the Diagnosis Item list, select OOM Diagnosis. Configure the parameters and click Run Diagnosis.

    Note

    If SysOM is not installed, clicking Run Diagnosis automatically installs it on the target ECS instance and then starts the diagnosis.

    The following table describes the parameters.

    Parameter

    Description

    Required

    Instance ID

    The ID of the target ECS instance.

    Yes

    OOM time

    • Select time: Analyze the OOM event that occurred closest to the specified time.

    • Do not specify time: Analyze the last OOM event that occurred on the system.

    No

  5. In the Diagnosis records section, click View Report.

    image

Diagnosis report

  • Basic information

    This section contains basic information about the diagnosis, including the instance ID, diagnosis item, diagnosis report ID, and the diagnosis initiation time.

  • Diagnostic conclusion

    This section provides the diagnostic conclusion and a detailed description of the root cause of the OOM event.

  • Diagnostic suggestions

    This section provides recommendations based on the diagnosis to help you prevent similar OOM events.

  • Diagnosis details

    5eecdaf48460cde5e096db7d0244ca38e602f62b4825b80358e70b814913bc360a414d3de9277d871abf3af1cbd752491e27ac3b54e56010b082e05a3ef860e56c062f7f66aec2f2fa7b0305b35230b9bc2d5e06ca060f62fc653b69905bac42

    • OOM diagnosis details

      This section shows the task that triggered the OOM event, the task's cgroup, the cgroup that triggered the OOM, and the OOM type.

    • (Host OOM) Memory usage analysis

      When an OOM event is caused by insufficient host memory, the diagnosis report shows the host's memory usage at the time of the event. This includes the proportions of system, application, and free memory, and a breakdown of system and application memory usage.

    • (cgroup OOM) Shared memory file usage

      When an OOM event is caused by excessive shared memory usage within a cgroup, the diagnosis report provides a table of shared memory file usage sorted by size.

    • Task list at the time of OOM

      This section lists the tasks running on the system at the time of the OOM event, including the task name, process ID, and user-space memory usage (RSS).

    • (Unreclaimable Slab) Unreclaimable Slab list

      When an OOM event is caused by excessive unreclaimable Slab memory usage, and the kernel version is 5.10 or later (for example, Alibaba Cloud Linux 3), the diagnosis report provides a breakdown of unreclaimable Slab usage.

上一篇: Panoramic memory analysis 下一篇: Go memory diagnostics
阿里云首页 Alibaba Cloud Linux 相关技术圈