Operating System - HP-UX
1819691 Members
3220 Online
109605 Solutions
New Discussion юеВ

Resident vs Virtual Memory

 
SOLVED
Go to solution
support_5
Super Advisor

Resident vs Virtual Memory

Hi all,

I am looking at Glance and notice that there are some processes with enormous amounts of "Virtual Memory", while at the same time having very low "Resident Memory".

Eg:
Process Name Res Mem Virt Mem
ora_pmon_txcxadb 8.7MB 795.8MB

What's up with that? That doesn't sound right??

Or this one:
Process Name Res Mem Virt Mem
java 42.9MB 712.6MB

That doesn't seem right to me.

Can someone please give suggestions as to why the huge discrepancy from what one might typically expect?

Can folk please shed some light on how resident and virtual memory impact physical and swap memory. (we do not have pseudo swap turned on, but do have 30GB of swap memory for a system with 14GB physical memory)

Thank you

- Andrew Gray
8 REPLIES 8
Arunvijai_4
Honored Contributor

Re: Resident vs Virtual Memory

A good thread to read,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=463908

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Arunvijai_4
Honored Contributor

Re: Resident vs Virtual Memory

Resident Memory

This column reflects the amount of physical memory currently allocated to each process. This is also known as the "resident set size" or RSS. A process can have a large amount of virtual memory allocated (as indicated by the SIZE column) but still be using very little physical memory.
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor
Solution

Re: Resident vs Virtual Memory

A good explanation:

VIRT -- Virtual Image (kb)
The total amount of virtual memory used by the task. It includes
all code, data and shared libraries plus pages that have been
swapped out.

VIRT = SWAP + RES.

SWAP -- Swapped size (kb)
The swapped out portion of a task's total virtual memory image.

RES -- Resident size (kb)
The non-swapped physical memory a task has used.

RES = CODE + DATA.

CODE -- Code size (kb)
The amount of physical memory devoted to executable code, also
known as the 'text resident set' size or TRS.

DATA -- Data+Stack size (kb)
The amount of physical memory devoted to other than executable
code, also known as the 'data resident set' size or DRS.

SHR -- Shared Mem size (kb)
The amount of shared memory used by a task. It simply reflects
memory that could be potentially shared with other processes.

hth.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: Resident vs Virtual Memory

Memory management document:

http://docs.hp.com/en/1218/mem_mgt.html

hth.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: Resident vs Virtual Memory

A good link to give information more on resident and virtual.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=712845

You can resident and virual information for a process with top utility using RES and SIZE fields.

hth.
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: Resident vs Virtual Memory

http://docs.hp.com/en/5965-4641/ch01s02.html

[OVERVIEW OF PHYSICAL AND VIRTUAL MEMORY]
A good document to get an overview of memory.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Steve Steel
Honored Contributor

Re: Resident vs Virtual Memory

Hi


2 good urls

http://www.hp.com/products1/unix/java/infolibrary/tools/

ftp://eh:spear9@hprc.external.hp.com/memory.htm

It is explained there with options

The first one is mainly based on java performance analysis ut still valid



Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
morganelan
Trusted Contributor

Re: Resident vs Virtual Memory

The RSS (resident set size) shown by ps is not a valid indication of PGA size. It includes the SGA (db_block_buffers & shared_pool_size) and is sensitive to memory pressure on the system as well as to PGA size.
Kamal Mirdad