Solaris: resident size of the process

Solaris: resident size of the process

Post by Alexander Ryzho » Sun, 24 Feb 2002 00:53:12



Hi !

I have a question about resident size of the process in Solaris.
There are two ways to get this value:

1. ps -o "pid rss"
   (will display it in the second column)

2. /usr/proc/bin/pmap -x $pid
   (will display it in the last line, second value)

problem:  this values noticeably differs.
question: What does it meen ??

 
 
 

Solaris: resident size of the process

Post by Marvi » Fri, 01 Mar 2002 14:19:20



Quote:> Hi !

> I have a question about resident size of the process in Solaris.
> There are two ways to get this value:

> 1. ps -o "pid rss"
>    (will display it in the second column)

> 2. /usr/proc/bin/pmap -x $pid
>    (will display it in the last line, second value)

> problem:  this values noticeably differs.
> question: What does it meen ??

In pmap, it is counted also from a shared segments, that is the part of
the memory, which is also reused by other pid's.

I think :)

 
 
 

Solaris: resident size of the process

Post by Yong Hua » Mon, 04 Mar 2002 11:43:59


That doesn't explain my simple test on Solaris 2.6 sun4u: "sleep 1000
&" has 704 kbytes rss from ps -o rss, but 824 kbytes of Resident and
744 Shared from pmap -x. 824-744=80 kbytes, way off from 704 kbytes.

If you look at the source code (free download), ps(1) uses
/proc/[pid]/psinfo while pmap(1) uses /proc/[pid]/xmap. I think
/proc/[pid]/psinfo is known to be a good source (/usr/ucb/ps uses this
structure too; David Curry's Systems Programming book also uses it if
I remember right). As to /proc/[pid]/xmap, I've found other problems.
For instance, when the process has a shared memory segment such as an
Oracle process, there could be a non-zero number under Private for the
shmid=?? segment in pmap -x output (Permissions shows shared
correctly). The Private number is either 0 or much smaller if intimate
shared memory is not used.

Yong Huang


> In pmap, it is counted also from a shared segments, that is the part of
> the memory, which is also reused by other pid's.

> I think :)

 
 
 

1. xterm: huge process size and resident set size

Solaris 9 FCS with Recommended patches through approx. October 2002;
CDE.

What causes an xterm to hang for on the order of a minute when I
resize it? The system is banging noisily on the disk the whole time. I
have approx. 720 MB of free swap out of a GB, 320 MB RAM, and / is
less than 50% full. This is an Ultra 10/ 300 MHz, but I have seen
similar behavior on many other systems and at other installations, so
I'm convinced that it's either an xterm or a Solaris issue.

The scroll-back log is not even that large (although I always start my
xterms with "-sl 10000" (ten thousand lines max scrollback).

I see that the xterm process size is 145M and RSS is 134M, so that
seems to be the immediate cause of the performance issue. The question
then becomes, what could cause those numbers to be so large?, because
most of my other xterms have sizes around 20MB and RSSs of around 3MB.

Thanks for any suggestions.

--Bruce

2. RH 61 startx hangs on gnome-session only as root

3. Process resident & total size

4. Sun -- Students @ a new University

5. how to limit resident size of process

6. NE2000 problems for configuration

7. Resident set size on Solaris

8. Tinman digest, volume 2451736

9. Data Set Resident Size

10. resident set size vs. real memory

11. What is Resident Set Size (RSS)?

12. ssh-agent's resident set size increase 8K after each authentication

13. limit resident memory size