Open zhiweiv opened 2 years ago
I get same memory usage result with crictl to query the container stats directly in host, so it should not be the kubernetes issue. I think the value was retrieved from hcsshim via cri interface.
This lead a new issue, seems the node memory usage is based on pods memory usage in it. kubectl top node shows a Windows node 70% memory usage, but the actual usage in Windows task manager is 90%.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
Hi @zhiweiv, thanks for the information here. We're aware of this issue and are working to fix the stats output from containers soon. There are a lot of things in the pipeline for performance and monitoring of Windows containers so I can assure you this will be fixed but I can't guarantee a timeline at the moment.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @brasmith-ms, please provide an update or close this issue.
@Howard-Haiyang-Hao are you familiar with this issue?
This issue has been open for 30 days with no updates. @Howard-Haiyang-Hao, @brasmith-ms, please provide an update or close this issue.
@zhiweiv, I've reached out to the feature team for an update on this issue. I'll inform you as soon as I receive any updates.
@zhiweiv Please follow the progress of this issue through the PR: (https://github.com/kubernetes/kubernetes/pull/122999). You'll find updates on when it will be addressed there. Thanks marosset for providing the information.
Thanks for the update, but seems https://github.com/kubernetes/kubernetes/pull/122999 is related to CPU usage of Windows Container, this issue is something with Memory usage.
Hi @zhiweiv, thanks for the information here. We're aware of this issue and are working to fix the stats output from containers soon. There are a lot of things in the pipeline for performance and monitoring of Windows containers so I can assure you this will be fixed but I can't guarantee a timeline at the moment.
Hi Brandon, your tantalizing account of exciting things in the pipeline "soon" was issued
Also, please mister/miss Microsoft bot, kindly don't close this thread.
This issue has been open for 30 days with no updates. @Howard-Haiyang-Hao, @brasmith-ms, please provide an update or close this issue.
Hi @jwilsonCX, Brandon is no longer with our team so let's see if @fady-azmy-msft knows of these ✨exciting things✨.
Thanks for the update on Brandon's whereabouts, Nicole. Perhaps that explains the relative state of suspended animation of the ticket? Fingers crossed that @fady-azmy-msft has somethin' cookin' in this regard!
If we don't have an update to share, then we'll triage this request in our next meeting and get some new eyes on it.
This issue has been open for 30 days with no updates. @Howard-Haiyang-Hao, please provide an update or close this issue.
This issue is being addressed in https://github.com/kubernetes/kubernetes/pull/122999. Thank you for reporting it. Please let us know if the fix resolves your issue.
@Howard-Haiyang-Hao As noted above, that PR doesn't seem to be related to this issue, as it's fixing a CPU usage accounting issue introduced in Kubernetes in 2023, and this ticket is about Memory usage account and was reported in 2021.
On Windows there are two stats used primarliy for memory consumption because on windows memory is always backed by virtual memory. The two stats are commit memory vs working set memory. https://stackoverflow.com/questions/7954781/whats-the-difference-between-working-set-and-commit-size
Kubelet and containerd only report the working set memory
If someone really needs to differentiate between the commit bytes memory and working set memory for containers they should use something like premethues node-exporter to get more detailed stats"
@zylxjtu I think that might be a different issue. I haven't seen anything discussed here that suggests that the original diagnosis was wrong, i.e. that HCS (presumably), when asked for the memory usage (working set) of the container, is returning only the main process's working set (and maybe smss.exe?), and is not accounting for the memory usage of the other processes in the container.
In the original but report, there's 200MB-300MB of unaccounted usage there, and https://github.com/microsoft/Windows-Containers/issues/180#issuecomment-994258849 notes this is giving incorrect statistics to Kubernetes which may lead to unintentional overallocation. (Although this maybe is an unrelated issue, node memory usage/availability should not be able to be fooled by memory used by things other than pods on the host...)
Thanks @TBBle for clarification, I reported this because of https://github.com/microsoft/Windows-Containers/issues/176, the svchost.exe(there are 8~10 svchost.exe created along with each container) has memory leak, in last comment you can see a pod without any activity after 23 days, svchost takes 438MB total, it will still increase as time goes, the top nodes show the node memory is high, but top pods show pod memory is low.
This issue has been open for 30 days with no updates. @Howard-Haiyang-Hao, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @Howard-Haiyang-Hao, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @Howard-Haiyang-Hao, please provide an update or close this issue.
This issue has been open for 30 days with no updates. @Howard-Haiyang-Hao, please provide an update or close this issue.
I deployed a pod with following yaml
kubectl top pod shows pod memtest used 101Mi memory, however the total memory is more than that, seems only the main process's memory is counted as container memory(powershell.exe 99,196 K), you can see other system processes(mainly svchost.exe) in container used more memory but not counted.