Operating System - HP-UX
1825774 Members
2029 Online
109687 Solutions
New Discussion

Re: Memory Usage Q: When does a Process Use Memory Swap? Device Swap?

 
SOLVED
Go to solution
Alzhy
Honored Contributor

Memory Usage Q: When does a Process Use Memory Swap? Device Swap?

Or are they the same? If I have an SHM Segment that is close to RealMEM, why do I still see a memory swap?

Just trying to understand how the HP-UX Virtual Memory Management works and differs from the other dialects and Linux/Win32.

Also, would anyone have an explanation (layman?) that I can pass on to users asking what is happening with memory?

Links.. whitepapers.. any relevant info.. please.

Thanks.
Hakuna Matata.
3 REPLIES 3
RAC_1
Honored Contributor

Re: Memory Usage Q: When does a Process Use Memory Swap? Device Swap?

A process will reserve the swap space when started. Ic case it is to be swapped, it will have space available.

Check documents in /usr/share/doc. It has a good document on memory management.
There is no substitute to HARDWORK
Steve Steel
Honored Contributor
Solution

Re: Memory Usage Q: When does a Process Use Memory Swap? Device Swap?

Hi

I was given this url once

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

It helped me a lot.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Sridhar Bhaskarla
Honored Contributor

Re: Memory Usage Q: When does a Process Use Memory Swap? Device Swap?

Hi Nelson,

When a process is started, system will make sure there is enough space available in swap and reserves it in case it has to page it out later. So if you configure the swap space less than the physical memory, system will not be able to bring up more process than the swap space available.

For systems with large memories, you can enable swapmem_on parameter so that at the boot time, kernel will allot 75% of physical memory as swap. This is only for calculation purposes and the system will think that it has a swap space equal to device_swap+75%_of_physical_memory at the time of bootup. This will make it to bring up more processes. %used in memory row of swapinfo -t means it is no longer available for reservation and it means the device swap figures are used to accommodate the reservation. It happens when the kernel used the memory for dynamic allocation or those pages are being locked. This does not mean it is holding the pages that got paged out.

Only device|filesystem swap is used to hold the pages.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try