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
Swap accounting looks busted #60
Comments
have you tried this with git head? I think this is fixed by
a2de34b
|
Not sure, if I am having the same problem, but:
Host has 24199MB of swap, and:
If I revert the patch a2de34b, then the problem goes away for me. |
nehaljwani
added a commit
to nehaljwani/lxcfs
that referenced
this issue
Dec 18, 2015
When no limit is specified using lxc.cgroup.memory.memsw.limit_in_bytes, overflow occurs while calculating Swap{Total,Free}. Commit a2de34b tried to fix this, but introduced another bug, wherein if memory.memsw.limit_in_bytes >= memory.limit_in_bytes, then Swap{Total,Free} are not shown as expected. This patch assumes that if memory.memsw.limit_in_bytes is not set, then /sys/fs/cgroup/memory/lxc/${CT_NAME}/memory.memsw.limit_in_bytes will have the default value = LONG_MAX based on: https://github.com/torvalds/linux/blob/v4.3/mm/memcontrol.c#L4037 https://github.com/torvalds/linux/blob/v4.3/mm/memcontrol.c#L2893 https://github.com/torvalds/linux/blob/v4.3/include/linux/page_counter.h#L21 Fixes lxc#60 Signed-off-by: Nehal J Wani <nehaljw.kkd1@gmail.com>
Closed
nehaljwani
added a commit
to nehaljwani/lxcfs
that referenced
this issue
Jan 8, 2016
When no limit is specified using lxc.cgroup.memory.memsw.limit_in_bytes, overflow occurs while calculating Swap{Total,Free}. Commit a2de34b tried to fix this, but introduced another bug, wherein if memory.memsw.limit_in_bytes >= memory.limit_in_bytes, then Swap{Total,Free} are not shown as expected. This patch assumes that if memory.memsw.limit_in_bytes is not set, then /sys/fs/cgroup/memory/lxc/${CT_NAME}/memory.memsw.limit_in_bytes will have the default value = LONG_MAX based on: https://github.com/torvalds/linux/blob/v4.3/mm/memcontrol.c#L4037 https://github.com/torvalds/linux/blob/v4.3/mm/memcontrol.c#L2893 https://github.com/torvalds/linux/blob/v4.3/include/linux/page_counter.h#L21 Fixes lxc#60 Signed-off-by: Nehal J Wani <nehaljw.kkd1@gmail.com>
I will assume this is fixed by the commit i referenced earlier. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Host value is 6GB of swap, container has no swap limit.
The text was updated successfully, but these errors were encountered: