The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: mru@users.sourceforge.net (Måns Rullgård)
To: linux-kernel@vger.kernel.org
Subject: Strange memory usage reporting
Date: Tue, 26 Aug 2003 14:18:54 +0200	[thread overview]
Message-ID: <yw1xad9w1uj5.fsf@users.sourceforge.net> (raw)


I was a little surprised to see top tell me this:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
10642 mru       11   0 23200  81m 2740 S  0.0 37.0   0:00.07 tcvp              

It didn't make sense that RES > VIRT, so I check /proc/pid/*.  Their
contents are below.  Am I missing something?  Note that they are not
consistent with the 'top' line above, since they were copied at a
different time.  The effect is easily reproducible.  It happens every
time I run my music player with using ALSA.

The memory usage summary by top, also doesn't agree:

Mem:    224140k total,   219236k used,     4904k free,     7184k buffers
Swap:   524280k total,      224k used,   524056k free,   125976k cached

Subtracting the cached memory and some heavy processes doesn't leave
room for another 80 MB.

/proc/pid/stat:
10642 (tcvp) S 926 10642 926 34816 10642 0 68 0 2556 0 4 3 0 0 11 0 0 0 1162589 25665536 18902 4294967295 134512640 134523016 3221216832 3221215328 1074519393 0 0 0 2 3222307553 0 0 17 0 0 0

/proc/pid/statm:
6266 18902 685 4 0 6262 0

/proc/pid/status:
Name:	tcvp
State:	S (sleeping)
Tgid:	10642
Pid:	10642
PPid:	926
TracerPid:	0
Uid:	51770	51770	51770	51770
Gid:	100	100	100	100
FDSize:	256
Groups:	100 102 
VmSize:	   25064 kB
VmLck:	       0 kB
VmRSS:	   75608 kB
VmData:	   22308 kB
VmStk:	      16 kB
VmExe:	      12 kB
VmLib:	    2492 kB
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	8000000000000000
SigCgt:	0000000380000002
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000



-- 
Måns Rullgård
mru@users.sf.net

             reply	other threads:[~2003-08-26 12:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-26 12:18 Måns Rullgård [this message]
2003-08-26 12:27 ` Strange memory usage reporting William Lee Irwin III
2003-08-26 12:36   ` Måns Rullgård
2003-08-26 13:03 ` Jaroslav Kysela
2003-08-26 13:59   ` Jaroslav Kysela
2003-08-26 17:03     ` Hugh Dickins
2003-08-27  7:52       ` Ingo Oeser
2003-08-27 13:45         ` Hugh Dickins

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=yw1xad9w1uj5.fsf@users.sourceforge.net \
    --to=mru@users.sourceforge.net \
    --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