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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| 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? |
| ||||
| 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. -- |