mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Boldi <a1426z@gawab.com>
To: "Balbir Singh" <balbir@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: top lies ?
Date: Tue, 13 Nov 2007 10:38:26 +0300	[thread overview]
Message-ID: <200711131038.26436.a1426z@gawab.com> (raw)
In-Reply-To: <661de9470711122319m1b8704d1y2f06b1199a21dd52@mail.gmail.com>

Balbir Singh wrote:
> On Nov 13, 2007 12:38 PM, Al Boldi <a1426z@gawab.com> wrote:
> > kloczek wrote:
> > > Some data showed by top command looks like completly trashed.
> > > Fragment from top output:
> > >
> > > Mem:   2075784k total,  2053352k used,    22432k free,    19260k
> > > buffers Swap:  2096472k total,      136k used,  2096336k free, 
> > > 1335080k cached
> > >
> > >    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP nFLT WCHAN     COMMAND
> > >  14515 mysql     20   0 1837m 563m 4132 S   39  27.8 27:14.20 1.2g   18 -         mysqld
> > >
> > > How it is possible that swap ussage is 136k and swapped out portion of
> > > (in this case) mysqld process is 1.2g ?
> >
> > Welcome to OverCommit, aka OOM-nirvana.
> >
> > Try this:
> > # echo 2 > /proc/sys/vm/overcommit_memory
> > # echo 0 > /proc/sys/vm/overcommit_ratio
> >
> > But make sure you have enough swap.
> >
> >
> > Thanks!
>
> The swap cache looks pretty big, may be top is including that data
> while reporting swap usage.

I don't think so.  top reports correctly, it's the VM that is lying.
I guess you can tell what happens when push comes to shove...


Thanks!

--
Al


  reply	other threads:[~2007-11-13  7:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13  7:08 Al Boldi
2007-11-13  7:19 ` Balbir Singh
2007-11-13  7:38   ` Al Boldi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-11-12 17:57 Tomasz Kłoczko
2007-11-12 22:28 ` Jarek Poplawski
2007-11-13  0:14 ` Andreas Schwab
2007-11-13  2:23   ` Tomasz Kłoczko

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=200711131038.26436.a1426z@gawab.com \
    --to=a1426z@gawab.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®