All Products
Search
Document Center

Alibaba Cloud Linux:Overview of the Memcg Exstat feature

Last Updated:Aug 23, 2024

This topic describes the new memcg statistical items added to the Memcg Exstat feature in Alibaba Cloud Linux 2 with kernel version 4.19.91-18.al7 and later and Alibaba Cloud Linux 3 with kernel version 5.10.134-12.al8 and later. The new memcg statistical items include statistics on latency caused by changes in the global minimum watermark and statistics on latency caused by memcg backend asynchronous reclamation.

New memcg statistical items

Memcg statistical item

Description

Statistics on latency caused by changes in the global minimum watermark

  • Alibaba Cloud Linux provides the memcg global minimum watermark rating feature. For more information, see Memcg global minimum watermark rating.

  • Alibaba Cloud Linux provides statistics on the throttling time resulting from the event that the offset global minimum watermark specified in the memcg.exstat interface is exceeded. The statistical item is wmark_min_throttled_ms.

    Note

    The statistical item is recursive to the parent group, and the interface file is not stored in the memcg root directory.

  • Statistics description:

    • Interface file: memory.exstat

    • Statistical item: wmark_min_throttled_ms

    • Unit: microseconds

Statistics on latency caused by memcg backend asynchronous reclamation

  • Alibaba Cloud Linux provides the memcg backend asynchronous reclaim feature: memcg kswapd. For more information, see Memcg backend asynchronous reclaim.

  • Alibaba Cloud Linux provides statistics on latency caused by memcg backend asynchronous reclamation in the memcg.exstat interface. The statistics include the amount of blocking time and working time during the reclamation. The statistical item is wmark_reclaim_work_ms.

    Note

    The statistical item is recursive to the parent group, and the interface file is not stored in the memcg root directory.

  • Statistics description:

    • Interface file: memory.exstat

    • Statistical item: wmark_reclaim_work_ms

    • Unit: microseconds

Query the memory.exstat interface

Create a test file at the mount point of the memcg and check whether the memcg file contains the memory.exstat interface. In most cases, the mount point of the memcg is /sys/fs/cgroup/memory.

  1. Create a test file.

    sudo mkdir /sys/fs/cgroup/memory/test
  2. Query the memory.exstat interface.

    cat /sys/fs/cgroup/memory/test/memory.exstat

    The following command output indicates that the memcg file contains the memory.exstat interface.

    wmark_min_throttled_ms 0
    wmark_reclaim_work_ms 0