root     17421  0.0  0.0  5296  368 ?        S    Feb14   0:03 sendmail: accepting connections
root       687  0.0  0.0  3016    4 ?        S    Feb18   0:00 /usr/bin/ssh -x -oFallBackToRsh n
root       739  0.0  0.0  3016    4 ?        S    Feb18   0:00 /usr/bin/ssh -x -oFallBackToRsh n
postgres  1255  0.0  0.0 19272  444 ?        S    Feb18   8:49 bin/postmaster -D data/ -i
root     26227  0.0  0.0  3108    4 ?        S    Mar03   0:00 /usr/bin/ssh -x -oFallBackToRsh n
root       727  0.0  0.0  3108    4 ?        S    Mar08   0:00 /usr/bin/ssh -x -oFallBackToRsh n
root     22743  0.0  0.0  3108    4 ?        S    Mar16   0:00 /usr/bin/ssh -x -oFallBackToRsh n
named    11793  0.0  0.3 14964 2036 ?        S    Mar19   0:00 named -u named
named    11795  0.0  0.3 14964 2036 ?        S    Mar19   0:00 named -u named
named    11796  0.0  0.3 14964 2036 ?        S    Mar19   0:12 named -u named
named    11797  0.0  0.3 14964 2036 ?        S    Mar19   0:11 named -u named
named    11798  0.0  0.3 14964 2036 ?        S    Mar19   0:00 named -u named
named    11799  0.0  0.3 14964 2036 ?        S    Mar19   0:03 named -u named
root     21419  0.0  0.6  6484 3112 ?        S    Apr10   0:00 /server/www/bin/httpd
kangsh   21424 15.0  2.0 13276 10608 ?       R    Apr10 236:02 /server/www/bin/httpd
postgres 21433  0.0  2.2 20744 11404 ?       S    Apr10   0:06 postgres: postgres sf_26_new 127.
postgres 21434  0.0  2.0 20104 10276 ?       S    Apr10   0:02 postgres: postgres stats 127.0.0.
postgres 21435  0.1  2.1 20208 11068 ?       S    Apr10   1:36 postgres: postgres sf_26_news 127
postgres 21507  0.0  2.1 20172 10944 ?       S    Apr10   0:23 postgres: postgres sf_osl 127.0.0
postgres 21986  0.0  1.7 20164 8832 ?        S    Apr10   0:01 postgres: postgres sf_26 127.0.0.
kangsh   25795  0.1  1.7 11736 8912 ?        S    15:58   0:33 /server/www/bin/httpd
postgres 25836  0.0  2.1 20676 11096 ?       S    16:00   0:02 postgres: postgres sf_26_new 127.
postgres 25837  0.0  1.8 20176 9488 ?        S    16:00   0:00 postgres: postgres stats 127.0.0.
postgres 25838  0.1  2.1 20156 10824 ?       S    16:00   0:26 postgres: postgres sf_26_news 127
postgres 25890  0.0  1.9 20016 9748 ?        S    16:04   0:08 postgres: postgres hrweb 127.0.0.
postgres 25898  0.0  2.1 20288 10892 ?       S    16:07   0:09 postgres: postgres sf_osl 127.0.0
kangsh   26356 43.1  1.7 11744 8852 ?        R    17:22 127:55 /server/www/bin/httpd
postgres 26359  0.0  2.1 20272 10868 ?       S    17:24   0:06 postgres: postgres sf_osl 127.0.0
postgres 26392  0.0  1.9 20724 10152 ?       S    17:25   0:01 postgres: postgres sf_26_new 127.
postgres 26393  0.0  1.7 20108 8904 ?        S    17:25   0:00 postgres: postgres stats 127.0.0.
postgres 26422  0.0  2.1 20188 10856 ?       S    17:37   0:08 postgres: postgres sf_26_news 127
kangsh   26672 67.4  0.8  7160 4152 ?        R    18:22 159:22 /server/www/bin/httpd
kangsh   26719  0.1  1.7 11664 8824 ?        S    18:27   0:27 /server/www/bin/httpd
kangsh   26720  0.1  1.7 12016 9152 ?        R    18:27   0:27 /server/www/bin/httpd
postgres 26747  0.0  2.1 20772 11072 ?       S    18:30   0:02 postgres: postgres sf_26_new 127.
postgres 26748  0.0  1.7 20296 9008 ?        S    18:30   0:00 postgres: postgres stats 127.0.0.
postgres 26749  0.1  2.1 20184 10848 ?       S    18:30   0:15 postgres: postgres sf_26_news 127
postgres 26751  0.0  2.1 20776 11092 ?       S    18:31   0:02 postgres: postgres sf_26_new 127.
postgres 26752  0.0  1.8 20296 9232 ?        S    18:31   0:00 postgres: postgres stats 127.0.0.
postgres 26753  0.0  2.0 20032 10572 ?       S    18:31   0:09 postgres: postgres sf_26_news 127
postgres 26869  0.0  2.1 20308 10872 ?       S    18:46   0:06 postgres: postgres sf_osl 127.0.0
postgres 26872  0.0  2.1 20284 10880 ?       S    18:46   0:04 postgres: postgres sf_osl 127.0.0
postgres 26892  0.0  2.0 20028 10348 ?       S    18:49   0:00 postgres: postgres hrweb 127.0.0.
postgres 26893  0.0  0.6 20040 3144 ?        S    18:49   0:00 postgres: postgres sf_osl 127.0.0
kangsh   26953  0.1  1.7 11572 8748 ?        S    19:02   0:19 /server/www/bin/httpd
postgres 26960  0.0  2.1 20756 11128 ?       S    19:02   0:01 postgres: postgres sf_26_new 127.
postgres 26961  0.0  1.4 20268 7204 ?        S    19:02   0:00 postgres: postgres stats 127.0.0.
postgres 26962  0.1  2.0 20132 10692 ?       S    19:02   0:12 postgres: postgres sf_26_news 127
postgres 26999  0.0  2.1 20276 10864 ?       S    19:28   0:08 postgres: postgres sf_osl 127.0.0
kangsh   27105  0.1  1.4 10404 7556 ?        S    20:28   0:12 /server/www/bin/httpd
kangsh   27106  0.2  1.3  9544 6724 ?        S    20:28   0:13 /server/www/bin/httpd
kangsh   27107  0.2  1.6 11528 8688 ?        S    20:28   0:14 /server/www/bin/httpd
postgres 27109  0.0  2.1 20704 10792 ?       S    20:29   0:01 postgres: postgres sf_26_new 127.
postgres 27110  0.0  1.2 20168 6328 ?        S    20:29   0:00 postgres: postgres stats 127.0.0.
postgres 27111  0.0  2.0 20096 10612 ?       S    20:29   0:03 postgres: postgres sf_26_news 127
postgres 27112  0.0  2.0 20744 10576 ?       S    20:29   0:00 postgres: postgres sf_26_new 127.
............................................
kangsh   27250  0.1  1.2  9484 6652 ?        S    21:01   0:09 /server/www/bin/httpd
kangsh   27251  0.1  1.3  9844 6984 ?        S    21:01   0:08 /server/www/bin/httpd

解决方案 »

  1.   

    kangsh   27252  0.1  1.2  9456 6596 ?        S    21:01   0:07 /server/www/bin/httpd
    postgres 27253  0.0  2.0 20724 10288 ?       S    21:02   0:00 postgres: postgres sf_26_new 127.
    postgres 27254  0.0  1.0 20108 5248 ?        S    21:02   0:00 postgres: postgres stats 127.0.0.
    postgres 27255  0.0  2.0 20136 10720 ?       S    21:02   0:04 postgres: postgres sf_26_news 127
    kangsh   27256  0.1  1.4 10296 7436 ?        S    21:02   0:06 /server/www/bin/httpd
    postgres 27258  0.0  1.6 20720 8480 ?        S    21:02   0:00 postgres: postgres sf_26_new 127.
    postgres 27259  0.0  2.0 20728 10548 ?       S    21:02   0:00 postgres: postgres sf_26_new 127.
    postgres 27260  0.0  1.0 20212 5264 ?        S    21:02   0:00 postgres: postgres stats 127.0.0.
    postgres 27261  0.0  1.0 20208 5240 ?        S    21:02   0:00 postgres: postgres stats 127.0.0.
    postgres 27262  0.0  2.0 20076 10476 ?       S    21:02   0:03 postgres: postgres sf_26_news 127
    postgres 27263  0.1  2.0 20080 10596 ?       S    21:02   0:07 postgres: postgres sf_26_news 127
    postgres 27268  0.0  2.1 20284 10880 ?       S    21:06   0:02 postgres: postgres sf_osl 127.0.0
    postgres 27269  0.0  2.1 20276 10820 ?       S    21:06   0:03 postgres: postgres sf_osl 127.0.0
    kangsh   27270  0.2  1.7 11656 8948 ?        S    21:08   0:08 /server/www/bin/httpd
    kangsh   27271  0.1  1.3  9712 6880 ?        S    21:08   0:05 /server/www/bin/httpd
    postgres 27273  0.0  2.1 20324 10864 ?       S    21:08   0:02 postgres: postgres sf_osl 127.0.0
    postgres 27274  0.0  2.0 20028 10340 ?       S    21:08   0:00 postgres: postgres hrweb 127.0.0.
    postgres 27275  0.0  0.6 20040 3084 ?        S    21:08   0:00 postgres: postgres sf_osl 127.0.0
    postgres 27277  0.0  2.0 20764 10516 ?       S    21:09   0:00 postgres: postgres sf_26_new 127.
    postgres 27278  0.0  1.1 20140 5684 ?        S    21:09   0:00 postgres: postgres stats 127.0.0.
    postgres 27279  0.0  2.0 20076 10472 ?       S    21:09   0:01 postgres: postgres sf_26_news 127
    postgres 27284  0.0  2.1 20276 10860 ?       S    21:11   0:03 postgres: postgres sf_osl 127.0.0
    postgres 27285  0.0  1.8 20720 9244 ?        S    21:11   0:00 postgres: postgres sf_26_new 127.
    postgres 27286  0.0  0.9 20200 5112 ?        S    21:11   0:00 postgres: postgres stats 127.0.0.
    postgres 27287  0.0  2.0 20076 10476 ?       S    21:11   0:01 postgres: postgres sf_26_news 127
    postgres 27288  0.0  1.8 20216 9364 ?        S    21:11   0:00 postgres: postgres sf_osl 127.0.0
    postgres 27289  0.0  2.0 20228 10632 ?       S    21:12   0:00 postgres: postgres sf_osl 127.0.0
    postgres 27295  0.0  1.9 20720 9800 ?        S    21:13   0:00 postgres: postgres sf_26_new 127.
    postgres 27296  0.0  1.1 20208 5784 ?        S    21:13   0:00 postgres: postgres stats 127.0.0.
    postgres 27297  0.0  2.0 20080 10584 ?       S    21:13   0:02 postgres: postgres sf_26_news 127
    postgres 27302  0.1  2.1 20276 10876 ?       S    21:22   0:04 postgres: postgres sf_osl 127.0.0
    postgres 27310  0.0  0.8 20220 4424 ?        S    21:27   0:00 postgres: postgres sf_26 127.0.0.
    kangsh   27338  0.1  1.6 11108 8240 ?        S    21:47   0:03 /server/www/bin/httpd
    kangsh   27339  0.1  1.2  9392 6532 ?        S    21:47   0:02 /server/www/bin/httpd
    kangsh   27340  0.2  1.3  9704 6840 ?        S    21:47   0:04 /server/www/bin/httpd
    kangsh   27341  0.1  1.3  9668 6828 ?        S    21:47   0:03 /server/www/bin/httpd
    kangsh   27342  0.1  1.3 10004 7160 ?        S    21:47   0:02 /server/www/bin/httpd
    kangsh   27343  0.1  1.6 11544 8684 ?        S    21:47   0:03 /server/www/bin/httpd
    kangsh   27344  0.1  1.2  9444 6592 ?        S    21:47   0:02 /server/www/bin/httpd
    postgres 27345  0.0  1.6 20784 8464 ?        S    21:48   0:00 postgres: postgres sf_26_new 127.
    postgres 27346  0.0  0.8 20200 4132 ?        S    21:48   0:00 postgres: postgres stats 127.0.0.
    postgres 27347  0.2  2.0 20080 10616 ?       S    21:48   0:05 postgres: postgres sf_26_news 127
    postgres 27349  0.0  1.6 20672 8480 ?        S    21:48   0:00 postgres: postgres sf_26_new 127.
    postgres 27350  0.0  0.9 20212 4676 ?        S    21:48   0:00 postgres: postgres stats 127.0.0.
    postgres 27351  0.1  2.0 20076 10588 ?       S    21:48   0:03 postgres: postgres sf_26_news 127
    postgres 27352  0.0  1.7 20724 8976 ?        S    21:48   0:00 postgres: postgres sf_26_new 127.
    postgres 27353  0.0  0.7 20088 3664 ?        S    21:48   0:00 postgres: postgres stats 127.0.0.
    postgres 27354  0.1  2.0 20136 10732 ?       S    21:48   0:03 postgres: postgres sf_26_news 127
    postgres 27362  0.0  1.4 20720 7188 ?        S    21:50   0:00 postgres: postgres sf_26_new 127.
    postgres 27363  0.0  0.7 20028 3676 ?        S    21:50   0:00 postgres: postgres stats 127.0.0.
    postgres 27367  0.0  1.9 20228 10084 ?       S    21:51   0:00 postgres: postgres sf_osl 127.0.0
    postgres 27368  0.1  2.0 20044 10568 ?       S    21:51   0:01 postgres: postgres sf_26_news 127
    postgres 27369  0.0  1.6 20688 8584 ?        S    21:52   0:00 postgres: postgres sf_26_new 127.
    postgres 27370  0.0  0.9 20212 4788 ?        S    21:52   0:00 postgres: postgres stats 127.0.0.
    postgres 27371  0.1  2.0 20080 10588 ?       S    21:52   0:02 postgres: postgres sf_26_news 127
    postgres 27373  0.0  1.4 20820 7292 ?        S    21:53   0:00 postgres: postgres sf_26_new 127.
    postgres 27374  0.0  0.7 20200 3972 ?        S    21:53   0:00 postgres: postgres stats 127.0.0.
    postgres 27375  0.2  2.0 20076 10496 ?       S    21:53   0:03 postgres: postgres sf_26_news 127
    postgres 27376  0.0  1.5 20832 8072 ?        S    21:53   0:00 postgres: postgres sf_26_new 127.
    postgres 27377  0.0  0.6 20040 3120 ?        S    21:53   0:00 postgres: postgres stats 127.0.0.
    postgres 27379  0.5  1.8 20060 9316 ?        S    21:54   0:08 postgres: postgres hrweb 127.0.0.
    postgres 27380  0.0  2.0 20276 10284 ?       S    21:54   0:01 postgres: postgres sf_osl 127.0.0
    postgres 27381  0.3  2.0 20128 10660 ?       S    21:55   0:04 postgres: postgres sf_26_news 127
    kangsh   27382  0.1  1.3  9604 6748 ?        S    21:55   0:02 /server/www/bin/httpd
    postgres 27383  0.0  0.5 20008 2928 ?        S    21:55   0:00 postgres: postgres hrweb 127.0.0.
    postgres 27385  0.0  2.0 20284 10352 ?       S    21:55   0:00 postgres: postgres sf_osl 127.0.0
    postgres 27386  0.1  2.0 20276 10544 ?       S    21:55   0:01 postgres: postgres sf_osl 127.0.0
    postgres 27387  0.5  1.9 20060 10204 ?       S    21:55   0:08 postgres: postgres hrweb 127.0.0.
    postgres 27388  0.0  0.5 20008 2912 ?        S    21:56   0:00 postgres: postgres hrweb 127.0.0.
    postgres 27389  0.0  1.5 20692 8084 ?        S    21:56   0:00 postgres: postgres sf_26_new 127.
    postgres 27390  0.0  0.6 20008 3172 ?        S    21:56   0:00 postgres: postgres stats 127.0.0.
    postgres 27391  0.0  2.0 20076 10472 ?       S    21:57   0:01 postgres: postgres sf_26_news 127
    postgres 27425  0.1  2.1 20324 10832 ?       S    22:01   0:01 postgres: postgres sf_osl 127.0.0
    nobody   27426  0.0  0.1  2204  972 ?        S    22:02   0:00 proftpd: nobody - 203.175.230.10:
    nobody   27427  0.0  0.1  2204  972 ?        S    22:02   0:00 proftpd: nobody - 203.175.246.242
    postgres 27434  0.2  2.1 20276 10844 ?       S    22:04   0:01 postgres: postgres sf_osl 127.0.0
    postgres 27436  0.0  2.0 20284 10356 ?       S    22:04   0:00 postgres: postgres sf_osl 127.0.0
    postgres 27439  0.2  2.1 20328 10792 ?       S    22:05   0:01 postgres: postgres sf_osl 127.0.0
    root     27459  0.0  0.3  3616 1720 ?        R    22:14   0:00 /usr/sbin/sshd
    root     27460  0.0  0.2  2492 1324 pts/0    S    22:14   0:00 -bash
    postgres 27507  0.0  0.1 19396 1020 ?        S    22:19   0:00 bin/postmaster -D data/ -i
    root     27508  0.0  0.2  3260 1348 pts/0    R    22:19   0:00 ps aux
    其中pg占用较多cpu mem,/server/www/bin/httpd竟然占cpu60%多,不知道为什么??
    停掉httpd重起速度会好些。
      

  2.   

    connection pool是否有问题??没有正常关闭
      

  3.   

    http://laser.dyndns.zhengmai.net.cn/index.php
      

  4.   

    那个论坛的主人是中国postgresql的绝对高手.你是用的php,对这个我了解不太多,我用java,不过都类似?
      

  5.   

    在你的配置文件里这些参数设的多少?
    max_connections shared_buffers  sort_mem 
           
    我的分别是: 128 ,256 ,512 感觉可以
      

  6.   

    我的分别是512 1024 sort_mem没有用连接池应该正确,不用些断开的语句吧?