Skip to content

Commit c2957b2

Browse files
exclude cgroups slab_reclaimable from container_memory_working_set_bytes
1 parent 255cff7 commit c2957b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

container/libcontainer/handler.go

+6
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,12 @@ func setMemoryStats(s *cgroups.Stats, ret *info.ContainerStats) {
848848
workingSet -= v
849849
}
850850
}
851+
852+
// Exclude "slab_reclaimable" from workingSet
853+
if v, ok := s.MemoryStats.Stats["slab_reclaimable"]; ok {
854+
workingSet -= v
855+
}
856+
851857
ret.Memory.WorkingSet = workingSet
852858
}
853859

0 commit comments

Comments
 (0)