qqvpp opened a new pull request, #8726:
URL: https://github.com/apache/hadoop/pull/8726

   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:
   ```java
   getVirtualMemorySize() -> getStat(virtualMemoryKey)
   ```
   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 is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to