
cgroup의 메모리 압박을 보고 싶습니다. 하지만 단순한 cat memory.presure_level
실패.
cgroup의 현재 메모리 부족을 어떻게 알 수 있나요?
답변1
memory.presure_level
레벨 표시용이 아닌 이벤트 수신용으로 사용됩니다.
memory.usage_in_bytes
memory.limit_in_bytes
와 를 비교하면 현재 메모리 압박에 대한 아이디어를 얻을 수 있습니다 memory.soft_limit_in_bytes
.
실제로 무슨 일이 일어나고 있는지 알아보기 위해 memory.presure_level
저는 다음과 같은 간단한 도구를 개발했습니다.https://gist.github.com/vi/46f921db3cc24430f8d4. 이벤트가 발생할 때마다 숫자를 인쇄합니다.
# cgroup_memory_pressure_monitor low .
1
1
1
^C