Sam Gleske on 17 Oct 2012 19:46:43 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Kernel meminfo


On my Ubuntu 12.04 system it is running a stock 3.2.x kernel (uname -r
= 3.2.0-32-generic).  When I cat /proc/meminfo I see what appears to
be two undocumented fields: 1) Active(anon) and 2) Active(file); the
sum of which equal Active.  Is the kernel documentation out of date on
this subject or am I looking in the wrong place?

I would like to know what Active(anon) and Active(file) mean in /proc/meminfo.

*************************************************************************
You can stop reading: The following are my own investigations in case
you're interested.

Here is a reference to the currently documented values in the Linux
Kernel source tree for the latest stable 3.2.y kernel.
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=Documentation/filesystems/proc.txt;h=0ec91f03422e5befe8dd7f69d22dec4a22250f69;hb=refs/heads/linux-3.2.y#l671

Here's a pastebin of my current /proc/meminfo http://fpaste.org/Og5t/

There appear to be several other undocumented fields when comparing my
/proc/meminfo file and the documentation in the kernel source.

anon in Active(anon) is likely referring to anonymous memory which is
essentially heap/stack memory which is allocated by programs using
malloc.  It basically is memory with no filesystem associations.  file
in Active(file) is likely referring to the File Cache which  contains
disk and network filesystem data and metadata (can include files
loaded into memory and possibly execution instructions loaded from
disk?).  I inferred the anonymous/file from the following links.
- http://oreilly.com/catalog/spt2/chapter/ch04.html#21495
- http://linux-mm.org/PageReplacementDesign

I was looking through some of the kernel source and did find the
strings where Active(anon) and other values are listed.  See
fs/proc/meminfo.c
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=fs/proc/meminfo.c;h=80e4645f7990cf4cc0e636a7c19f9840503cdd42;hb=refs/heads/linux-3.2.y#l52

I can make some educated guess as to what they mean given what I
already know but I'd like to know if anyone else has an exact answer
with where to find this information.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug