Centos:有很多'httpd start'过程

时间:2017-07-31 03:17:23

标签: linux apache centos httpd.conf

我发现我的服务器很慢,我使用'ps au'来显示所有进程。有很多/usr/local/apache/bin/httpd -k start正在运行。

我该如何解决这个问题?

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0 195536 10040 ?        Ss   6月11  40:57 /usr/lib/systemd/systemd --switched-root --system --d
root         2  0.0  0.0      0     0 ?        S    6月11   0:00 [kthreadd]
nobody   31295  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31296  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31297  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31299  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31303  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31310  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31312  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31314  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31315  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31316  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31320  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31324  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31326  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31328  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31329  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31330  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31331  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31332  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31333  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31335  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31338  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31339  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31341  0.0  0.0  97160  6208 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31346  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31364  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31370  0.0  0.0  97028  5036 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31373  0.0  0.0  97028  5040 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31374  0.0  0.0  97028  5044 ?        S    11:02   0:00 /usr/local/apache/bin/httpd -k start
nobody   31416  0.0  0.0  97028  5048 ?        S    11:03   0:00 /usr/local/apache/bin/httpd -k start
nobody   31418  0.0  0.0  97028  5044 ?        S    11:03   0:00 /usr/local/apache/bin/httpd -k start
nobody   31422  0.0  0.0  97028  5044 ?        S    11:03   0:00 /usr/local/apache/bin/httpd -k start
nobody   31423  0.0  0.0  97028  5044 ?        S    11:03   0:00 /usr/local/apache/bin/httpd -k start
dovecot  31461  0.0  0.0  27940  2232 ?        S    11:04   0:00 dovecot/auth
root     31525  0.0  0.0  82012 11368 ?        S    11:04   0:00 /usr/local/cpanel/3rdparty/bin/perl /usr/local/cpanel/
nobody   31578  0.0  0.0  97028  4800 ?        S    11:04   0:00 /usr/local/apache/bin/httpd -k start
nobody   31579  0.0  0.0  97028  5048 ?        S    11:04   0:00 /usr/local/apache/bin/httpd -k start

1 个答案:

答案 0 :(得分:0)

您可以使用以下指令对工作程序进行过程控制:

  • ServerLimit 16
  • StartServers 2
  • MaxRequestWorkers 150
  • MinSpareThreads 25
  • MaxSpareThreads 75
  • ThreadsPerChild 25

相应地设置值。