"free" doesn't account for slab cache

Bug #126329 reported by Johan Walles
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
procps (Debian)
Fix Released
Unknown
procps (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: procps

Using procps 1:3.2.7-3ubuntu2 from Feisty, do "free -m":

             total used free shared buffers cached
Mem: 2026 1967 59 0 629 665
-/+ buffers/cache: 672 1354
Swap: 0 0 0

Historically I've used the "-/+ buffers/cache" line as a way to determine how much memory my system is "really" using. "Really" in this case means "memory in use that won't just be freed up when I want it for something".

Since the "-/+ buffers/cache" line doesn't include the Slab cache (the "Slab:" line in /proc/meminfo), and the Slab cache can grow quite big, "free" cannot be used to determine the amount of free memory in the machine :-(.

I would like "free" to count the Slab: memory as free, at least on the "-/+ buffers/cache" line.

Or that somebody could tell me an alternative way of finding out the amount of free memory in my machine without having to manually add things up from /proc/meminfo.

Revision history for this message
Steven Harms (sharms) wrote :

Is this still an issue in Intrepid? I see free's manpage points to slabtop and a few other programs, is it still not slab aware?

Changed in procps:
status: New → Incomplete
Revision history for this message
Johan Walles (walles) wrote :

Still not slab aware in procps 1:3.2.7-9ubuntu2.1 :-(.

apt-get source procps

Slab info is read in procps-3.2.7/proc/sysinfo.c, but it's not being used by procps-3.2.7/free.c.

Changed in procps:
status: Incomplete → Confirmed
Phillip Susi (psusi)
summary: - "free" shows too much memory in use
+ "free" doesn't account for slab cache
Changed in procps (Debian):
status: Unknown → Confirmed
Changed in procps (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.