1748265 Members
3898 Online
108760 Solutions
New Discussion юеВ

Swap problem

 
SOLVED
Go to solution
gigiz
Valued Contributor

Swap problem

I have a system with a 12 Gb of physical swap,
and 41 Gb of RAM.
Kernel parameter :
dbc_min_pct 5
dbc_max_pct 8
swapmem_on 1.
I have a swap problem .
From Glance i have a message :
Global Swap space is nearly full.
On the system there are 805 oracle process that to alloc 30 Mb of "Res Mem" and 35Mb of "Virtual Memory" in RAM .
My physical swap is empty:
root@unit_db2:/# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 0 4194304 0% 0 - 1 /dev/vg00/lvol2
dev 8388608 0 8388608 0% 0 - 1 /dev/vg00/lv_swap
reserve - 12582912 -12582912
memory 41892896 41033104 859792 98%

Why it do not use a physical memory?
Why oracle use and reserv all this memory for any process? is it correct?
What can i do to resolve a problem?
many point at all

6 REPLIES 6
Analyst
Trusted Contributor

Re: Swap problem

Hi qiqiz,

The Pseudo wsap is enabled right,
how about the swap priority set in /etc/fstab.
check for that, if not assigned .then change it to 1 0 0.

use swapinfo -tam.
to check the completed details.

TTr
Honored Contributor

Re: Swap problem

You simply need to add more swap space.
A server with 41GB memory could need anywhere from 40 - 80GB of disk swap.

I know you said "My physical swap is empty" and it is true but all address space (memory + disk swap) is almost used up (running and reserved) by the processes and no new processes will be able to start if swap space is full.

Processes when they start up reserve memory because that's how much they need to run. They don't always use it all.
Venkatesh BL
Honored Contributor

Re: Swap problem

Swap space is the place holder for parts of RAM that need to be temporarily moved out, in order to accomodate more active processes.

> Why it do not use a physical memory?

What makes you say that?


> Why oracle use and reserv all this memory for any process? is it correct?

The RAM and swap is there for the processes to use. If oracle is the major process on the system, it would naturally use most of the memory and swap.

> What can i do to resolve a problem?

Add more swap space, preferably disk swap.

Wim Rombauts
Honored Contributor
Solution

Re: Swap problem

You indeed need additional device swap. Your device swap is not effectively used (USED column is 0%), but every proces reserves space in the swap area in case in needs to be swapped out.
And so you have 12GB (= your total device swap) reserved. So there is nothing left and thus the system starts using memory swap as a last resort to get some swap reservations, and also that area is almost used.

So add or extend your swap. End extend it with at least 20 to 40 GB to see sufficient effects.

One other thing to bare in mind : Whenever your system would crash, you may want to (let HP) investigate why. Todo that, they need the crashdump. Togive them that, the system may need to squeeze 40GB of memory (probably a lot less) into a 4GB dump area (primary swap).
Run crashconf -v to verify if your system can do with a 4GB dump area, or if t needs more.
Ganesan R
Honored Contributor

Re: Swap problem

Hi,

It depends on the process requirement. Whenever a process starts it will reserve swap needed if at all it is swapped out.
I agree that it is expensive to have 1.5times of memory as swap. That is why we are enabling pseudo swap.

From your data you have 12GB of phsical swap and approximately 12GB of swap space is reserved for running process. It just reserved and not being used. You still have some space to reserve from pseduo swap. At this moment you are safe. If you are going to start new process then it may look for free swap to reserve that process and fails if it don't find.

If you could have provided swapinfo -mat it will be much useful.
Just look at the total column how much free swap can be reserved.
Best wishes,

Ganesh.
gigiz
Valued Contributor

Re: Swap problem

OK