免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3558 | 回复: 5
打印 上一主题 下一主题

[求救]load average很高,浪个处理啊 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-10-15 16:40 |只看该作者 |倒序浏览
系统:FreeBSD  6.2-RELEASE-p4
提供:HTTP服务,主要是一个新闻网站
最近访问网站很慢,请大家支个招。
#systat -vmstat

    3 users    Load 29.65 24.54 23.05                  Oct 15 16:10
Mem:KB    REAL            VIRTUAL                     VN PAGER  SWAP PAGER
        Tot   Share      Tot    Share    Free         in  out     in  out
Act  865312    3892  1175548    14520   30668 count                    13
All 1015952    6828154088564    49040         pages                    76
                                                      135 zfod   Interrupts
Proc:r  p  d  s  w    Csw  Trp  Sys  Int  Sof  Flt      2 cow    4115 total
    10     9321 15   4692  202 5675  336 1888  140 143000 wire     12 28: mpt
                                                   777492 act         1: atkb
4.1%Sys   0.2%Intr 45.8%User  0.0%Nice 50.0%Idl    69244 inact       14: ata
|    |    |    |    |    |    |    |    |    |      29012 cache   103 16: bge
==>>>>>>>>>>>>>>>>>>>>>>>                            1656 free   2000 cpu0: time
                                                          daefr  2000 cpu1: time
Namei         Name-cache    Dir-cache                   1 prcfr
    Calls     hits    %     hits    %                   1 react
     5162     5162  100                                   pdwake
                                                    84744 pdpgs
Disks   da0 pass0 pass1 pass2 pass3                       intrn
KB/t  23.75  0.00  0.00  0.00  0.00                113888 buf
tps      13     0     0     0     0                    71 dirtybuf
MB/s   0.30  0.00  0.00  0.00  0.00                 69970 desiredvnodes
% busy    8     0     0     0     0                  4532 numvnodes
                                                     2697 freevnodes

#top
last pid:  1780;  load averages: 30.61, 25.23, 23.36                             up 0+03:46:29  16:11:36
368 processes: 41 running, 327 sleeping
CPU states: 47.6% user,  0.0% nice,  2.4% system,  0.0% interrupt, 50.0% idle
Mem: 715M Active, 70M Inact, 139M Wired, 27M Cache, 111M Buf, 45M Free
Swap: 3993M Total, 52M Used, 3941M Free, 1% Inuse

# netstat -m
351/834/1185 mbufs in use (current/cache/total)
290/228/518/25600 mbuf clusters in use (current/cache/total/max)
290/222 mbuf+clusters out of packet secondary zone in use (current/cache)
0/0/0/0 4k (page size) jumbo clusters in use (current/cache/total/max)
0/0/0/0 9k jumbo clusters in use (current/cache/total/max)
0/0/0/0 16k jumbo clusters in use (current/cache/total/max)
667K/664K/1332K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
53/316/6656 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed
4447 requests for I/O initiated by sendfile
759 calls to protocol drain routines
# netstat 1
            input        (Total)           output
   packets  errs      bytes    packets  errs      bytes colls
        35     0       5112         31     0      25860     0
        25     0       1921         31     0      29338     0
       148     0      33522        187     0     177522     0
        43     0       9092         40     0      28222     0
        58     0      12379         74     0      77738     0
       151     0      22415        227     0     268497     0
        68     0      16144         54     0      32881     0
        59     0      14644         63     0      44419     0
        28     0       3351         20     0      16491     0
         8     0        528         15     0      15641     0
        24     0       1512         28     0      25559     0
       184     0      31086        263     0     336249     0
       156     0      34189        224     0     270667     0
       178     0      31985        216     0     249159     0
       189     0      49827        227     0     230724     0
        28     0       5607         22     0      15622     0
        17     0       2086         26     0      22789     0
        18     0       2521         19     0       9148     0

论坛徽章:
0
2 [报告]
发表于 2007-10-15 23:24 |只看该作者
把进程信息贴出来。。怎么这么吃内存。

以前有个兄弟是mysql的问题。你可以SOUSUO一下。。

论坛徽章:
0
3 [报告]
发表于 2007-10-18 14:33 |只看该作者
# ps -aux
USER       PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED      TIME COMMAND
root        10 100.0  0.0     0     8  ??  RL   Mon04PM   0:00.00 [idle: cpu1]
root         0  0.0  0.0     0     0  ??  WLs  Mon04PM   0:00.06 [swapper]
root         1  0.0  0.0   772   172  ??  ILs  Mon04PM   0:00.01 /sbin/init --
root         2  0.0  0.0     0     8  ??  DL   Mon04PM   0:12.51 [g_event]
root         3  0.0  0.0     0     8  ??  DL   Mon04PM   0:21.87 [g_up]
root         4  0.0  0.0     0     8  ??  DL   Mon04PM   0:22.85 [g_down]
root         5  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.00 [thread taskq]
root         6  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.00 [kqueue taskq]
root         7  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.00 [acpi_task_0]
root         8  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.00 [acpi_task_1]
root         9  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.00 [acpi_task_2]
root        11  0.0  0.0     0     8  ??  RL   Mon04PM 963:23.34 [idle: cpu0]
root        12  0.0  0.0     0     8  ??  WL   Mon04PM   6:31.12 [swi4: clock sio]
root        13  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [swi3: vm]
root        14  0.0  0.0     0     8  ??  WL   Mon04PM  22:30.25 [swi1: net]
root        15  0.0  0.0     0     8  ??  DL   Mon04PM   0:41.68 [yarrow]
root        16  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [swi6: Giant taskq]
root        17  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [swi5: +]
root        18  0.0  0.0     0     8  ??  WL   Mon04PM   0:07.48 [swi2: cambio]
root        19  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [swi6: task queue]
root        20  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [irq9: acpi0]
root        21  0.0  0.0     0     8  ??  WL   Mon04PM   0:20.72 [irq28: mpt0]
root        22  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.00 [mpt_recovery0]
root        23  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.00 [mpt_raid0]
root        24  0.0  0.0     0     8  ??  WL   Mon04PM   9:32.48 [irq16: bge0 bge1+]
root        25  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.02 [usb0]
root        26  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.00 [usbtask]
root        27  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [irq19: uhci1]
root        28  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.01 [usb1]
root        29  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [irq23: ehci0]
root        30  0.0  0.0     0     8  ??  DL   Mon04PM   0:00.01 [usb2]
root        31  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [irq14: ata0]
root        32  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [irq15: ata1]
root        33  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [swi0: sio]
root        34  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [irq1: atkbd0]
root        35  0.0  0.0     0     8  ??  WL   Mon04PM   0:00.00 [irq12: psm0]
root        36  0.0  0.0     0     8  ??  DL   Mon04PM   0:42.39 [pagedaemon]
root        37  0.0  0.0     0     8  ??  DL   Mon04PM   0:10.20 [vmdaemon]
root        38  0.0  0.0     0     8  ??  RL   Mon04PM   0:03.36 [pagezero]
root        39  0.0  0.0     0     8  ??  DL   Mon04PM   0:01.01 [bufdaemon]
root        40  0.0  0.0     0     8  ??  DL   Mon04PM   2:21.73 [syncer]
root        41  0.0  0.0     0     8  ??  DL   Mon04PM   0:01.78 [vnlru]
root        42  0.0  0.0     0     8  ??  DL   Mon04PM   0:02.92 [softdepflush]
root        43  0.0  0.0     0     8  ??  DL   Mon04PM   0:18.34 [schedcpu]
root       121  0.0  0.0  1252     0  ??  IWs  -         0:00.00 adjkerntz -i
root       495  0.0  0.0   528     0  ??  IWs  -         0:00.00 /sbin/devd
root       547  0.0  0.0  1376   376  ??  Ss   Mon04PM   0:02.45 /usr/sbin/syslogd -s
root       660  0.0  0.0  1288   112  ??  Is   Mon04PM   0:00.23 /usr/sbin/usbd
root       679  0.0  0.0  3524   364  ??  Is   Mon04PM   0:00.07 /usr/sbin/sshd
root       693  0.0  0.0  1388   312  ??  Is   Mon04PM   0:00.49 /usr/sbin/cron -s
root       750  0.0  0.0  1548   448  ??  Ss   Mon04PM   0:04.81 /usr/local/libexec/postfix/master
root       755  0.0  0.6 31504  5848  ??  Ss   Mon04PM   0:14.53 /usr/local/apache/bin/httpd -k restart
root     17530  0.0  0.0  1728     0  ??  IW   -         0:00.00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/var --pid-file=/usr/local/mysql/var/news.cqu
mysql    17554  0.0  2.6 81044 26540  ??  S     2:30AM 395:17.86 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql --pid-fil
daemon   17558  0.0  0.0 30036     0  ??  IW   -         0:00.00 /usr/local/apache/bin/httpd -k restart
postfix  20228  0.0  0.0  1668   320  ??  I    10:02AM   0:00.06 qmgr -l -t fifo -u
daemon   21387  0.0  4.4 73956 46096  ??  I     1:31PM   0:11.93 /usr/local/apache/bin/httpd -k restart
daemon   21389  0.0  4.4 74128 46244  ??  S     1:32PM   0:10.43 /usr/local/apache/bin/httpd -k restart
daemon   21417  0.0  4.6 75384 47440  ??  I     1:36PM   0:09.22 /usr/local/apache/bin/httpd -k restart
daemon   21430  0.0  4.4 73124 45232  ??  I     1:39PM   0:08.91 /usr/local/apache/bin/httpd -k restart
daemon   21439  0.0  4.4 73684 45964  ??  S     1:41PM   0:09.56 /usr/local/apache/bin/httpd -k restart
daemon   21467  0.0  4.5 74484 46644  ??  S     1:45PM   0:06.71 /usr/local/apache/bin/httpd -k restart
daemon   21489  0.0  4.6 75360 47332  ??  S     1:51PM   0:05.72 /usr/local/apache/bin/httpd -k restart
root     21518  0.0  0.3  6276  2872  ??  Is    1:55PM   0:00.02 sshd: root [priv] (sshd)
root 21521  0.0  0.3  6252  2872  ??  S     1:55PM   0:00.05 sshd: root@ttyp0 (sshd)
daemon   21539  0.0  4.3 72724 44760  ??  S     1:57PM   0:03.43 /usr/local/apache/bin/httpd -k restart
daemon   21543  0.0  4.1 70552 42576  ??  S     1:59PM   0:02.95 /usr/local/apache/bin/httpd -k restart
daemon   21571  0.0  4.6 75652 47392  ??  S     2:00PM   0:02.26 /usr/local/apache/bin/httpd -k restart
daemon   21575  0.0  4.0 69284 41080  ??  S     2:02PM   0:01.55 /usr/local/apache/bin/httpd -k restart
daemon   21577  0.0  2.4 51768 24856  ??  S     2:02PM   0:01.17 /usr/local/apache/bin/httpd -k restart
daemon   21584  0.0  2.2 50584 23300  ??  S     2:04PM   0:00.60 /usr/local/apache/bin/httpd -k restart
daemon   21585  0.0  2.4 52904 25240  ??  S     2:04PM   0:00.48 /usr/local/apache/bin/httpd -k restart
postfix  21593  0.0  0.1  1588  1008  ??  S     2:05PM   0:00.00 pickup -l -t fifo -u
root       885  0.0  0.0  1344     0  v0  IWs+ -         0:00.00 /usr/libexec/getty Pc ttyv0
root       886  0.0  0.0  1344     0  v1  IWs+ -         0:00.00 /usr/libexec/getty Pc ttyv1
root       887  0.0  0.0  1344     0  v2  IWs+ -         0:00.00 /usr/libexec/getty Pc ttyv2
root       888  0.0  0.0  1344     0  v3  IWs+ -         0:00.00 /usr/libexec/getty Pc ttyv3
root       889  0.0  0.0  1344     0  v4  IWs+ -         0:00.00 /usr/libexec/getty Pc ttyv4
root       890  0.0  0.0  1344     0  v5  IWs+ -         0:00.00 /usr/libexec/getty Pc ttyv5
root       891  0.0  0.0  1344     0  v6  IWs+ -         0:00.00 /usr/libexec/getty Pc ttyv6
root       892  0.0  0.0  1344     0  v7  IWs+ -         0:00.00 /usr/libexec/getty Pc ttyv7
root 21522  0.0  0.1  1752  1072  p0  Is    1:55PM   0:00.01 -sh (sh)
root 21524  0.0  0.2  4660  2500  p0  I     1:55PM   0:00.01 /bin/csh
root     21525  0.0  0.1  1776  1148  p0  I     1:55PM   0:00.01 su
root     21526  0.0  0.3  5540  3300  p0  S     1:55PM   0:00.02 _su (csh)
root     21594  0.0  0.1  1488   784  p0  R+    2:05PM   0:00.00 ps -aux

论坛徽章:
0
4 [报告]
发表于 2007-10-18 16:08 |只看该作者
还有,执行netstat -an 后有很多这种,这些都是什么呢?
c4fa0348 stream      0      0        0        0        0        0 private/local
c5401348 stream      0      0        0        0        0        0 private/local
c50e19d8 stream      0      0        0        0        0        0 private/local
c5401118 stream      0      0        0        0        0        0 private/local
c5728348 stream      0      0        0        0        0        0 private/local
c57282bc stream      0      0        0        0        0        0 private/local
c5728c94 stream      0      0        0        0        0        0 private/local
c574f460 stream      0      0        0        0        0        0 private/local
c54d67a8 stream      0      0        0        0        0        0 private/local
c55998c0 stream      0      0        0        0        0        0 private/local
c4f9fec4 stream      0      0        0        0        0        0 private/local
c54a894c stream      0      0        0        0        0        0 private/local
c4fa02bc stream      0      0        0        0        0        0 private/local
c4fa071c stream      0      0        0        0        0        0 private/local
c50e1ec4 stream      0      0        0        0        0        0 private/local
c574f578 stream      0      0        0        0        0        0 private/local
c54d6d20 stream      0      0        0        0        0        0 private/local
c54017a8 stream      0      0        0        0        0        0 private/local
c54a808c stream      0      0        0        0        0        0 private/local
c54a82bc stream      0      0        0        0        0        0 private/local
c54d6604 stream      0      0        0        0        0        0 private/local
c5728834 stream      0      0        0        0        0        0 private/local
c54d6834 stream      0      0        0        0        0        0 private/local
c54013d4 stream      0      0        0        0        0        0 private/local
c55992bc stream      0      0        0        0        0        0 private/local
c4fa0c08 stream      0      0        0        0        0        0 private/local
c4fa0dac stream      0      0        0        0        0        0 private/local
c4f9fe38 stream      0      0 c50cc550        0        0        0 private/scache
c4f9fc94 stream      0      0 c50cc440        0        0        0 private/anvil
c4f9fc08 stream      0      0 c50d0990        0        0        0 private/lmtp
c4f9fb7c stream      0      0 c50cc330        0        0        0 private/virtual
c4f9fa64 stream      0      0 c50d2660        0        0        0 private/local
c4f9faf0 stream      0      0 c50d2550        0        0        0 private/discard
c4f9f9d8 stream      0      0 c50d2770        0        0        0 private/retry
c4f9f94c stream      0      0 c50d2880        0        0        0 private/error
c4f9f8c0 stream      0      0 c50d2990        0        0        0 public/showq
c4f9f000 stream      0      0 c50d2aa0        0        0        0 private/relay
c4f9f08c stream      0      0 c50d2bb0        0        0        0 private/smtp
c4f9f118 stream      0      0 c50d2cc0        0        0        0 private/proxymap
c4f9f1a4 stream      0      0 c50d2dd0        0        0        0 public/flush
c4f9f230 stream      0      0 c50da000        0        0        0 private/verify
c4f9f2bc stream      0      0 c50da110        0        0        0 private/trace
c4f9f348 stream      0      0 c50da220        0        0        0 private/defer
c4f9f3d4 stream      0      0 c50da330        0        0        0 private/bounce
c4f9f460 stream      0      0 c50da440        0        0        0 private/rewrite
c4f9f4ec stream      0      0 c50da550        0        0        0 private/tlsmgr

论坛徽章:
0
5 [报告]
发表于 2007-10-18 19:38 |只看该作者
贴完整的top 与my.cnf,httpd.conf

一般情况下都是my.cnf设置过高(优化过度)

论坛徽章:
0
6 [报告]
发表于 2007-10-19 14:24 |只看该作者
mysql 是 my-medium.cnf默认
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP