All of lore.kernel.org
 help / color / mirror / Atom feed
* How much memory kernel uses
@ 2013-04-10  1:07 Ricardo Jose Pfitscher
  2013-04-10  9:41 ` Jerry
  2013-04-10 16:11 ` Rafael Aquini
  0 siblings, 2 replies; 4+ messages in thread
From: Ricardo Jose Pfitscher @ 2013-04-10  1:07 UTC (permalink / raw)
  To: linux-mm

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

Hello guys,
I need help with memory management, i have a question: Is there a way to
find out how much memory is being used by the kernel (preferably form
userspace)?

Anything like /proc/meminfo....

Thank you,

-- 
Ricardo José Pfitscher

[-- Attachment #2: Type: text/html, Size: 385 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How much memory kernel uses
  2013-04-10  1:07 How much memory kernel uses Ricardo Jose Pfitscher
@ 2013-04-10  9:41 ` Jerry
  2013-04-10 16:11 ` Rafael Aquini
  1 sibling, 0 replies; 4+ messages in thread
From: Jerry @ 2013-04-10  9:41 UTC (permalink / raw)
  To: Ricardo Jose Pfitscher; +Cc: linux-mm

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

Maybe you should point out which part memory belongs the memory kernel
using. Do you means the memory allocated with GFP_KERNEL?


2013/4/10 Ricardo Jose Pfitscher <ricardo.pfitscher@gmail.com>

> Hello guys,
> I need help with memory management, i have a question: Is there a way to
> find out how much memory is being used by the kernel (preferably form
> userspace)?
>
> Anything like /proc/meminfo....
>
> Thank you,
>
> --
> Ricardo José Pfitscher
>
>
>


-- 
I love linux!!!

[-- Attachment #2: Type: text/html, Size: 1001 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How much memory kernel uses
  2013-04-10  1:07 How much memory kernel uses Ricardo Jose Pfitscher
  2013-04-10  9:41 ` Jerry
@ 2013-04-10 16:11 ` Rafael Aquini
  2013-04-11 11:28   ` Ricardo Jose Pfitscher
  1 sibling, 1 reply; 4+ messages in thread
From: Rafael Aquini @ 2013-04-10 16:11 UTC (permalink / raw)
  To: Ricardo Jose Pfitscher; +Cc: linux-mm

On Tue, Apr 09, 2013 at 10:07:37PM -0300, Ricardo Jose Pfitscher wrote:
>    Hello guys,
>    I need help with memory management, i have a question: Is there a way
>    to find out how much memory is being used by the kernel (preferably
>    form userspace)?
>    Anything like /proc/meminfo....
>    Thank you,
>    --
>    Ricardo Jose Pfitscher

Take a glance at http://www.halobates.de/memorywaste.pdf as a start-point to
understand where the kernel is potentially using memory (the doc is old, and
things might have changed a bit since its publication, but it stills valid as a
study reference). Also, this userland tool might come handy to your studies:
http://www.selenic.com/smem/


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How much memory kernel uses
  2013-04-10 16:11 ` Rafael Aquini
@ 2013-04-11 11:28   ` Ricardo Jose Pfitscher
  0 siblings, 0 replies; 4+ messages in thread
From: Ricardo Jose Pfitscher @ 2013-04-11 11:28 UTC (permalink / raw)
  To: Rafael Aquini; +Cc: linux-mm

[-- Attachment #1: Type: text/plain, Size: 1762 bytes --]

Hi Jerry,

Thanks for your answer.

I want to know how much memory the kernel is currently using --
text+data+heap+stack, if possible. I understand that heap and stack can be
gleaned by looking at Slab and KernelStack in /proc/meminfo, but I don't
know how can I account for the kernel code and other data.

In case you're wondering why the heck I want to know this, I'm trying to
estimate how much physical memory I actually need in a system, by comparing
memory usage to available memory. Subtracting buffers+cache from free
memory gives me how much memory is being used by user processes, without
accounting for memory used by the kernel.

Any rules (either hard and fast, or rules of thumb) on how much memory
should be free before the system "senses" memory pressure would also help.
My goal is to detect memory shortages (long) before the system starts
hitting swap space.

Best regards,
Ricardo


2013/4/10 Rafael Aquini <aquini@redhat.com>

> On Tue, Apr 09, 2013 at 10:07:37PM -0300, Ricardo Jose Pfitscher wrote:
> >    Hello guys,
> >    I need help with memory management, i have a question: Is there a way
> >    to find out how much memory is being used by the kernel (preferably
> >    form userspace)?
> >    Anything like /proc/meminfo....
> >    Thank you,
> >    --
> >    Ricardo José Pfitscher
>
> Take a glance at http://www.halobates.de/memorywaste.pdf as a start-point
> to
> understand where the kernel is potentially using memory (the doc is old,
> and
> things might have changed a bit since its publication, but it stills valid
> as a
> study reference). Also, this userland tool might come handy to your
> studies:
> http://www.selenic.com/smem/
>
>
>


-- 
Ricardo José Pfitscher

[-- Attachment #2: Type: text/html, Size: 2744 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-11 11:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-10  1:07 How much memory kernel uses Ricardo Jose Pfitscher
2013-04-10  9:41 ` Jerry
2013-04-10 16:11 ` Rafael Aquini
2013-04-11 11:28   ` Ricardo Jose Pfitscher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.