1832865 Members
2835 Online
110048 Solutions
New Discussion

swapmem_on question

 
SOLVED
Go to solution
Scott_14
Regular Advisor

swapmem_on question

Hello my good Unix Friends:

I know there are alot of posting on this, and I have been going through them the past several days, and I seem to be unsure now, cause I heare pros and cons on setting it.

I have an L2000 system, 2gig mem, 2 gig device swap, swapmem_on is OFF. This system is heavy oracle.

Now, I have been doing swapinfo -tm on and off for the past month and it seems that my PCT USED is always runnng 95 to 98, and device is always 0.
Yesteday I seen it go to 100 and still device 0.

At somepoint we started having some problems, and the oracle person tells me to increase maxusers from 200 to 250, cause its thought of nproc and nfile are to low, however in glance they are only at 17%.

From what I have read, is if using oracle on a server, it seems others have swapmem_on, to enable pseduo swaping, and I cam across one posting where it mentions if you have the device swap, the same size as your physical memory, it will never get used.

wew, with that said, I am thinking I need to enable swapmem_on from what I have read..

Can someone offer me some advice?

Thanks

15 REPLIES 15
Stefan Farrelly
Honored Contributor

Re: swapmem_on question


Yes, if device swap = physical RAM you dont need swapmem_on turned ON.

But, having said that, it still provides useful info in showing how much of your used RAM is locked (by shared mem/dataabses etc.) and it is useful as a safety net - which is all it is, so we leave it switched on on all our servers - its doesnt hurt at all to leave it on.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Hai Nguyen_1
Honored Contributor

Re: swapmem_on question

I leave swapmem_on ON on all the boxes. Can you post your "swapinfo -tam"?

Hai
Sajid_1
Honored Contributor

Re: swapmem_on question

hi,

I would not say that disabling pseudo-swap is a good practise. I strongly suggest you to trun it ON and thus give the system more flexibility. Even if you have enough device swap and memory, turning ON this property may help you at any time, there is a need for pseudo-swap, but turining it OFF doesn't give you anything.

HTH
learn unix ..
Scott_14
Regular Advisor

Re: swapmem_on question

ok here is the info:

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2048 0 2048 0% 0 - 1 /dev/vg00/lvol2
reserve - 1748 -1748
total 2048 1748 300 85% - 0 -


it is now 85, usually it will be 95%.

thanks

Sajid_1
Honored Contributor
A. Clay Stephenson
Acclaimed Contributor

Re: swapmem_on question

Here in a nutshell, is the deal. If you have at least as much device swap as your do RAM then there is no need at all to enable pseudoswap; it that case it simply adds a bit of kernel overhead for no benefit. Pseudoswap is intended for those systems which have more memory than swap space. It is perfectly normal these days to have boxes with 32GB of RAM and only 512MB-1GB of primary swap. Unless swapmem_on=1, the box could not take advantage of the memory because virtual address space would be limited. Pseudoswap is simply a method of telling the system that virtual memory is not limited to the amount of swap space.

The important point to remember is that there is no swapping in memory; pseudoswap doesn't exist. The name pseudoswap has been confusing since it was first introduced.


If it ain't broke, I can fix that.
Scott_14
Regular Advisor

Re: swapmem_on question

Thanks for the info, I have one other quick question, why is it, that device pct is always 0, even if my swapinfo -tm showed a 100.

Sajid_1
Honored Contributor

Re: swapmem_on question

hi again,

you will be able to find out the answer for the last question, if you have GlancePlus installed:
# gpm
Check the swap usage and check the process/memory usage. I would also check the system patch level and will update it if necessary.

hth
learn unix ..
Scott_14
Regular Advisor

Re: swapmem_on question

it is 0 in glance,
the reserved is 1.7 gig.


I am going to turn it on, from the info you sent that read, which migth i add, is a good doc, I am going to have it on, and keep an eye on it. Cause of the mention of proccess not being able to fork, I think this is a close response to the error in the listener log.


thanks

Hai Nguyen_1
Honored Contributor

Re: swapmem_on question

Scott,
....
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2048 0 2048 0% 0 - 1 /dev/vg00/lvol2
reserve - 1748 -1748
total 2048 1748 300 85% - 0 -
....
Based on this output, your swap device has 300Mb left to accomodate new processes or existing ones which needs more swap space. The total line confirmed what I analyzed above. 85% of swap space is utilized in this case. Next time, you should watch the total line.

Hope this helps.

Hai

Hai Nguyen_1
Honored Contributor

Re: swapmem_on question

Scott,

If the system is unable to fork a new process, it is primarily due to the swap space shortage. If you are able to run "swapinfo -tam" at that time, the PCT USED in the total line should show (nearly) 100%.

Hai
Scott_14
Regular Advisor

Re: swapmem_on question

Thanks for all the information.. I had to boot the server for other reasons from our customer, but I took the opptunity to change it to on, and here is my new swapinfo -tm after the fact.

TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2048 0 2048 0% 0 - 1 /dev/vg00/lvol2
reserve - 1775 -1775
total 2048 1775 273 87% - 0 -
Scott_14
Regular Advisor

Re: swapmem_on question

ooops wrong system, ignore that,

here is the swapinfo after the swapmem_on is turned back on.

TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2048 0 2048 0% 0 - 1 /dev/vg00/lvol2
reserve - 896 -896
memory 1615 22 1593 1%
total 3663 918 2745 25% - 0 -
Sajid_1
Honored Contributor

Re: swapmem_on question

hi,

nice improvements! Did you check the dbc_max_pct parameter ?

gl,
learn unix ..
Scott_14
Regular Advisor

Re: swapmem_on question

Hi Sajid:

I did check it, its set at 2 and so is the min pct.

I did not think to change it when I changed the swapmem_on, for some reason.

Thanks you for the help and inputs, as well as the others.