Operating System - HP-UX
1833776 Members
2229 Online
110063 Solutions
New Discussion

Re: Set Size vs Resident Size

 
Patrick Collins
Occasional Advisor

Set Size vs Resident Size

A running java process appears in TOP/YAMM with the following values
size = 18492K
res = 117M
Why/how can the resident set size be significantly larger than the actual process size?
I have miles to go before I sleep
4 REPLIES 4
Dietmar Konermann
Honored Contributor

Re: Set Size vs Resident Size

Hi!

Interesting symptom. :) Just had a look at some systems here and I see lots of processes with RES > SIZE... so it seems not to be exotic.

top gets the metrics using the pstat() interface...

SIZE: test+data+stack
pp->pst_vtsize + pp->pst_vdsize + pp->pst_vssize

RES: provate resident pages
pp->pst_rssize

So if RES gets so huge there must be something private and resident which is not text/data/stack. Maybe file mmap()ed MAP_PRIVATE?

Regards...
Dietmar.

"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Thomas Heinlein
Occasional Contributor

Re: Set Size vs Resident Size

I know this problem too.

I 've read Dietmars message - but according the man pages SIZE is the total of the process' virtual address space. It includes already the mmap stuff (not only text/data/stack !)

The RES value is more or less guess work.
My experience is that in cases where
RES > SIZE both the RES and the SIZE are unreliable.

Guess this has something to do with swapping activity while top is computing its values per process (pseudo-swap is activated per default - see kernel parameter swapmem_on. The system prefers to use memory as a swap device instead of keeping currently inactive processes in memory)

Best Regards
Thomas
T G Manikandan
Honored Contributor

Re: Set Size vs Resident Size

if you are running 11.0 this patch should fix it

http://www1.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|&patchid=PHCO_26020&context=hpux:800:11:00
T G Manikandan
Honored Contributor

Re: Set Size vs Resident Size

patch for 11.11

http://www1.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|&patchid=PHCO_25204&context=hpux:800:11:11.......