-
Notifications
You must be signed in to change notification settings - Fork 24
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
hh: understand why system CPU usage is so high #22
Comments
cc @topherbullock the thing I mentioned yesterday after standup |
Another interesting fact: despite having provisioned what could be the best combination of Which is interesting, given that in those moments, we've never gotten close to what should be our quota: |
I've been wondering whether this is related to |
I don't know the specifics of overlay but we do know one situation where overlay struggles is when using privileged containers. In the case of big resources with Strabo, using privileged will cause overlay to apply a real write on the upper dir with the correct permissions instead of using the read only version in the lower dir. |
If I understand correctly, In the case of |
It turns out that Running |
Hey, I was giving a look at what goes on with the machine when it's in such state, and it seems that such performance trashing is coming from the memory subsystem.
I remember reading that per-cgroup memory accounting is not free, but that seems quite expensive. Maybe there's something we're missing here. Here are some other interesting stats: At the moment that we're in such state, we have a bunch of small IOPS, having a quite high IO completion time 🤔 |
Supporting the theory that it's indeed something related to paging and not the fact that our IOPS are being throttled: We're pretty much never being throttled for reads 🤔 (the stats for throttling come from Stackdriver, i.e., from the IaaS itself). Reading https://engineering.linkedin.com/blog/2016/08/don_t-let-linux-control-groups-uncontrolled, it feels like we're hitting case
It'd be nice to create a reproducible for this. I'll see if I can come with something up with chicken-gun. |
maybe some good news! As a way of trying to get rid of some of the I'll perform some more runs tomorrow and see how it goes 👍 |
|
As reported in "Understand why system CPU usage is so high"[1], we see that the kernel spends a lot of time trying to reclaim memory for itself when a bunch of containers start running on those VMs. By adjusting the minimum amount of reserved memory for the kernel to a higher value, we're able to then let it do less work. With the introduction of the `sysctl` chart, every time a new `worker` node gets in, the pod in the daemonset will get scheduled to it, thus, the parameters we want will be set on such selected set of nodes. [1]: #22 Signed-off-by: Ciro S. Costa <[email protected]>
Actually ... this didn't really help much 🤷♂ It's quite unfortunate that when tracing Looking at https://lore.kernel.org/lkml/[email protected]/, which suggests that 4.19+ ships with an improvement to the whole That'd still not be a 100%-valid comparison as we'd not be running on top of a GKE-managed instance type (PKS wouldn't help us here either as the stemcells are 4.14-based just like the Ubuntu family from GKE, as well as the COS-family - see https://cloud.google.com/container-optimized-os/docs/release-notes#current_active_releases). Also, this is quite interesting:
ooooh yeah, Knowing those, we can also prepare something with side note: if this really helps, the next step will be seeing if it's possible to get |
(not completely related, but something else to keep an eye on - |
I spent some time trying to see how a large number of
which seems to be quite on point with the comments in the The reproducible consists of:
|
Hey,
Looking at the CPU utilization of a node that runs the worker that got assigned the final step of the
strabo
pipeline, we can see that the CPU utilization gets to a quite interesting place:From the perspective of the container, we can see similar results, indicating that at least a great part of that usage indeed comes from processes within that worker cgroup:
Doing a
pidstat
on the pid ofconcourse worker
inside the container:To help troubleshoot that, it might be useful to generate flamegraphs from the perspective of the host to see from the traces where it's spending all of that time.
The text was updated successfully, but these errors were encountered: