1748180 Members
4050 Online
108759 Solutions
New Discussion юеВ

Re: swapmem_on

 
SOLVED
Go to solution
himacs
Super Advisor

swapmem_on

Hi Admin,

My swapinfo shows below output.

TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 808 7384 10% 0 - 1 /dev/vg00/lvol2
dev 6144 814 5330 13% 0 - 1 /dev/vg00/lvswap
dev 2048 696 1352 34% 0 - 1 /dev/vg00/lvol13
reserve - 8756 -8756
total 16384 11074 5310 68% - 0 -

Please note that memory field details is not present.I heard we need to enable swapmem_on parameter for the same.

What are the advantages by enabling swapmem_on?

regards
himacs

15 REPLIES 15
R.K. #
Honored Contributor

Re: swapmem_on

Hi Himacs,

In swapinfo -tam:
memory line:
+ indicative of how much of pseudo-swap has been reserved
+ when present, indicates pseudo-swap is enabled (i.e. swapmem_on kernel paraemter is set to 1, which is the default. The size of pseudoswap is calculated to be 75% of the size of RAM (a.k.a. memory.) In other words, it does not refer to acual physical memory use!!!! Pseudo-swap was designed specifically for large memory systems for which actual swapping is never (or rarely) expected to occur, so there├в s less need to use actual physical disk space for swap.

For more information, see swapmem_on(5) , which reads:
In previous versions of HP-UX, system configuration required sufficient physical swap space for the maximum possible number of processes on the system. This is because HP-UX reserves swap space for a process when it is created, to ensure that a running process never needs to be killed due to insufficient swap. This was difficult, however, for systems needing gigabytes of swap space with gigabytes of physical memory, and those with workloads where the entire load would always be in core. This tunable was created to allow system swap space to be less than core memory. To accomplish this, a portion of physical memory is set aside as 'pseudo-swap' space. While actual swap space is still available, processes still reserve all the swap they will need at fork or execute time from the physical device or file system swap. Once this swap is completely used, new processes do not reserve swap, and each page which would have been swapped to the physical device or file system is instead locked in memory and counted as part of the pseudo-swap space.
Don't fix what ain't broke
Dennis Handly
Acclaimed Contributor

Re: swapmem_on

>What are the advantages by enabling swapmem_on?

On 11.31, this tunable was removed because it is always a good thing. What OS version to you have?
Kapil Jha
Honored Contributor

Re: swapmem_on

In simple terms it enables you to start more programs with less swap memory.

eg. If you have 4 GB of swap you would be able to start 4GB of programs (as you have to reserve space in swap to start a program), but ur swap is never fully used so it kindda waste of space.

With swapmem_on you would be able to start 4G of program with only 1G of swap(approx 75% of 4G)
reason being system rarely swap the whole program at a time.

BR,
Kapil+

I am in this small bowl, I wane see the real world......
Raj D.
Honored Contributor
Solution

Re: swapmem_on

himacs,

pseudo swap: System memory used for swap space that allows users to execute processes in memory without allocating
physical swap. Pseudo-swap is controlled by the operating system parameter swapmem_on which by default set to 1. that means enabled.


What is the os version you have: ,

For 11.31 the tunable swapmem_on has been obsoleted. Pseudo-swap will always be enabled, as was the default for previous releases of HP-UX.


For details Check out: [ Pseudo-Swap Space ]
http://docs.hp.com/en/1218/mem_mgt.html



Hth,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
himacs
Super Advisor

Re: swapmem_on

Hi Admins,

Thanx for the responses.

My server version is 11.23

my server memory usage is high most of the time.So by enabling swapon_mem i can reduce the high usage..


Regards
himacs
Dennis Handly
Acclaimed Contributor

Re: swapmem_on

>my server memory usage is high most of the time. So by enabling swapon_mem I can reduce the high usage?

I doubt it will make a difference.
Are you running into out of swap space error? Your swapinfo total was only 68%.
Is your buffer cache parms configured too high?
himacs
Super Advisor

Re: swapmem_on

Hi Denis,

Most of the time my total memory usage is above 85% and recently we have upgraded the memory.
and whats buffer cache parms..

If Enbaling swapon_mem does not resolve issue,what are the possibilities we can consider?

regards
himacs
Raj D.
Honored Contributor

Re: swapmem_on

himacs,

>>my server memory usage is high most of the time.So by enabling swapon_mem i can reduce the high usage..

Is it swap or physical memory you are refering as high. ?

- What is the current value of swapmem_on :
# kctune | grep -i swapmem

- swapmem_on when enabled it use physical memory to serve processes insted of allocating from swap memory. As mentioned earlier. If you are running out of physical memory , you have to add physical memory.
- Also swap space usage looks quite high.
- What is the ratio of physical memory vs swap memory configured in your system.
- You may add more device swap and see if the swap usage comes down. Then performance will improve little bit.

- Check paging activity with :
# vmstat -3 -5
( look at the pi/po value , a non zero value represents paging activity that is not good, do you see heavy paging..)


Hth,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: swapmem_on

himacs,

>memory usage is above 85% and recently we have upgraded the memory.

- Have you added the extra swap space accordingly after adding the memory. Swap can be 150 or 200% of physical memory.


Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "