将 httpd 7.2 从 2.4.23 升级到 2.4.34 后,内存利用率增加

将 httpd 7.2 从 2.4.23 升级到 2.4.34 后,内存利用率增加

我们从 升级httpd 2.4.23 to 2.4.32。升级后,我们注意到模块在 2.4.23 中mpm从 更改preforxevent

    $ /apps/httpd.2.4.23/bin/httpd -M | grep mpm
    mpm_prefork_module (static
    $ /apps/httpd-2.4.34/bin/httpd -M  | grep mpm
    mpm_event_module (static)    

wordpress但是,与模块站点一起使用时,内存利用率过高eventOOM由于内存利用率过高而被调用

     PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
     25624 apachewp  20   0 3285m 1.1g  72m S  0.0  6.9   1:30.64 httpd
     25487 apachewp  20   0 3278m 1.1g  65m S  0.0  6.8   2:36.70 httpd
     25549 apachewp  20   0 3230m 1.0g  86m S  0.0  6.7   5:22.49 httpd
     25568 apachewp  20   0 3284m 1.0g  61m S  0.0  6.6   0:40.90 httpd
     25489 apachewp  20   0 3182m 1.0g 101m S 21.2  6.6  13:12.10 httpd
     25586 apachewp  20   0 3236m 1.0g  80m S  0.0  6.6   1:59.98 httpd
     25603 apachewp  20   0 3126m 989m 101m S  0.0  6.2   8:51.16 httpd
     25639 apachewp  20   0 3198m 975m  63m S  0.0  6.1   0:50.38 httpd
     25614 apachewp  20   0 3158m 956m  69m S  0.0  6.0   0:41.13 httpd
     25650 apachewp  20   0 3098m 889m  64m S  0.0  5.6   1:13.60 httpd
     25515 apachewp  20   0 3046m 868m  75m S  0.0  5.4   4:05.48 httpd
     25538 apachewp  20   0 3057m 831m  51m S  0.0  5.2   0:26.23 httpd
     25530 apachewp  20   0 2933m 704m  53m S  0.0  4.4   0:19.28 httpd
     25485 apachewp  20   0 2777m 548m  48m S  0.0  3.4   0:11.02 httpd
     25497 apachewp  20   0 2757m 498m  45m S  0.0  3.1   0:11.90 httpd
     25486 apachewp  20   0 2600m 372m  51m S  0.0  2.3   0:07.74 httpd
     24866 apache    20   0 2462m  91m  18m S  0.3  0.6   0:01.87 httpd
     24924 apache    20   0 2369m  80m 8436 S  0.0  0.5   0:02.98 httpd
     24952 apache    20   0 2368m  80m 6476 S  0.0  0.5   0:01.30 httpd

以下是我们的event阅读内容

   <IfModule mpm_event_module>
   StartServers             15
   MinSpareThreads         25
   MaxSpareThreads         75
   ThreadsPerChild         25
   MaxRequestWorkers      100
   MaxConnectionsPerChild   0

使用模块时内存利用率不是很高,prefork但使用模块时内存利用率会增加eventPHP版本是7.2。请建议解决方法以减少内存占用。

相关内容