Unused swap space though many big processes

Unused swap space though many big processes

Post by Toni Pisja » Sat, 15 Nov 2003 04:51:56



Hello,

Beforehand: There are postings with similar topic in this newsgroup: "swap
space descrepancy between top and 'swap'" and "why the difference in swap
value for vmstat output", but i didn't get explanations for my problem.

On a SPARC machine (with 512MB RAM and 1GB swap) there are running a lot
of big oracle processes (altogether about 5GB according to "top"), system
performance is bad: But why is there so much swap space left over as shown
in the following output of "top"? Or do i misinterpret the following
values?

"top -ores":
------------------------------
load averages:  0.12,  0.20,  0.30    19:59:58
231 processes: 229 sleeping, 1 stopped, 1 on cpu
CPU states:  0.0% idle, 24.5% user, 13.4% kernel, 62.1% iowait,  0.0% swap
Memory: 512M real, 8408K free, 157M swap in use, 868M swap free

THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
  1  34    0  267M  242M sleep   0:03  0.00% oracle
  1  34    0  267M  241M sleep   0:15  0.02% oracle
  1  34    0  267M  241M sleep   0:00  0.00% oracle
  1  34    0  267M  240M sleep   0:13  0.00% oracle
  1  34    0  267M  240M sleep   0:15  0.08% oracle
  1  34    0  267M  240M sleep   0:13  0.02% oracle
        :
        :
------------------------------

Quote:> swap -l

swapfile             dev  swaplo blocks   free
/dev/dsk/c0t0d0s1   32,1      16 2098144 1786032

Quote:> swap -s

total: 504440k bytes allocated + 149360k reserved = 653800k used, 735864k
availab

Quote:> vmstat

kthr      memory            page            disk          faults      cpu
r b w   swap  free  re  mf pi po fr de sr f0 s0 s1 --   in   sy   cs us sy id
0 8 1 707144  9064  47 150 813 421 672 0 10807 0 47 22 0 821 730 297 13  9 78

Quote:> df -k | grep swap

swap                  733792      40  733752     1%    /var/run
swap                  734040     288  733752     1%    /tmp

-----------------------------------------------------------

Any explanation for that?

Thanks in advance: Toni.

--
Toni Pisjak                    Technische Universitaet Wien

 
 
 

Unused swap space though many big processes

Post by Langelage, Fran » Sat, 15 Nov 2003 06:16:21



> Hello,

> Beforehand: There are postings with similar topic in this newsgroup: "swap
> space descrepancy between top and 'swap'" and "why the difference in swap
> value for vmstat output", but i didn't get explanations for my problem.

> On a SPARC machine (with 512MB RAM and 1GB swap) there are running a lot
> of big oracle processes (altogether about 5GB according to "top"), system
> performance is bad: But why is there so much swap space left over as shown
> in the following output of "top"? Or do i misinterpret the following
> values?

> "top -ores":
> ------------------------------
> load averages:  0.12,  0.20,  0.30    19:59:58
> 231 processes: 229 sleeping, 1 stopped, 1 on cpu
> CPU states:  0.0% idle, 24.5% user, 13.4% kernel, 62.1% iowait,  0.0% swap
> Memory: 512M real, 8408K free, 157M swap in use, 868M swap free

> THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
>   1  34    0  267M  242M sleep   0:03  0.00% oracle
>   1  34    0  267M  241M sleep   0:15  0.02% oracle
>   1  34    0  267M  241M sleep   0:00  0.00% oracle
>   1  34    0  267M  240M sleep   0:13  0.00% oracle
>   1  34    0  267M  240M sleep   0:15  0.08% oracle
>   1  34    0  267M  240M sleep   0:13  0.02% oracle
>    :
>    :
> ------------------------------

The size and res of each oracle process includes the shared memory.

- Show quoted text -

Quote:

>>swap -l

> swapfile             dev  swaplo blocks   free
> /dev/dsk/c0t0d0s1   32,1      16 2098144 1786032

>>swap -s

> total: 504440k bytes allocated + 149360k reserved = 653800k used, 735864k
> availab

>>vmstat

> kthr      memory            page            disk          faults      cpu
> r b w   swap  free  re  mf pi po fr de sr f0 s0 s1 --   in   sy   cs us sy id
> 0 8 1 707144  9064  47 150 813 421 672 0 10807 0 47 22 0 821 730 297 13  9 78

Although this stats are the avarage from boot time until now, it show
that the system is paging (pi/po).

Quote:

>>df -k | grep swap

> swap                  733792      40  733752     1%    /var/run
> swap                  734040     288  733752     1%    /tmp

> -----------------------------------------------------------

> Any explanation for that?

> Thanks in advance: Toni.

So again: put oracle datafiles on a separate filesystem (if not already
done) and mount this filesystem with option "forcedirectio" for ufs-type.

regards
Frank Langelage