Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

swap space problem

leyearn
Regular Advisor

swap space problem

system physical memory was 2G
swap space is 3G
now we added the memory to 5G
but now when I execute #vmstat
and in /var/adm/syslog.dated/*/kern.log

Jan 20 13:42:56 yj8201 vmunix: swap space below 10 percent free
Jan 20 13:43:37 yj8201 last message repeated 3 times
Jan 20 13:45:39 yj8201 last message repeated 9 times
Jan 20 13:55:29 yj8201 last message repeated 36 times

but when i execute #swapon -s

yj8201#swapon -s
swap space below 10 percent free
Swap partition /dev/rz8b (default swap):
Allocated space: 262144 pages (2048MB)
In-use space: 1 pages ( 0%)
Free space: 262143 pages ( 99%)

Swap partition /dev/rz10b:
Allocated space: 125000 pages (976MB)
In-use space: 1 pages ( 0%)
Free space: 124999 pages ( 99%)


Total swap allocation:
Allocated space: 387144 pages (3024MB)
Reserved space: 365180 pages ( 94%)
In-use space: 2 pages ( 0%)
Available space: 21964 pages ( 5%)

7 REPLIES
Ralf Puchner
Honored Contributor

Re: swap space problem

if adding memory, adjust swapspace. Have a look into the manual how memory is calculated and used, change memory allocation algorithm!

Formular: swapspace = 2.5 times physical memory

Have a look to the "reserved memory" information!
Help() { FirstReadManual(urgently); Go_to_it;; }
Venkatesh BL
Honored Contributor

Re: swap space problem

The total swap space allocated appear to be 3 GB. You've mentioned that you have a total of 5 GB as swap. What happened to the remaining 2 GB?
Johan Brusche
Honored Contributor

Re: swap space problem


Seems you have eager(=immediate mode) swapping enabled.
(See "ls -l /sbin/swapdefault" ) and maybe
you (or the DBA)told Oracle instances to use a larger SGA.(why else would you have added memory to the system ;-)

With the additional 2GB, you probably can go for using "deferred" swap-mode. To do this, rename the /sbin/swapdefault link to something like /sbin/swapdefault.off , and reboot.

Read the swapon manpage for additional info.

__ Johan.

_JB_
Victor Semaska_3
Esteemed Contributor

Re: swap space problem

A warning about using deferred mode. This from section 3.6.3 of the System Administration Guide:

The operating system terminates a process if it attempts to write a modified virtual page to swap space that is depleted.

In other words, if you use deferred mode and the swap space isn't large enough, the OS will start deleting processes.

Vic
There are 10 kinds of people, one that understands binary and one that doesn't.
Han Pilmeyer
Esteemed Contributor

Re: swap space problem

I wouldn't worry too much about that statement in 3.6.3 in the documentation. When your total vitual address exceeds is too large for your swap space (and memory in case of lazy swap) processes will start to die anyway. It's just a matter of which process dies first.

For the case in this topic, process start to fail when total virtual memory in the system exceeds the total swap space (somewhere around 3 GB). If deferred (lazy) swap was enabled, processes would start to die when total virtual memory exceeds total swap + total memory (3 GB + 5 GB = 8 GB).

If use of internal memory was over committed by 3 GB on the swap space, then the system would probably be so slow that you would welcome processes being stopped.
Victor Semaska_3
Esteemed Contributor

Re: swap space problem

Just letting him/her know the possibility exists. We've had it happen. Some utility went 'nuts' and used vast amounts of virtual memory. Ran out of swap space and that's when system processes started to disappear. Had to reboot the server to get it back to normal. Fortunately it wasn't a production server running mission critical apps.

Vic
There are 10 kinds of people, one that understands binary and one that doesn't.
Ralf Puchner
Honored Contributor

Re: swap space problem

the documentation contains all the suggested improvements and explanations...
Help() { FirstReadManual(urgently); Go_to_it;; }