Operating System - HP-UX
1826755 Members
3110 Online
109702 Solutions
New Discussion

Re: swap is not used at all

 
Sudhakar_7
Occasional Advisor

swap is not used at all

Hi Guys,

I have a K250 server with HP UX 11.00, in the swap is not getting used at all. what could be the reason.

the swapinfo result is as follows
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
dev 2048 0 2048 0% 0 - 1 /dev/vg00/lvol3
dev 2048 0 2048 0% 0 - 1 /dev/vg00/lvol4
reserve - 78 -78
memory 1507 676 831 45%
total 7651 754 6897 10% - 0 -

in kernel the swchunk is set to 2048 and maxswapchunks is set to 16384 (This should use upto 32GB mem right ?) also swap mem is on.

Any guess?? on what could be the problem.

Regards

Sudhakar J
10 REPLIES 10
Stefan Farrelly
Honored Contributor

Re: swap is not used at all

You dont want the device swap to be used - if it was used your server would be running very slowly. Having device swap usages at 0% is great! All our production servers run like this, it means you have free memory so no swap is needed, which is ideal.

Now, some swap is reserved for programs running in memory (you can see this usage in glance or gpm) - but it wont show in the swapinfo command unless you run out of memory and programs are actually paged out to disk.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Stefan Farrelly
Honored Contributor

Re: swap is not used at all

You dont want the device swap to be used - if it was used your server would be running very slowly. Having device swap usage at 0% is great! All our production servers run like this, it means you have free memory so no swap is needed, which is ideal.

Now, some swap is reserved for programs running in memory (you can see this usage in glance or gpm) - but it wont show in the swapinfo command unless you run out of memory and programs are actually paged out to disk.
Im from Palmerston North, New Zealand, but somehow ended up in London...
James Murtagh
Honored Contributor

Re: swap is not used at all

Hi Sudhakar,

I think you are the first person ever to be concerned the system is not paging! :-)

You will not see an usage of the physical swap space until the free memory in your system hits the "defree" limit. Use vmstat to check the amount of free 4k pages of memory you have. Use the following to check the amount of free 4k pages you would need to exceed before you started paging:

# echo desfree/D|adb -k /stand/vmunix /dev/kmem

The kernel parameters determine how much swap space you can allocate and the paging strategy. The actual swap space you have have allocated is 6GB device swap and you have enabled psuedo swap too so approx 75% of physical memory is used to increase the counter so another 1.5GB - hence I'd imagine the physical memory in the server is 2GB.

Regards,

James.
Balaji N
Honored Contributor

Re: swap is not used at all

hi sudhakar,
as long as there is enough free memory available, swap will not be used. all programs will use the memory (RAM) and once it is exhausted, will start using the swap. this is how the system is defined and there is no fault.

and it is good that the swap usage is minimal because, if swap is used the system gets slowed down a bit paging data between memory and swap and also because accessing the swap takes more time than accessing data from RAM. (correct me if i am wrong.)

hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Sudhakar_7
Occasional Advisor

Re: swap is not used at all

Hi Stefan,

I agree with you but the problem is users say that they are not able to install oracle and i dont have glance and my servers are test/development servers so i can't expect it to swap all time / dont swap at all ... it will like spikes...

so any ideas..


Regards

Sudhakar J
Stefan Farrelly
Honored Contributor

Re: swap is not used at all

You need to find out what the error is when they try to install oracle and it fails. Its not because of swap or free memory.

From experience it could be a kernel parameter - ones that control how big a process is allowed to be in memory (maxdsiz, maxtsiz, maxssiz). Once you have the oracle error contact oracle, or check oracle metalink on the oracle website and its usually pretty good at telling you what the problem is and how to fix it on your HP server.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Balaji N
Honored Contributor

Re: swap is not used at all

hi sudhakar,
could u pls tell what is the exact errors faced while installation. could be with some kernel parameters as well.

regards
balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Bill Hassell
Honored Contributor

Re: swap is not used at all

Actually, you have a very small amount of RAM for Oracle so you can expect problems in the future, especially when your DBA needs 1Gb for SGA.

However, Oracle needs an enormous amount of so you need more swap space--temporarily. Add another 6Gb and see if Oracle installs OK. Once installed, you can reduce the total swap space back to 6Gb like you have now.


Bill Hassell, sysadmin
Sudhakar_7
Occasional Advisor

Re: swap is not used at all

Hi Guys,

Thanks for all your response,
i will let you know the error later.

Right now i have modified the kernel params as in oracle doc.

I have to install then only i will be able come back with some message.


Regards

Sudhakar J
T. M. Louah
Esteemed Contributor

Re: swap is not used at all

Just a quick Note about TOP usage, I favourly run it for memory purpose:
Memory: 50764K (31260K) real, 297144K (212984K) virtual, 8400K free

The last entry "free" is how much free memory one have ? lower values is an indication of memory starvation.
Cheers
T??
Little learning is dangerous!