1830657 Members
29211 Online
110015 Solutions
New Discussion

pseudo swap

 
SOLVED
Go to solution
Lalo_Weng
Advisor

pseudo swap

Hi, All masters,

On my machine, when I issue "swapinfo -ta", I see that there is a line begins with 'memory', and the PCT USED value is greater than 0 while PCT USED for 'dev' is 0%.
I know that systems page out to swap space depends on priority. But from the output of 'swapinfo -ta', I can see the priority of dev is '1' but none for 'memory'. Why this happen? Doesn't system use 'memory' swap space after 'dev' swap space is full?

Thanks a lot
Keep finding is the way.
5 REPLIES 5
Alexander M. Ermes
Honored Contributor

Re: pseudo swap

Hi there.
The memory swap area will be used before the devices, because the disk swap space is a lot slower than the memory. If your system is going to swap on disk, you should do a performance analysis to avoid these bottlenecks.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Santosh Nair_1
Honored Contributor
Solution

Re: pseudo swap

Actually, the memory item in the swapinfo -ta output is what's called pseudoswap. Every time a process starts up in HPUX, an amount of memory in set aside for the process. An equivalent amount of swap area is also set aside. This area is called the reserve. For this reason, you should have as much swap and you have of physical memory.

If you have psuedoswap enabled, this tricks the OS into thinking that 3/4 of memory is available for reserve area. This memory really doesn't exist nor is memory really being used for swap. With psuedoswap on, you no longer (strictly) have to have as much swap as you have memory since pseudoswap will give you 3/4 memory for reserve (memory is not really taken for reserve, but the OS's requirements are met).

Hope this makes sense.

-Santosh
Life is what's happening while you're busy making other plans
Santosh Nair_1
Honored Contributor

Re: pseudo swap

Here is a whitepaper on HPUX memory management (a good read). Hope this helps.

http://docs.hp.com/hpux/onlinedocs/os/memwn1_4.pdf

-Santosh
Life is what's happening while you're busy making other plans
Roger Baptiste
Honored Contributor

Re: pseudo swap

<>

That is the pseudo-swap. You have
pseudo-swap enabled on your system, which
allows part of memory to be used for swap.
(kernel parameter swapmem_on is the
setting for this).

<>

Yes, that is correct, because pseudo-swap
is used first before the device swap is
used, since it is much faster to reserve
space within memory. But, on heavily used
systems you will see even device swap being
used.

<>

The priority factor is for device & filesystem swap. Pseudo-swap comes much
before that, since it is actually memory
doubling up as swap.

<>

It is the reverse. If you disable
pseudo_swap then the device swap will be
used first.

-raj
Take it easy.
Anthony deRito
Respected Contributor

Re: pseudo swap

Santosh is correct... pseudoswap is not a substitute for device swap. It is an enhancement to swap. pseudoswap is extremely useful on systems with large memory so that you don't need to match or double the amount of
actual/physical swap that has been recommended. In other words, it allows us to take advantage of systems with large amounts physical ram without configuring large swap areas.

When the system boots, the amount of pseudo swap is calculated. This calculation is 75% of physical memory and this value is a non-tunable kernel parameter. But this does not mean that memory is taken by pseudoswap. On the contrary, pseudoswap doesn't exist. When processes are swapped, they always swap to physical swap.

Tony