Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upExpose new metrics for memory usage in the container. #303
Conversation
The metric "mem_kmem_usage_bytes" is the total kernel memory usage by processes in the cgroup in bytes. The metric "mem_kmem_tcp_usage_bytes" is the total memory usage for TCP buffers in bytes.
|
I don't think we turn on kmem accounting yet in Mesos containerizer. I remember in old kernels, you need to set kmem.limit_in_bytes once to enable kmem accounting. I am not sure about the new kernel behavior. Also, we need to be careful on bugs like this on old kernels if we turn on kmem accounting |
|
We've been running with this patch at Twitter since February and we're getting kmem metrics. The mentioned bug is interesting, we've only been running with 4.9 and later. |
|
I am not sure if the kernel behavior has changed or not in newer kernels. For example: You'll have to write So if kmem accounting is not enabled, i don't know what will happen if you read the data from |
|
Looks like on CentOS 7 (3.10.0-693.5.2.el7.x86_64). If kmem accounting is not enabled, the I think we should probably add an agent flag to control the enabling of kmem accounting feature, and only report stats if kmem accounting is enabled. |
|
That sounds reasonable. I'll get to update the review with this. Should I move the review to reviewboard or keep iterating here ? |
|
@fcuny We prefer reviewboard for non trivial changes. |
|
@fcuny were you going to continue this work on ReviewBoard? |
fcuny commentedJul 20, 2018
The metric "mem_kmem_usage_bytes" is the total kernel memory usage by
processes in the cgroup in bytes.
The metric "mem_kmem_tcp_usage_bytes" is the total memory usage for TCP
buffers in bytes.