New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail on memcg_usage_in_bytes_test #326
Comments
I've seen similar issue for memcg_stat_test. |
@pevik have you worked on this case? |
@wangli5665 I met the same problem(my environment was 4.18.0-107.el8.x86_64). I am not sure whether this is a case problem or a kernel design. What do you think about it? |
Does anyone also work on it? This failure seems existed a long time. |
I met the same issue.
Seems the test case need to check if memory.use_hierarchy can be disabled and then do the setting. |
@xuyang0410 Feel free to work on the issue. IMHO nobody else is working on it. |
Any update on this issue? |
The test mostly passes but sometimes it gets fail, here is the log:
memcg_usage_in_bytes_test 1 TINFO: Starting test 1
memcg_usage_in_bytes_test 1 TINFO: Running memcg_process --mmap-anon -s 4194304
memcg_usage_in_bytes_test 1 TINFO: Warming up pid: 1583
memcg_usage_in_bytes_test 1 TINFO: Process is still here after warm up: 1583
memcg_usage_in_bytes_test 1 TFAIL: memory.usage_in_bytes is 4325376, 4194304 expected
As you can see, the value of memory.usage_in_bytes (4325376) is bigger than the sum of RSS, CACHE and SWAP in memory.stat (4194304), which is the value the test case is expecting.
As I check in a reliable documentation, the memory.usage_in_bytes doesn't show the exact value of memory (and swap) usage. If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP) value in memory.stat.
I think it's better to use the sum of RSS, CACHE AND SWAP value in memory.stat to check the result of the test, because apparently the accounting of cgroup memory includes disk cache pages which were used by the processes, so the value of memory.usage_in_bytes might be not truthful in this test.
The text was updated successfully, but these errors were encountered: