1753488 Members
4120 Online
108794 Solutions
New Discussion юеВ

Swap problem

 
Emiliano_1
Occasional Advisor

Swap problem

Hi
The server have 80Gb physical RAM.
SWAP configuration:
/dev/vg00/lvol2 device 16.0gb 0mb 1
pseudo-swap memory 61.7gb 60.7gb na

The output of swapinfo -tma:
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16384 0 16384 0% 0 - 1 /dev/vg00/lvol2
reserve - 16384 -16384
memory 63180 62278 902 99%
total 79564 78662 902 99% - 0 -
On the server there is 32.7 Gb physical RAM free!! Why the system use all pseudo-swap???

Rgds
Emiliano


3 REPLIES 3
Gary L. Paveza, Jr.
Trusted Contributor

Re: Swap problem

If I'm not mistaken, you should have at least as much swap as you have physical memory. It looks like you have pseudo swap enabled. What I believe is happening is that when processes are started, they are doing their usual reserve of swap. Because you have less than you have of memory, you are "reserving" all of physical swap (see the line "reserve 16384 - 16384) and beginning to reserve pseudo swap - which is real memory. So, in real memory, you have the process, and it's reserved swap space - eventually you're going to run out of real memory - long before you actually use it all.
RAC_1
Honored Contributor

Re: Swap problem

Every process that starts, will reserve some swap space, so that if it is to be swapped, it has space available.

All of your swap space is reserved. The systems with high RAM, can take advantage of setting up pseudo_swap=1. What this does is it inflates the swap space space available to swap space + 75 % of RAM. This is for kernel calculations, so that more processes can be started.

What are U runinng on this system? In your case, you can some more swap space(secondary swap space and preferably on different disk than that os primary swap and set same priority as that of primary swap. you will have to put the entries in /etc/fstab and will also have to tune kernel. maxswapchunks paramter)

Hope this helps.

Anil
There is no substitute to HARDWORK
Emiliano_1
Occasional Advisor

Re: Swap problem

Hi RAC

I add a new swap device 10Gb, the only disk space available!!!
The kernel parameter set:
pesudo_swap=1
maxspapchunks=16384

Now the output of swapinfo -tma :

TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME

dev 16384 0 16384 0% 0 - 1 /dev/vg00/lvol2
dev 10000 0 10000 0% 0 - 1 /dev/vg01/lvol_swap2
reserve - 26384 -26384
memory 63180 54131 9049 86%
total 89564 80515 9049 90% - 0 -

there are other action to do???

Thanks Emiliano