From: Ricardo Jose Pfitscher <ricardo.pfitscher@gmail.com>
To: Rafael Aquini <aquini@redhat.com>
Cc: linux-mm@kvack.org
Subject: Re: How much memory kernel uses
Date: Thu, 11 Apr 2013 08:28:52 -0300 [thread overview]
Message-ID: <CABA9-+ppvxUhCQrgH6FMaEGQyUajsksD-wMvBk8y+ANpBvLtew@mail.gmail.com> (raw)
In-Reply-To: <20130410161144.GA25394@optiplex.redhat.com>
[-- 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 --]
prev parent reply other threads:[~2013-04-11 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 1:07 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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABA9-+ppvxUhCQrgH6FMaEGQyUajsksD-wMvBk8y+ANpBvLtew@mail.gmail.com \
--to=ricardo.pfitscher@gmail.com \
--cc=aquini@redhat.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox