Summary: Confused about Swap Usage

From: Romeo Theriault <romeo.theriault_at_maine.edu>
Date: Fri Oct 05 2007 - 12:34:14 EDT
Thank you for everyone who helped me out on this. See original question
below.

But, I still haven't found a satisfying solution to the matter. We are still
slowly watching the swap getting eaten away to nothing while the system
claims to have 19 gigs of free memory.

Output from top: Memory: 64G real, 19G free, 49G swap in use, 1269M swap
free

I've come to the conclusion with the help of you all that the reason `swap
-s` tells me I have next to nothing for swap while `swap -l` tells me my
swap space is untouched is due to tmpfs, and oracle writing too much to the
/tmp directory.

I'm a bit leary (to say the least) to limit the size of the tmpfs filesystem
in vfstab because I'm not sure what Oracle will do when it runs out of tmp
space. So I'm looking into expanding the swap space as  a temporary solution
but am first trying to learn the intricacy's of Veritas Volume manager which
we use before I make any changes. There is always something ;)

A few people mentioned that I should check my Oracle settings and Solaris
Kernel parameters. I verified the settings we have against Oracle's and
Solaris's recommended values and found that we appear to be setup correctly.


One person mention that the shminfo_shmmax kernel paramter in /etc/system
should at least be the sum of sga_max_size of all the oracle instances on
the box but I found the below quotes in Oracle documentation that to me
speak to the contrary.

"A system global area (SGA) is a group of shared memory structures that
contain data
and control information for one Oracle database instance... Each instance
has its own
SGA."

Again, thank you to everyone that helped me out and I'll post back if I find
out any other useful info.

Romeo


Original question:
On 10/3/07, Romeo Theriault <romeotheriault@gmail.com> wrote:
>
> 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
>



-- 
Romeo Theriault
System Administrator
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Oct 5 12:34:30 2007

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:07 EST