public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* top lies ?
@ 2007-11-12 17:57 Tomasz Kłoczko
  2007-11-12 22:28 ` Jarek Poplawski
  2007-11-13  0:14 ` Andreas Schwab
  0 siblings, 2 replies; 7+ messages in thread
From: Tomasz Kłoczko @ 2007-11-12 17:57 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 906 bytes --]


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 ?
Mayby some other data from /proc/<pid> shows some *real* data ?

Above is on procps 3.2.7 and kernel 2.6.22.12.

kloczek
-- 
-----------------------------------------------------------
*Ludzie nie mają problemów, tylko sobie sami je stwarzają*
-----------------------------------------------------------
Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: kloczek@rudy.mif.pg.gda.pl*

^ permalink raw reply	[flat|nested] 7+ messages in thread
* top lies ?
@ 2007-11-13  7:08 Al Boldi
  2007-11-13  7:19 ` Balbir Singh
  0 siblings, 1 reply; 7+ messages in thread
From: Al Boldi @ 2007-11-13  7:08 UTC (permalink / raw)
  To: linux-kernel

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!

--
Al


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

end of thread, other threads:[~2007-11-13  7:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-12 17:57 top lies ? 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
  -- strict thread matches above, loose matches on Subject: below --
2007-11-13  7:08 Al Boldi
2007-11-13  7:19 ` Balbir Singh
2007-11-13  7:38   ` Al Boldi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox