Skip to content

Commit

Permalink
exclude cgroups slab_reclaimable from container_memory_working_set_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieR-o-o-t committed Jan 5, 2025
1 parent 255cff7 commit c2957b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions container/libcontainer/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,12 @@ func setMemoryStats(s *cgroups.Stats, ret *info.ContainerStats) {
workingSet -= v
}
}

// Exclude "slab_reclaimable" from workingSet
if v, ok := s.MemoryStats.Stats["slab_reclaimable"]; ok {
workingSet -= v
}

ret.Memory.WorkingSet = workingSet
}

Expand Down

0 comments on commit c2957b2

Please sign in to comment.