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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to