You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Milan Vymazal (Jira)" <ji...@apache.org> on 2026/09/08 06:47:00 UTC
[jira] [Created] (YARN-11991) CGroupsV2ResourceCalculator reports wrong virtual memory size (swap only instead of anon + swap)
Milan Vymazal created YARN-11991:
------------------------------------
Summary: CGroupsV2ResourceCalculator reports wrong virtual memory size (swap only instead of anon + swap)
Key: YARN-11991
URL: https://issues.apache.org/jira/browse/YARN-11991
Project: Hadoop YARN
Issue Type: Bug
Components: yarn
Affects Versions: 3.5.0
Reporter: Milan Vymazal
On hosts using cgroup v2, CGroupsV2ResourceCalculator#getVirtualMemorySize()
returns only the swap usage (memory.swap.current) instead of the real
virtual memory of the container process tree.
AbstractCGroupsResourceCalculator takes a single "virtualMemoryKey" and
reads it directly:
{code:java}
getVirtualMemorySize() -> getStat(virtualMemoryKey)
{code}
This is correct for cgroup v1, where memory.memsw.usage_in_bytes already
contains memory + swap in one counter.
cgroup v2 has no combined memory+swap counter. The v2 calculator maps
MEMSW_STAT to memory.swap.current, which is swap usage only. The resident
part (memory.stat#anon) is never added, so the reported virtual memory is
much lower than reality.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-dev-help@hadoop.apache.org