Re: Memory usage analysis

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

 



Hi...

On Wed, Mar 31, 2010 at 17:38, Anand Raj Manickam <anandrm@xxxxxxxxx> 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

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux