Skip to content
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

Containerd memory usage in Cost tab #60

Closed
gkalwig opened this issue Jun 20, 2023 · 4 comments
Closed

Containerd memory usage in Cost tab #60

gkalwig opened this issue Jun 20, 2023 · 4 comments
Assignees

Comments

@gkalwig
Copy link

gkalwig commented Jun 20, 2023

Hi,

In cost tab we can see high usage of memory by Containerd@ (or dockerd on previous K8s versions) but on my knowledge these memory is not used. It's only cached, so it shouldn't be visible on these usage bars. Information about we had 50-70% memory cached it's not give us anything usefull because it's standard behavior of linux system to use free memory as cache.

On example below we really have used less than 50% memory not ~80%, and containerd (magenta color) not use 38% memory.

image

image

image

@def
Copy link
Member

def commented Jun 21, 2023

I can't agree with you.
For example, a Postgres server uses 32GB of page cache. While it is true that this memory can be reclaimed when needed, having such a cache is critical for database performance. Without it, query times would increase due to disk access.
In this case, it is better to assume that this process is utilizing this amount of memory. Otherwise, if you don't take this into account when optimizing, it can negatively impact its performance.

@gkalwig
Copy link
Author

gkalwig commented Jun 22, 2023

Actually, from my perspective, you partly agreed (partly not) with me, so I'll move on with my ideas to improve that page :)

I had another 2 point to support my point of view:

  1. On this diagrams we correspond used vs requested. Where K8s don't care about how much memory is cached, OOM can occur only if all memory is used/container used more memory than limit. So how much memory is cached doesn't matter in the context of k8s behavior and distribution of the workload.
  2. You give example of Postgresql, when i will deploy Postgresql on k8s. Still on that diagram i will have containerd memory use, not Postgresql container.

But if we still remain in the position that the display of the cached memory is correct, then I suggest:

  • Let's not call it containerd / dockerd. Let's call it "cached" and give it some dark gray color or something like beige(#F5F5DC). On the other hand we can change "others" to dark gray, and give "cached" a light gray.

Best regards,

@def
Copy link
Member

def commented Jun 23, 2023

You've convinced me! :)

I really like your suggestion of having a separate element that reflects the size of page cache. This eliminates any potential misconception that this memory is "idle".

We'll fix this soon.

Thank you!

@def def self-assigned this Jun 23, 2023
def added a commit that referenced this issue Jun 29, 2023
def added a commit that referenced this issue Jun 29, 2023
@def
Copy link
Member

def commented Jun 30, 2023

This is fixed in Coroot v0.17.10

@def def closed this as completed Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants