Swap space + free memory

From: imran reayat (imran_programming@yahoo.com)
Date: Wed Jan 17 2007 - 01:45:30 EST


Please forgive me for asking this basic question, but I am really confused regarding the usage of subject mentioned utility for determining free physical memory + swap space, its causing occasional serious performance degradation on live system.
  Below is the problem .
   
  , please spend some minutes and do answer these
   
  1. When is swap used, i.e. whether swap will be used when we have no more physical memory and processes need to paged out or is there some other condition?
  2. When I used swap l (el) I see the entire swap is free but when I used top, I see swap being used similarly when I use vmstat I see swap being used, why is this difference in the output of different utilities.
   
  you can seeb below that from top output, that although there is free physical memory even then swap is being used, which is making me confused. Please assist.
   
  Top
  ====
  load averages: 9.13, 9.12, 9.07 11:39:28
829 processes: 803 sleeping, 10 zombie, 4 stopped, 12 on cpu
CPU states: 74.4% idle, 19.0% user, 5.2% kernel, 1.4% iowait, 0.0% swap
Memory: 96G real, 56G free, 32G swap in use, 64G swap free
    PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
 5102 rtp99 24 0 12 2094M 318M cpu7 1:05 0.94% bin.catrunnerj4
 1344 rtp99 24 23 12 2096M 351M sleep 1:54 0.79% bin.catrunnerj4
28493 rtp99 24 23 12 2100M 383M sleep 2:37 0.75% bin.catrunnerj4
 4777 rtp99 24 4 12 2103M 495M cpu10 6:46 0.74% bin.catrunnerj4
18067 rtp99 24 23 12 2104M 647M sleep 14:45 0.73% bin.catrunnerj4
25480 rtp99 24 23 12 2102M 523M sleep 8:08 0.72% bin.catrunnerj4
14584 rtp99 24 23 12 2102M 443M sleep 4:39 0.72% bin.catrunnerj4
18130 rtp99 24 23 12 2103M 552M sleep 9:30 0.71% bin.catrunnerj4
11443 rtp99 24 0 12 2102M 460M cpu20 5:24 0.71% bin.catrunnerj4
14905 rtp99 24 23 12 2104M 563M sleep 10:11 0.71% bin.catrunnerj4
22404 rtp99 24 23 12 2101M 404M sleep 3:17 0.71% bin.catrunnerj4
21550 rtp99 24 23 12 2104M 634M sleep 14:05 0.71% bin.catrunnerj4
18214 rtp99 24 23 12 2101M 424M sleep 4:02 0.70% bin.catrunnerj4
 8195 rtp99 24 23 12 2102M 476M sleep 6:02 0.70% bin.catrunnerj4
 1717 rtp99 24 23 12 2103M 509M sleep 7:29 0.70% bin.catrunnerj4

  swap -l
  ======
   
  root@inccce1# swap -l
swapfile dev swaplo blocks free
/dev/vd/vdisk33 264,33 16 29360112 29360112
/dev/vd/vdisk34 264,34 16 10485744 10485744
/dev/vd/vdisk35 264,35 16 10485744 10485744

   
  root@inccce1# vmstat 2 10
 procs memory page disk faults cpu
 r b w swap free re mf pi po fr de sr md md md md in sy cs us sy id
 0 0 0 56702224 51349760 528 3220 196 13 6 0 0 210 21 19 0 9248 22363 15529 17 5 78
 0 0 0 66979032 59131328 852 1717 0 0 0 0 0 35 66 17 0 14377 127398 86505 23 6 71
 0 1 0 66977904 59130720 935 1545 0 0 0 0 0 32 9 16 0 13768 124103 83211 23 6 70
 0 1 0 66975456 59128800 1919 5160 0 0 0 0 0 33 46 21 0 14107 130739 84833 25 7 68
 0 1 0 66975304 59129808 854 1945 0 0 0 0 0 34 5 20 0 13464 126735 83875 23 6 70
 0 0 0 66978464 59130672 1638 7208 0 4 0 0 0 34 68 25 0 14199 136847 84215 22 7 70
 0 1 0 66978760 59129936 878 1494 0 0 0 0 0 46 90 20 0 13570 121147 82011 23 6 71
 0 1 0 66979176 59129344 1096 3104 0 0 0 0 0 69 6 19 0 13521 156907 84126 23 7 70
 0 1 0 66978576 59103544 135 1512 0 0 0 0 0 253 52 16 0 14462 121345 81936 22 6 72
 0 0 0 66977440 59072744 304 6070 0 0 0 0 0 237 56 22 0 16853 126272 85466 25 7 68
root@inccce1# vmstat 2 10
 procs memory page disk faults cpu
 r b w swap free re mf pi po fr de sr md md md md in sy cs us sy id
 0 0 0 56702392 51349888 528 3220 196 13 6 0 0 210 21 19 0 9248 22365 15530 17 5 78
 0 0 0 66970040 59148256 1306 4772 0 0 0 0 0 0 96 30 0 14103 99933 84786 24 7 68
 0 0 0 66974712 59149680 177 2247 0 0 0 0 0 0 5 15 0 18844 118529 111049 24 8 68
 0 0 0 66967120 59148872 400 6305 0 0 0 0 0 0 46 17 0 13580 91870 82937 21 6 73
 0 0 0 66974608 59146728 213 2078 0 0 0 0 0 0 55 18 0 13081 92526 81922 19 6 75
 0 0 0 66968320 59141432 429 3199 0 4 4 0 0 0 6 24 0 14442 97821 84699 20 7 72
 0 1 0 66972624 59142064 220 2064 0 0 0 0 0 0 99 23 0 13305 94580 84040 20 6 74
 0 1 0 67310488 59509272 846 8616 0 0 0 0 0 0 7 29 0 13422 100678 85535 23 8 70
 0 0 0 67076176 59503928 165 1522 0 0 0 0 0 0 70 21 0 13490 102988 91354 22 5 73
 0 0 0 67069528 59491368 185 2897 0 0 0 0 0 0 53 22 0 14168 97075 84980 24 6 70

  df -k
   
  Filesystem kbytes used avail capacity Mounted on
/dev/vd/vdisk3 4128206 2284539 1802385 56% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/vd/vdisk13 8778989 5360046 3331154 62% /var
swap 67003664 32 67003632 1% /var/run
swap 67184488 180856 67003632 1% /tmp
/dev/vd/vdisk17 29927845 2197398 27431169 8% /TspAccBackup
/dev/vd/vdisk23 20639912 4028832 16404681 20% /TspAcc
/dev/vd/vdisk16 4127406 7168 4078964 1% /TspTickets
/dev/vd/vdisk4 8255533 77813 8095165 1% /TspCore
/dev/vd/vdisk5 114425023 21667001 91613772 20% /dump
/dev/vd/vdisk15 13940539 8197848 5603286 60% /export/home
/dev/vd/vdisk14 8261517 2026303 6152599 25% /opt/SMAW
/dev/vd/vdisk810 1117678 1202 1060593 1% /global/TspOam
/dev/vd/vdisk130 39731617 26743855 12590446 68% /global/TspArchiveLog1
/dev/vd/vdisk800 37462178 21379514 15708043 58% /global/TspFt
%in6ce2:/global/TspArchiveLog2
                     39731617 20614652 18719649 53% /global/TspArchiveLog2
/dev/vd/vdisk820 45407967 101209 44852679 1% /global/TspTicketpool

    Looking forward,
   
  Regards,
  imran

   
   
   
   
   
   
   
   
   

         
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.
_______________________________________________
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:41:28 EDT