1752785 Members
6002 Online
108789 Solutions
New Discussion

Re: swapinfo memory line

 
SOLVED
Go to solution
Don Morris_1
Honored Contributor
Solution

Re: swapinfo memory line

Got it -- brain slipped a minor gear.

The algorithm I mentioned (90% of available) is correct and is used to configure *User* memory swap maximums.

The System-wide memory swap maximum, however, is all the memory which is reserveable at all. (Since the kernel is allowed to lock everything it can, etc.). Hence the total line reflects the *System* Memory Reservation class and is tied solely to the amount of physical memory which is present and given to the reservation management layer. pstat reports the system state, not the maximum available to the calling process [which, mind you could be different if products like WLM are in play].

Which in practice on v3 means all RAM that isn't PFDATs. PFDATs are about 5% -- hence the 95% seen here. The available line for the system will be lower and reflects the early boot usage (and then becomes lower still as User and Kernel start normal operation and reservation).
gnaid
Occasional Contributor

Re: swapinfo memory line

hi Don,
I'm still not 100% sure,but it seems you are right ;)
All RAM that isn't PFDATs works now as pseudo-swap...

/I suppose swapinfo uses the same pst_vminfo struct, .psv_swapmem_max ,etc. /


And only 4 info:
About reported pseudo-swap usage even when no physical swap has been allocated.
---------
HP-UX 11i Internals,ISBN : 0-13-032861-8 , 2004!, Chapter 7(Pseudo swap,Interpreting the Output of swapinfo):
"When a process starts, its swap space requirements are calculated and reserved. As long as there is device or file system swap space available to cover this reservation, all is fine. Once we exceed the physical swap limit, we begin to allocate from the pseudo-swap area.

...
If you run the swapinfo command and have pseudo-swap enabled, you will see a line that reports the amount of memory swap available and the amount currently in use. Don't be surprised if pseudo-swap usage is reported even when no physical swap has been allocated. Since pseudo-swap is letting us cheat the limit, the system must be able to adjust this cheat as the kernel takes dynamic pages out of circulation, effectively reducing the available memory count. Therefore, the system reports these kernel-allocated pages as allocated pseudo-swap pages. This effectively reduces the swap reservation limit available and keeps the system from overcommitting its memory resource."