Re: memory consumed by kernel

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

 



Hi...

On Thu, Sep 23, 2010 at 16:13, Tayade, Nilesh
<Nilesh.Tayade@xxxxxxxxxxxx> wrote:
>> -----Original Message-----
>> From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-
>> bounce@xxxxxxxxxxxx] On Behalf Of Arun KS
>> Sent: Thursday, September 23, 2010 11:30 AM
>> To: kernelnewbies@xxxxxxxxxxxx
>> Subject: memory consumed by kernel
>>
>> Hello There,
>>
>> cat /proc/meminfo will show the memory statistics of the entire
>> system.
>>
>> Is there a way to see the memory consumed by the kernel alone?
>
> I do not have thorough idea. But it seems there is no ready-made tool
> (userspace/kernelspace) to know the complete kernel memory.
> To debug certain memory related issues - we can refer the /proc/kallsyms
> (exact place where each symbol is loaded in memory) and /proc/slabinfo -
> the slab allocation for different objects. But considering the total
> kernel memory it also includes many other allocations which we do not do
> explicitly - like Page tables, or some kind of metadata.

You need to define the limitation of "consumed by the kernel alone".
is it consumed by kernel but later might be used by user space?

In my opinion, you can do it the other way around: sum up all user
mode pages. pay attention with shared memory between threads (this is
the greatest hurdle...so far I know none of tools that succesfully
count them without the help of proper kernel patch..which is likely,
outside mainline kernel tree). Consider it N. Then if you substract
Total RAM with N, you get kernel memory consumption


-- 
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