On Wed, Mar 31, 2010 at 9:49 PM, Mulyadi Santosa
<[email protected]>wrote:

> Hi...
>
> On Wed, Mar 31, 2010 at 17:38, Anand Raj Manickam <[email protected]>
> wrote:
> >
> > Using these tools i m able to account roughly around
> >
> > 100 MB of user space data
> > 20 MB of kernel space (slab allocs)
> > The total memory is around 512MB  out of which i m able to account only
> for
> > 120MB of memory .
>
>
> What you might forgot is the fact that some user space programs (if
> not all, in some cases) share some of its memory with others in the
> form of shared library, system V shared memory etc. Thus, user space
> memory consumption could be smaller than you think. Top, AFAIK, does
> not count on this fact.
>
> I suggest you look directly at /proc/<pid>/status, specifically its
> VmRSS. AFAIK, this field better describe the memory consumption of a
> process. If you need better precision, once I recall there was a patch
> from Matt Mckall that does more precise memory accounting.
>
> About kernel space memory assumption, I agree with Srdjan that you
> seems missed out the buffer + cache. Further, if you take a look on
> /proc/meminfo, there are fields like page tables, vmalloc, kernel
> stack etc that form the kernel mode of memory consumption.
>
> Hope it helps
>
>
This is a snapshot of meminfo and free

debian:~# cat /proc/meminfo
MemTotal:       508612 kB
MemFree:         12428 kB
Buffers:         94252 kB
Cached:         304792 kB
SwapCached:          0 kB
Active:         267896 kB
Inactive:       188088 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       508612 kB
LowFree:         12428 kB
SwapTotal:     1485972 kB
SwapFree:      1485908 kB
Dirty:             132 kB
Writeback:           0 kB
AnonPages:       56944 kB
Mapped:          14656 kB
Slab:            34724 kB
SReclaimable:    28268 kB
SUnreclaim:       6456 kB
PageTables:        836 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
WritebackTmp:        0 kB
CommitLimit:   1740276 kB
Committed_AS:   662780 kB
VmallocTotal:   516088 kB
VmallocUsed:      3696 kB
VmallocChunk:   511860 kB
debian:~#
debian:~#
debian:~# free
                      total       used       free     shared    buffers
cached
Mem:        508612     496184      12428          0      94260     304792
-/+ buffers/cache:      97132     411480
Swap:      1485972         64    1485908
debian:~#

I guess free derives all the info from meminfo .

Still can someone shed some light on buffers and cached ?















> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>

Reply via email to