Confused about Swap Usage

From: Romeo Theriault (romeotheriault@gmail.com)
Date: Wed Oct 03 2007 - 09:29:56 EDT


Hello Managers, I am new {still}, to Solaris but now am having some trouble
with swap usage and some Oracle databases. So I've started looking at how
swap is used on the system and am now thoroughly confused. The problem I'm
having is that some of our Oracle database processes are quiting processes
saying there is not enough memory. We have a Sun Fire E20k. With what
appears to be 65 gb of physical memory. (Does `prtconf | grep Memory` give
you the physical memory in the system?) But my problem comes when trying to
figure out how much swap space we have and how much is being used. The below
commands are what I'm using but I'm getting different readings from the
different commands.

# prtconf | grep Memory
Memory size: 65536 Megabytes

For example:
# swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d1 85,1 16 33560432 33560432

is telling me that all of my swap space is free, but when I look at the
partitions with `df -k`, see below, it is telling me that I have two
seperate swap spaces {/var/run, tmp} and that they are pretty much free as
well.

# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 10327372 6060018 4164081 60% /
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
/dev/md/dsk/d3 10327372 7895897 2328202 78% /var
swap 9423312 48 9423264 1% /var/run
dmpfs 9423264 0 9423264 0% /dev/vx/dmp
dmpfs 9423264 0 9423264 0% /dev/vx/rdmp
swap 9424448 1184 9423264 1% /tmp
/dev/md/dsk/d101 10327372 1645534 8578565 17% /opt
/dev/md/dsk/d100 20655529 13092035 7356939 65% /home
etc....

# cat /etc/vfstab

#device device mount FS fsck mount
mount
#to mount to fsck point type pass at boot
options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no -
/dev/md/dsk/d3 /dev/md/rdsk/d3 /var ufs 1 no -
/dev/md/dsk/d100 /dev/md/rdsk/d100 /home ufs 2
yes -
/dev/md/dsk/d101 /dev/md/rdsk/d101 /opt ufs 2
yes -
swap - /tmp tmpfs - yes -
etc.....

So it looks like most of my swap is free, but when I do:

# swap -s
total: 29697888k bytes allocated + 14074496k reserved = 43772384k used,
9143616k available

It's telling me I only have a little over 9 gigs of free swap space.

What is going on? How can I tell how much physical swap space the machine
has and why does it appear that from `df -k` and `swap -l` that most/all of
my swap space is free while swap -s is telling me I only have 9 gigs left.

Thank you very much for any insight into this matter.

-- 
Romeo Theriault
System Administrator
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:42:23 EDT