Unix Technical Forum

process SIZE vs RSS?

This is a discussion on process SIZE vs RSS? within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> I was just perusing the output of top on a 3.5 system and saw entries like PID USERNAME PRI ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 06:08 AM
Christopher A. Kantarjiev
 
Posts: n/a
Default process SIZE vs RSS?

I was just perusing the output of top on a 3.5 system and saw entries like

PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND
21964 len 18 0 7740K 14M sleep pause 102:49 0.93% java

which made me wonder: how can the resident set size be twice the total size
(text+data+stack, according to top's sources)?

Inquiring minds want to know.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 06:08 AM
God Rudy
 
Posts: n/a
Default Re: process SIZE vs RSS?

Christopher A. Kantarjiev wrote:
> I was just perusing the output of top on a 3.5 system and saw entries like
>
> PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND
> 21964 len 18 0 7740K 14M sleep pause 102:49 0.93% java
>
> which made me wonder: how can the resident set size be twice the total size
> (text+data+stack, according to top's sources)?
>
> Inquiring minds want to know.


I don't know why it is that way but it looks the same on my box
******
PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND
31240 root 2 0 304K 984K idle select 0:00 0.00% sshd
16813 rudy 28 0 172K 856K run - 0:00 0.00% top
25103 rudy 2 0 352K 1228K sleep select 0:00 0.00% sshd
18700 root 2 0 388K 1436K idle netio 0:00 0.00% sshd
26595 root 2 0 240K 560K sleep select 0:00 0.00% cron
*******
That is only part of "top" but most programs have bigger values in
"RES" than in "SIZE"

Let's have a look into the man page for top:
*******
.... SIZE is the total size of the process (text, data, and
stack), RES is the current amount of resident memory (both SIZE and
RES are given in kilobytes), ....
*******
Hmmmmmm ...
Looking into "ps"
"ps -auxw" has a field "VSZ" or "virtual size in Kbytes (alias vsize)"
this field has the same numbers as the "RES" field in "top"!

Seems to me that there are different names for the same "thing" :-)

Rudy

PS.
Had a quick look into "top" on Linux/GNU
The SIZE field has the same description
there is a "RSS" field in place of the "RES" field
from the man page:
*******
The total amount of physical memory used by the task, in kilobytes,
is shown here. For ELF processes used library pages are counted
here, for a.out processes not.
*******
Could it be that OpenBSD has a simmilar behavior?

HMMMMMMMmmmmm.....
OpenBSD 3.3 has most values in "RES" smaller than "SIZE"
OpenBSD 3.3 is "a.out" OpenBSD 3.5 is "ELF"
Maybe the "RES" field in OpenBSD 3.5 includes loaded libraries?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-16-2008, 06:09 AM
Ted Unangst
 
Posts: n/a
Default Re: process SIZE vs RSS?

On Tue, 19 Oct 2004, Christopher A. Kantarjiev wrote:

> I was just perusing the output of top on a 3.5 system and saw entries like
>
> PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND
> 21964 len 18 0 7740K 14M sleep pause 102:49 0.93% java
>
> which made me wonder: how can the resident set size be twice the total size
> (text+data+stack, according to top's sources)?


res also includes mmap and whatnot. over time the precise meaning of many
of these numbers has gotten a bit blurry.

--

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:08 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com