LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 12-01-2008, 02:00 AM   #1
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Rep: Reputation: 30
Swap Space usage


Hi

Kindly note that in one of our production servers as we are facing some issues of performance.

While observing the same it shows different swap space utilization in top & swap -s.

Please suggest, which is correct.

TOP output>>>>



last pid: 27908; load avg: 6.90, 7.56, 8.43; up 16+14:31:51 02:27:52

1381 processes: 1374 sleeping, 5 stopped, 2 on cpu

CPU states: 65.4% idle, 20.0% user, 14.6% kernel, 0.0% iowait, 0.0% swap

Memory: 32G phys mem, 511M free mem, 90G total swap, 90G free swap



PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND

13720 oracle 1 0 0 16G 10G cpu/16 25:04 5.71% oracle

18889 oracle 11 32 0 16G 10G sleep 18:55 3.10% oracle

28716 oracle 2 32 0 16G 6203M sleep 13:50 1.16% oracle

4065 oracle 2 22 0 16G 896M sleep 167:06 1.00% oracle

27891 root 1 23 0 4408K 2776K cpu/1 0:01 0.72% top

18206 spatle 1 52 0 4568K 2904K sleep 10:41 0.70% top

28041 oracle 2 34 0 16G 5047M sleep 11:48 0.66% oracle

27669 oracle 2 32 0 16G 4801M sleep 4:22 0.64% oracle

10762 oracle 1 54 0 16G 10G sleep 16:33 0.48% oracle

27289 oracle 2 29 0 16G 4644M sleep 12:31 0.48% oracle

27845 oracle 2 44 0 16G 4907M sleep 12:13 0.40% oracle

27463 oracle 2 54 0 16G 4696M sleep 12:40 0.38% oracle

9069 oracle 1 39 0 16G 10G sleep 7:55 0.37% oracle

9325 oracle 2 59 0 16G 10G sleep 16:16 0.37% oracle

28013 oracle 2 54 0 16G 5016M sleep 12:00 0.35% oracle





bash-3.00# swap -s

total: 18408896k bytes allocated + 9192768k reserved = 27601664k used, 78444680k available

In case of top it shows all swape space as free.
While in case of swap -s it shows 74 GB free & 26GB Used.

Which will be the correct one ?

Please suggest.
Thanks
Rajan
 
Old 12-01-2008, 12:32 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
They are probably both correct. They just use a different definition of what swap means.

What says "swap -l", "vmstat 5 2" and "kstat ::system_pages" ?
 
Old 12-01-2008, 07:41 PM   #3
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Reply

Hi

Please find herewith all details

bash-3.00# swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d3 85,3 16 16790384 16776736
/dev/dsk/c1t4d0s0 118,16 16 50350832 50336848
/tmpswap - 16 16777200 16762720
/tmpswap2 - 16 104857584 104842400


bash-3.00# kstat ::system_pages
module: unix instance: 0
name: system_pages class: pages
availrmem 1895419
crtime 54.757494
desfree 32125
desscan 25
econtig 58982400
fastscan 149447
freemem 313943
kernelbase 16777216
lotsfree 64250
minfree 16062
nalloc 33821012
nalloc_calls 14736
nfree 31721150
nfree_calls 9858
nscan 0
pagesfree 313943
pageslocked 2216585
pagestotal 4112004
physmem 4189508
pp_kernel 422044
slowscan 100
snaptime 1500313.4407849

bash-3.00# vmstat 5 2
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr m0 m1 m2 m3 in sy cs us sy id
0 0 0 62633600 12399160 270 1090 18 17 20 0 0 1 1 1 0 7557 7122 4331 3 2 95
0 0 0 75470952 2624576 3598 11746 22 0 0 0 0 3 3 3 0 35406 61900 25178 47 12 40


Thanks
Rajan
 
Old 12-01-2008, 08:34 PM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
So you have 90 GiB of disk swap area which is not used at all.

You have 32 GiB of RAM. Part of this RAM is not swappable: 18 GiB of locked pages.

The virtual memory size is 90 + (32-18) ~= 104 MiB. This is what "swap -s" sees as swap, i.e. (virtual) memory that can be swapped in/out. I'm not sure about how 18 GiB of allocated memory fit in 14 GiB of RAM though ...

Last edited by jlliagre; 12-02-2008 at 01:56 AM.
 
Old 12-01-2008, 09:16 PM   #5
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Reply

Hi

Could you please suggest on below mentioned point, that how we have to check ?

You have 32 GiB of RAM. Part of this RAM id not swappable: 18 GiB of locked pages.



Please suggest.

Thanks
Rajan
 
Old 12-02-2008, 02:02 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
There is nothing to check specifically about RAM. Your system is not memory bounded. Free RAM is available and no paging occur at all.
It might be CPU bounded though given the avg load figures.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 12:57 PM
how to reduce swap space and reclaim the space grantm Linux - Newbie 7 08-16-2012 07:05 AM
swap file or swap space? simonb1975uk Linux - General 11 08-15-2008 02:39 PM
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 03:20 AM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 09:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration