This topic describes the Memcg Exstat (Extend/Extra) feature provided by Alibaba Cloud
Linux 2 kernel version 4.19.91-18.al7
or later.
Background information
- Interfaces supported by the cgroup v1 interface: memory.events, memory.events.local, and memory.stat
- Statistics on latency caused by changes in the global minimum watermark
- Statistics on latency caused by backend asynchronous reclaim
Features
Alibaba Cloud Linux 2 kernel features are implemented based on kernel interfaces. This topic describes the implementation methods for each feature.
Feature | Description |
---|---|
Statistics on memory events |
The cgroup v2 interface of community versions of the Linux kernel supports the memory.events and memory.events.local interfaces to show the number of times that specific memory events have occurred in a memcg. For more information, visit cgroup-v2.rst. The cgroup v1 interface of the Alibaba Cloud Linux 2 kernel supports the memory.events and memory.events.local interfaces.
Note The interface files are not stored in the memcg root directory.
|
Statistics on memory workingsets |
The cgroup v2 interface of community versions of the Linux kernel supports the memory.stat interface. The interface file contains the following statistical items: The cgroup v1 interface of the Alibaba Cloud Linux 2 kernel supports the memory.stat interface. The interface file contains the following statistical items:
workingset refault , workingset activate , workingset nodereclaim , and workingset restore . The following content is the official description of workingset restore :
|
Statistics on latency caused by changes in the global minimum watermark |
Alibaba Cloud Linux 2 provides the memcg global minimum watermark rating feature. For more information, see Memcg global minimum watermark rating. Alibaba Cloud Linux 2 provides statistics on the time of throttling that results from
the offset global minimum watermark specified in the memcg.exstat interface being exceeded. The statistical item is
wmark_min_throttled_ms .
Note This statistical item is recursive to the parent group, and the interface file is
not stored in the memcg root directory.
Statistics description:
|
Statistics on latency caused by backend asynchronous reclaim |
Alibaba Cloud Linux 2 provides the backend asynchronous reclaim feature memcg kswapd. For more information, see Memcg backend asynchronous reclaim. Alibaba Cloud Linux 2 provides statistics on latency caused by backend asynchronous
reclaim in the memcg.exstat interface. These statistics include the block time and actual working time of the
reclaim. The statistical item is
wmark_reclaim_work_ms .
Note This statistical item is recursive to the parent group, and the interface file is
not stored in the memcg root directory.
Statistics description:
|
Examples
Create a test file at the /sys/fs/cgroup/memory mount point of the memcg. Make sure that the test file path contains the memory.events, memory.events.local, and memory.exstat interface files. You must also make sure that the memory.stat interface file contains the workingset
statistical item.