After having moved servers from 4.3 and 4.5 to 4.6, we are noticing
that swap indicates much higher usage.  Today, one of our squid
cache servers hit (and stayed at) 50% swap utilization so I decided
to do some digging.

This machine has 512 MB physical RAM in it and is running 
FreeBSD 4.5-RELEASE-p7

Here's a ps with some cruft removed and columns widened for readability.

> ps -axel                          
CPU PRI NI    VSZ    RSS WCHAN  STAT  TT       TIME COMMAND                  
  0 -18  0      0      0 sched  DLs   ??    0:00.00   (swapper)                  
  0  10  0    544    116 wait   ILs   ??    0:00.31  /sbin/init --                  
  0 -18  0      0      0 psleep DL    ??    5:30.16   (pagedaemon)                  
  0  18  0      0      0 psleep DL    ??    0:00.04   (vmdaemon)                  
  0 -18  0      0      0 psleep DL    ??    0:33.61   (bufdaemon)                  
  0  -2  0      0      0 vlruwt DL    ??    0:29.52   (vnlru)                  
  0  18  0      0      0 syncer DL    ??   29:36.89   (syncer)                  
  0   2  0    948    340 select Ss    ??    0:15.27  /usr/sbin/syslogd -s              
    
  0   2  0   1300    352 select Ss    ??    3:52.69  ntpd -p /var/run/ntpd.pid         
         
  0   2  0   1064    560 select Is    ??    0:00.18  /usr/sbin/inetd -wW               
   
  0  10  0    984    216 nanslp Is    ??    0:15.08  /usr/sbin/cron                  
 28   2  0   2136    264 select Is    ??    3:00.12  /usr/local/sbin/sshd              
    
  0  10  0   2940      0 wait   IWs   ??    0:00.00 () /usr/local/sbin/squid           
       
  4   2  0 398380 381916 poll   S     ??  286:58.56  (squid) (squid)                  
  0  -6  0    860    176 piperd Ss    ??    1:35.35  (unlinkd) (unlinkd)               
   
  0   2  0   4792    512 select Ss    ??    0:01.48  sshd: 
  0   2  0   2732   1920 select Ss    ??    0:02.73  /usr/local/sbin/gated             
     
  0   2  0   2096   1464 select Ss    ??    0:00.08  /usr/local/sbin/httpd             
     
  0   2  0   2504   1660 accept I     ??    0:00.01  /usr/local/sbin/httpd             
     
  0   2  0   2512   1668 accept I     ??    0:00.01  /usr/local/sbin/httpd             
     
  0  18  0   1584    820 pause  Ss    p0    0:00.51 SSH_CLIENT=                  
  0  28  0    416    172 -      R+    p0    0:00.00 SSH_CLIENT=                  
  0   3  0    948    528 ttyin  Is+   v0    0:00.00  /usr/libexec/getty Pc ttyv0       
           
  0   3  0    948    524 ttyin  Is+   v1    0:00.00  /usr/libexec/getty Pc ttyv1       
           
          ======= =======                  
Totals    427,688 393,208                  
         -393,208                           
          =======                        
           34,480 So, swap usage should be about this much.  But:
> pstat -s                          
Device          1K-blocks     Used    Avail Capacity  Type
/dev/ad0s1b        614272   304792   309480    50%    Interleaved

This seems very excessive as well as unjustified.  Is there some
way I can find out if I have a "swap leak" or some other way to
figure out what is going on?  As I mentioned, we noticed a significant
increase in swap usage on many servers between 4.3 or 4.5 and 4.6

/\/\ \/\/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to