The Memcg Exstat feature adds two memory control group (memcg) statistical counters to Alibaba Cloud Linux. These counters help you diagnose memory throttling and reclamation latency at the cgroup level.
This feature is available on Alibaba Cloud Linux 2 (kernel4.19.91-18.al7and later) and Alibaba Cloud Linux 3 (kernel5.10.134-12.al8and later).
Statistical items
Both counters are exposed through the memory.exstat interface file. Each counter is recursive — a cgroup accumulates values from all its descendant cgroups. Neither counter appears in the memcg root directory.
| Counter | What it measures | Unit |
|---|---|---|
wmark_min_throttled_ms | Throttling time in microseconds accumulated when memory pressure causes the offset global minimum watermark (set via memcg.exstat) to be exceeded. Part of the memcg global minimum watermark rating feature. | Microseconds |
wmark_reclaim_work_ms | Total latency in microseconds caused by backend asynchronous reclamation (memcg kswapd), including both blocking time and working time during reclamation. Part of the memcg backend asynchronous reclaim feature. | Microseconds |
Verify the memory.exstat interface
Create a test cgroup under the memcg mount point (typically /sys/fs/cgroup/memory) to confirm the memory.exstat interface is available.
Create a test directory.
sudo mkdir /sys/fs/cgroup/memory/testQuery the interface. If the interface is present, the output looks like the following:
$ cat /sys/fs/cgroup/memory/test/memory.exstat wmark_min_throttled_ms 0 wmark_reclaim_work_ms 0
Related topics
该文章对您有帮助吗?