vmstat and paging ... how to interpret and get currently swap space size


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers vmstat and paging ... how to interpret and get currently swap space size
# 1  
Old 09-29-2010
vmstat and paging ... how to interpret and get currently swap space size

Hi,

OS = Solaris 5.10

I need some guidance on interpreting vmstat to confirm whether my server is swapping or not. Can anyone please advise whether the column to check on the vmstat output is the pi column, does higher pi values means the server is swapping or am having swapping issues?

Does having 90611736k used, 936736k available from the swap -s output means swapping is happening? Running swap -s several times the values for used and available are changing, is that enough confirmation that there is swapping happening somehow even though the output from top shows 34G swap and 34G free swap which means swap space is not being used, so no swapping issues? Am confused ... waaahhh SmilieSmilieSmilie

FYI, at some point, one of my database crashes when swap -s shows very low available swap space.

This server is part of a Solaris zone, so perhaps this server itself is not having swapping issues but the zone is, am I going paranoid or is that a "legitimate" assumption? The reason I said this is because if I add the values from the used and available of the swap -s output from this server, the total is greater than what top shows as the swap space which is 34G. If that is the case, how to get the current swap space for this server only if I don't have the top command? I do not have access to the zone itself and hence cannot run any zone level commands, i.e. zonecfg etc.

The sar output does not seem to suggest that any paging is happening either but am totally lost on whether swapping is happening or not. vmstat -s shows 0 pages swapped in/out, so no swapping happening ??? SmilieSmilie

I tried running sar -g on a HP-UX server but -g does not seem to be an option available for HP-UX, does anyone know what is the sar -g equivalence of Solaris in HP-UX? I tried sar -w, looks like this is the one albeit different headers, am I correct?

Code:
# swap -s
total: 71946928k bytes allocated + 18664808k reserved = 90611736k used, 936736k available

Output from top:

Code:
load averages:  2.59,  2.89,  2.88;                    up 20+21:18:57                                 13:30:16
 342 processes: 338 sleeping, 3 zombie, 1 on cpu
 CPU states: 96.5% idle,  1.1% user,  2.3% kernel,  0.0% iowait,  0.0% swap
 Memory: 96G phys mem, 15G free mem, 34G swap, 34G free swap

Thanks in advance.

Some more sample output as below:

Code:
# vmstat 5 5
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr lf m1 m1 m1   in   sy   cs us sy id
 1 5 0 2983808 15148016 645 2501 438 0 0 0 3 0 9  6  3 13417 27179 20915 10 5 85
 0 0 0 910344 15494880 101 595 0 0 0  0  0  0  1  1  0 4045 14989 4960 1  2 97
 0 0 0 911640 15495752 336 1648 0 0 0 0  0  0  1  1  0 2922 16274 3737 1  4 95
 0 0 0 908776 15495936 480 1920 2 0 0 0  0  0  1  1  0 3111 18412 3760 1  3 96
 6 0 0 902328 15495992 160 788 25 0 0 0  0  0  1  1  0 2580 14818 2983 1  3 96

# vmstat -s
        0 swap ins
        0 swap outs
        0 pages swapped in
        0 pages swapped out
4549067780 total address trans. faults taken
 17014659 page ins
      598 page outs
 98742548 pages paged in
     5169 pages paged out
1171465416 total reclaims
1171465416 reclaims from free list
        0 micro (hat) faults
4549067780 minor (as) faults
 10744061 major faults
1399117982 copy-on-write faults
1318928151 zero fill page faults
  5217676 pages examined by the clock daemon
        0 revolutions of the clock hand
    14963 pages freed by the clock daemon
 20883895 forks
  6311750 vforks
 30396460 execs
37766742302 cpu context switches
24235387237 device interrupts
7190845296 traps
49231317579 system calls
11505218144 total name lookups (cache hits 100%)
486245456 user   cpu
258519144 system cpu
4343779710 idle   cpu
        0 wait   cpu
#

# sar -g 5 5

SunOS vsypitzc02ssz01 5.10 Generic_142900-14 sun4u    09/29/2010

12:34:17  pgout/s ppgout/s pgfree/s pgscan/s %ufs_ipf
12:34:23     0.00     0.00     0.00     0.00     0.00
12:34:28     0.00     0.00     0.00     0.00     0.00
12:34:33     0.00     0.00     0.00     0.00     0.00
12:34:39     0.00     0.00     0.00     0.00     0.00
12:34:44     0.00     0.00     0.00     0.00     0.00

Average      0.00     0.00     0.00     0.00     0.00

# swap -s
total: 71946928k bytes allocated + 18664808k reserved = 90611736k used, 936736k available

Output from top:

Code:
#

load averages:  2.59,  2.89,  2.88;                    up 20+21:18:57                                 13:30:16
342 processes: 338 sleeping, 3 zombie, 1 on cpu
CPU states: 96.5% idle,  1.1% user,  2.3% kernel,  0.0% iowait,  0.0% swap
Memory: 96G phys mem, 15G free mem, 34G swap, 34G free swap

# 2  
Old 09-29-2010
The "swap -s" command is providing information about the whole virtual memory, not just the part of it associated with on disk swap areas.

In any case, just watch the "sr" column in vmstat output. If it stays equal or close to zero, there is no swapping issue.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

No Paging Space Available

Whilst perfoming some tests on lvm's I managed to crash our test box. No real problem as it is only used by our tech team. however I would like to know why this was actually caused as the task being performed at the time was one which I though would not have any impact. Using dd I was... (5 Replies)
Discussion started by: tugger
5 Replies

2. HP-UX

Determing size of swap space

Hi Experts, Need your advise in determining the size of swap space in of the new HP-Ux server. Server is having 32G of physical memory. Ideally what amout of physical memory should be allocated as a swap space? Following document from HP suggests to have minimum swap space... (2 Replies)
Discussion started by: sai_2507
2 Replies

3. Solaris

Which gives the correct swap space top/vmstat ?

last pid: 29502; load avg: 21.8, 20.7, 20.4; up 8+08:49:09 763 processes: 589 sleeping, 9 running, 160 zombie, 5 on cpu CPU states: 0.0% idle, 28.2% user, 71.8% kernel, 0.0% iowait, 0.0% swap Memory: 32G phys mem, 2042M free mem, 8198M total swap, 8020M free swap kthr ... (2 Replies)
Discussion started by: chidori
2 Replies

4. UNIX for Dummies Questions & Answers

how to monitor swap space paging activity?

hi guys My tivoli monitoring tools is reporting the monitor parameters says Pages Paged out is too high 1600 so it is a critical warning (threshold 400) now according to them this usually happens at dawn so is there a way to monitor this? during the time I am not working? ans something... (1 Reply)
Discussion started by: karlochacon
1 Replies

5. AIX

LV without Paging Space

Hello dear friends, We have VG filevg which consists of 2 PVs when I rechecked the VG there is no Pagingspace LV.. The VG is usually Highly loaded because much reads and writes.. Is this a must to create Paging space on the specified LV? (2 Replies)
Discussion started by: Vit0_Corleone
2 Replies

6. Solaris

swap size, total disk space

Hi experts, In my solaris system when i run the command df -h i got the below response.I have some confusion which i want to share with you guys.1)there are two SWAP file system shows are they same or different?2)if i want to count the total disk space should i take both the swap space or only... (2 Replies)
Discussion started by: rafiassam
2 Replies

7. AIX

paging space

Hello everyone I have a doubt about how many paging space can have in the same disk. lsps -a Page Space Physical Volume Volume Group Size %Used Active Auto Type paging00 hdisk0 rootvg 3072MB 1 yes yes lv hd6 hdisk0 ... (4 Replies)
Discussion started by: lo-lp-kl
4 Replies

8. AIX

Paging space

Hello everyone I have 4g of paging space in my rootvg disk I´m going to reduce them to 1gb in my rootvg disk and add 3gb of paging space on my san disk. My rootvg disk is mirror. My question is I can do this on line ? and I can do with the mirror ? or I need to unmirror first my... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

9. UNIX for Advanced & Expert Users

Swap vrs Paging

Can anyone explain the difference between Paging and Swap in unix. I know over the years that the term has almost become interchangable. However I have noticed in VMSTAT for a Solaris system that I am investigating that there is significant Paging but no Swapping and hence I am wondering do I... (2 Replies)
Discussion started by: jimthompson
2 Replies

10. AIX

swap space / paging space

how do you get the paging space reduced without rebooting the machine ? the os is aix (2 Replies)
Discussion started by: aaronh
2 Replies
Login or Register to Ask a Question