Apache-2.2

優化阿帕奇

  • October 16, 2009

我一直在閱讀 apache 的多個優化指南,發現了很多數據(雖然我不知道作者的經驗是什麼)。

我有一個帶有 apache 2.2.3、MySQL 5.1.36、Centos 5.3、nginx 的生產伺服器來充當反向代理伺服器(並處理靜態文件)。

我的主要問題是我有大約 10 個 httpd 程序,每個程序佔用 56-60MB RAM,每 15 分鐘我通過 crond 啟動 10 個 php 程序(每個程序也佔用 30MB)。

基本上我使用預設的 httpd.conf 操作(是的,我知道,這很糟糕),我剛剛調整了 MPM 最大客戶端和其他屬性來控制應該分叉的客戶端數量,並安裝了 nginx 以減少 apache 的負載。

我很高興我可以對我的 httpd 做什麼樣的優化(我知道我應該解除安裝很多模組,但我有點害怕刪除某些東西可能會破壞我的應用程序)。

21969 root      16   0  145m  30m 6872 S  1.3  0.9   0:00.75 php                                                                                                                 
6031 apache    16   0  289m  59m  35m S  1.0  1.3   0:05.01 httpd           

我正在執行的一個程序的另一個輸出:

[root@www /]# pmap -d 6031
6031:   /usr/sbin/httpd
Address           Kbytes Mode  Offset           Device    Mapping
00002b8b622e4000     308 r-x-- 0000000000000000 008:00003 httpd
00002b8b62331000     100 rw-s- 0000000000000000 000:00023   [ anon ]
00002b8b6234a000      32 rw-s- 0000000000000000 000:00023   [ anon ]
00002b8b62531000      16 rw--- 000000000004d000 008:00003 httpd
00002b8b62535000      12 rw--- 00002b8b62535000 000:00000   [ anon ]
00002b8b62538000     112 r-x-- 0000000000000000 008:00003 ld-2.5.so
00002b8b62554000       4 rw--- 00002b8b62554000 000:00000   [ anon ]
00002b8b6255a000       4 rw--- 00002b8b6255a000 000:00000   [ anon ]
00002b8b62753000       4 r---- 000000000001b000 008:00003 ld-2.5.so
00002b8b62754000       4 rw--- 000000000001c000 008:00003 ld-2.5.so
00002b8b62755000     520 r-x-- 0000000000000000 008:00003 libm-2.5.so
00002b8b627d7000    2044 ----- 0000000000082000 008:00003 libm-2.5.so
00002b8b629d6000       4 r---- 0000000000081000 008:00003 libm-2.5.so
00002b8b629d7000       4 rw--- 0000000000082000 008:00003 libm-2.5.so
00002b8b629d8000     108 r-x-- 0000000000000000 008:00003 libpcre.so.0.0.1
00002b8b629f3000    2048 ----- 000000000001b000 008:00003 libpcre.so.0.0.1
00002b8b62bf3000       4 rw--- 000000000001b000 008:00003 libpcre.so.0.0.1
00002b8b62bf4000      84 r-x-- 0000000000000000 008:00003 libselinux.so.1
00002b8b62c09000    2048 ----- 0000000000015000 008:00003 libselinux.so.1
00002b8b62e09000       8 rw--- 0000000000015000 008:00003 libselinux.so.1
00002b8b62e0b000       8 rw--- 00002b8b62e0b000 000:00000   [ anon ]
00002b8b62e0d000     112 r-x-- 0000000000000000 008:00003 libaprutil-1.so.0.2.7
00002b8b62e29000    2044 ----- 000000000001c000 008:00003 libaprutil-1.so.0.2.7
00002b8b63028000       8 rw--- 000000000001b000 008:00003 libaprutil-1.so.0.2.7
00002b8b6302a000      36 r-x-- 0000000000000000 008:00003 libcrypt-2.5.so
00002b8b63033000    2044 ----- 0000000000009000 008:00003 libcrypt-2.5.so
00002b8b63232000       4 r---- 0000000000008000 008:00003 libcrypt-2.5.so
00002b8b63233000       4 rw--- 0000000000009000 008:00003 libcrypt-2.5.so
00002b8b63234000     184 rw--- 00002b8b63234000 000:00000   [ anon ]
00002b8b63262000     224 r-x-- 0000000000000000 008:00003 libldap-2.3.so.0.2.31
00002b8b6329a000    2048 ----- 0000000000038000 008:00003 libldap-2.3.so.0.2.31
00002b8b6349a000       8 rw--- 0000000000038000 008:00003 libldap-2.3.so.0.2.31
00002b8b6349c000       4 rw--- 00002b8b6349c000 000:00000   [ anon ]
00002b8b6349d000      52 r-x-- 0000000000000000 008:00003 liblber-2.3.so.0.2.31
00002b8b634aa000    2048 ----- 000000000000d000 008:00003 liblber-2.3.so.0.2.31
00002b8b636aa000       4 rw--- 000000000000d000 008:00003 liblber-2.3.so.0.2.31
00002b8b636ab000     964 r-x-- 0000000000000000 008:00003 libdb-4.3.so
00002b8b6379c000    2044 ----- 00000000000f1000 008:00003 libdb-4.3.so
00002b8b6399b000      20 rw--- 00000000000f0000 008:00003 libdb-4.3.so
00002b8b639a0000     128 r-x-- 0000000000000000 008:00003 libexpat.so.0.5.0
00002b8b639c0000    2044 ----- 0000000000020000 008:00003 libexpat.so.0.5.0
00002b8b63bbf000      12 rw--- 000000000001f000 008:00003 libexpat.so.0.5.0
00002b8b63bc2000       4 rw--- 00002b8b63bc2000 000:00000   [ anon ]
00002b8b63bc3000     152 r-x-- 0000000000000000 008:00003 libapr-1.so.0.2.7
00002b8b63be9000    2048 ----- 0000000000026000 008:00003 libapr-1.so.0.2.7
00002b8b63de9000       4 rw--- 0000000000026000 008:00003 libapr-1.so.0.2.7
00002b8b63dea000      88 r-x-- 0000000000000000 008:00003 libpthread-2.5.so
00002b8b63e00000    2044 ----- 0000000000016000 008:00003 libpthread-2.5.so
00002b8b63fff000       4 r---- 0000000000015000 008:00003 libpthread-2.5.so
00002b8b64000000       4 rw--- 0000000000016000 008:00003 libpthread-2.5.so
00002b8b64001000      16 rw--- 00002b8b64001000 000:00000   [ anon ]
00002b8b64005000       8 r-x-- 0000000000000000 008:00003 libdl-2.5.so
00002b8b64007000    2048 ----- 0000000000002000 008:00003 libdl-2.5.so
00002b8b64207000       4 r---- 0000000000002000 008:00003 libdl-2.5.so
00002b8b64208000       4 rw--- 0000000000003000 008:00003 libdl-2.5.so
00002b8b64209000       4 rw--- 00002b8b64209000 000:00000   [ anon ]
00002b8b6420a000    1328 r-x-- 0000000000000000 008:00003 libc-2.5.so
00002b8b64356000    2048 ----- 000000000014c000 008:00003 libc-2.5.so
00002b8b64556000      16 r---- 000000000014c000 008:00003 libc-2.5.so
00002b8b6455a000       4 rw--- 0000000000150000 008:00003 libc-2.5.so
00002b8b6455b000      20 rw--- 00002b8b6455b000 000:00000   [ anon ]
00002b8b64560000     236 r-x-- 0000000000000000 008:00003 libsepol.so.1
00002b8b6459b000    2048 ----- 000000000003b000 008:00003 libsepol.so.1
00002b8b6479b000       4 rw--- 000000000003b000 008:00003 libsepol.so.1
00002b8b6479c000      40 rw--- 00002b8b6479c000 000:00000   [ anon ]
00002b8b647a6000      12 r-x-- 0000000000000000 008:00003 libuuid.so.1.2
00002b8b647a9000    2048 ----- 0000000000003000 008:00003 libuuid.so.1.2
00002b8b649a9000       4 rw--- 0000000000003000 008:00003 libuuid.so.1.2
00002b8b649aa000       4 rw--- 00002b8b649aa000 000:00000   [ anon ]
00002b8b649ab000     128 r-x-- 0000000000000000 008:00003 libpq.so.4.1
00002b8b649cb000    2048 ----- 0000000000020000 008:00003 libpq.so.4.1
00002b8b64bcb000       8 rw--- 0000000000020000 008:00003 libpq.so.4.1
00002b8b64bcd000     352 r-x-- 0000000000000000 008:00003 libsqlite3.so.0.8.6
00002b8b64c25000    2048 ----- 0000000000058000 008:00003 libsqlite3.so.0.8.6
00002b8b64e25000       8 rw--- 0000000000058000 008:00003 libsqlite3.so.0.8.6
00002b8b64e27000      68 r-x-- 0000000000000000 008:00003 libresolv-2.5.so
00002b8b64e38000    2048 ----- 0000000000011000 008:00003 libresolv-2.5.so
00002b8b65038000       4 r---- 0000000000011000 008:00003 libresolv-2.5.so
00002b8b65039000       4 rw--- 0000000000012000 008:00003 libresolv-2.5.so
00002b8b6503a000      12 rw--- 00002b8b6503a000 000:00000   [ anon ]
00002b8b6503d000      96 r-x-- 0000000000000000 008:00003 libsasl2.so.2.0.22
00002b8b65055000    2048 ----- 0000000000018000 008:00003 libsasl2.so.2.0.22
00002b8b65255000       4 rw--- 0000000000018000 008:00003 libsasl2.so.2.0.22
00002b8b65256000     272 r-x-- 0000000000000000 008:00003 libssl.so.0.9.8e
00002b8b6529a000    2048 ----- 0000000000044000 008:00003 libssl.so.0.9.8e
00002b8b6549a000      24 rw--- 0000000000044000 008:00003 libssl.so.0.9.8e
00002b8b654a0000    1204 r-x-- 0000000000000000 008:00003 libcrypto.so.0.9.8e
00002b8b655cd000    2044 ----- 000000000012d000 008:00003 libcrypto.so.0.9.8e
00002b8b657cc000     132 rw--- 000000000012c000 008:00003 libcrypto.so.0.9.8e
00002b8b657ed000      20 rw--- 00002b8b657ed000 000:00000   [ anon ]
00002b8b657f2000     580 r-x-- 0000000000000000 008:00003 libkrb5.so.3.3
00002b8b65883000    2048 ----- 0000000000091000 008:00003 libkrb5.so.3.3
00002b8b65a83000      16 rw--- 0000000000091000 008:00003 libkrb5.so.3.3
00002b8b65a87000      84 r-x-- 0000000000000000 008:00003 libnsl-2.5.so
00002b8b65a9c000    2044 ----- 0000000000015000 008:00003 libnsl-2.5.so
00002b8b65c9b000       4 r---- 0000000000014000 008:00003 libnsl-2.5.so
00002b8b65c9c000       4 rw--- 0000000000015000 008:00003 libnsl-2.5.so
00002b8b65c9d000      12 rw--- 00002b8b65c9d000 000:00000   [ anon ]
00002b8b65ca0000     176 r-x-- 0000000000000000 008:00003 libgssapi_krb5.so.2.2
00002b8b65ccc000    2048 ----- 000000000002c000 008:00003 libgssapi_krb5.so.2.2
00002b8b65ecc000       8 rw--- 000000000002c000 008:00003 libgssapi_krb5.so.2.2
00002b8b65ece000       8 r-x-- 0000000000000000 008:00003 libcom_err.so.2.1
00002b8b65ed0000    2044 ----- 0000000000002000 008:00003 libcom_err.so.2.1
00002b8b660cf000       4 rw--- 0000000000001000 008:00003 libcom_err.so.2.1
00002b8b660d0000     144 r-x-- 0000000000000000 008:00003 libk5crypto.so.3.1
00002b8b660f4000    2044 ----- 0000000000024000 008:00003 libk5crypto.so.3.1
00002b8b662f3000       8 rw--- 0000000000023000 008:00003 libk5crypto.so.3.1
00002b8b662f5000       4 rw--- 00002b8b662f5000 000:00000   [ anon ]
00002b8b662f6000      80 r-x-- 0000000000000000 008:00003 libz.so.1.2.3
00002b8b6630a000    2044 ----- 0000000000014000 008:00003 libz.so.1.2.3
00002b8b66509000       4 rw--- 0000000000013000 008:00003 libz.so.1.2.3
00002b8b6650a000      32 r-x-- 0000000000000000 008:00003 libkrb5support.so.0.1
00002b8b66512000    2044 ----- 0000000000008000 008:00003 libkrb5support.so.0.1
00002b8b66711000       4 rw--- 0000000000007000 008:00003 libkrb5support.so.0.1
00002b8b66712000       8 r-x-- 0000000000000000 008:00003 libkeyutils-1.2.so
00002b8b66714000    2044 ----- 0000000000002000 008:00003 libkeyutils-1.2.so
00002b8b66913000       4 rw--- 0000000000001000 008:00003 libkeyutils-1.2.so
00002b8b66914000      12 rw--- 00002b8b66914000 000:00000   [ anon ]
00002b8b66917000       8 r-x-- 0000000000000000 008:00003 mod_auth_basic.so
00002b8b66919000    2044 ----- 0000000000002000 008:00003 mod_auth_basic.so
00002b8b66b18000       8 rw--- 0000000000001000 008:00003 mod_auth_basic.so
00002b8b66b1a000      24 r-x-- 0000000000000000 008:00003 mod_auth_digest.so
00002b8b66b20000    2044 ----- 0000000000006000 008:00003 mod_auth_digest.so
00002b8b66d1f000       8 rw--- 0000000000005000 008:00003 mod_auth_digest.so
00002b8b66d21000       8 r-x-- 0000000000000000 008:00003 mod_authn_file.so
00002b8b66d23000    2044 ----- 0000000000002000 008:00003 mod_authn_file.so
00002b8b66f22000       8 rw--- 0000000000001000 008:00003 mod_authn_file.so
00002b8b66f24000       8 r-x-- 0000000000000000 008:00003 mod_authn_alias.so
00002b8b66f26000    2044 ----- 0000000000002000 008:00003 mod_authn_alias.so
00002b8b67125000       8 rw--- 0000000000001000 008:00003 mod_authn_alias.so
00002b8b67127000       4 r-x-- 0000000000000000 008:00003 mod_authn_anon.so
00002b8b67128000    2048 ----- 0000000000001000 008:00003 mod_authn_anon.so
00002b8b67328000       8 rw--- 0000000000001000 008:00003 mod_authn_anon.so
00002b8b6732a000       4 r-x-- 0000000000000000 008:00003 mod_authn_dbm.so
00002b8b6732b000    2048 ----- 0000000000001000 008:00003 mod_authn_dbm.so
00002b8b6752b000       8 rw--- 0000000000001000 008:00003 mod_authn_dbm.so
00002b8b6752d000       4 r-x-- 0000000000000000 008:00003 mod_authn_default.so
00002b8b6752e000    2044 ----- 0000000000001000 008:00003 mod_authn_default.so
00002b8b6772d000       8 rw--- 0000000000000000 008:00003 mod_authn_default.so
00002b8b6772f000       8 r-x-- 0000000000000000 008:00003 mod_authz_host.so
00002b8b67731000    2044 ----- 0000000000002000 008:00003 mod_authz_host.so
00002b8b67930000       8 rw--- 0000000000001000 008:00003 mod_authz_host.so
00002b8b67932000       4 r-x-- 0000000000000000 008:00003 mod_authz_user.so
00002b8b67933000    2044 ----- 0000000000001000 008:00003 mod_authz_user.so
00002b8b67b32000       8 rw--- 0000000000000000 008:00003 mod_authz_user.so
00002b8b67b34000       8 r-x-- 0000000000000000 008:00003 mod_authz_owner.so
00002b8b67b36000    2044 ----- 0000000000002000 008:00003 mod_authz_owner.so
00002b8b67d35000       8 rw--- 0000000000001000 008:00003 mod_authz_owner.so
00002b8b67d37000       8 r-x-- 0000000000000000 008:00003 mod_authz_groupfile.so
00002b8b67d39000    2044 ----- 0000000000002000 008:00003 mod_authz_groupfile.so
00002b8b67f38000       8 rw--- 0000000000001000 008:00003 mod_authz_groupfile.so
00002b8b67f3a000       8 r-x-- 0000000000000000 008:00003 mod_authz_dbm.so
00002b8b67f3c000    2044 ----- 0000000000002000 008:00003 mod_authz_dbm.so
00002b8b6813b000       8 rw--- 0000000000001000 008:00003 mod_authz_dbm.so
00002b8b6813d000       4 r-x-- 0000000000000000 008:00003 mod_authz_default.so
00002b8b6813e000    2044 ----- 0000000000001000 008:00003 mod_authz_default.so
00002b8b6833d000       8 rw--- 0000000000000000 008:00003 mod_authz_default.so
00002b8b6833f000      44 r-x-- 0000000000000000 008:00003 mod_ldap.so
00002b8b6834a000    2048 ----- 000000000000b000 008:00003 mod_ldap.so
00002b8b6854a000       8 rw--- 000000000000b000 008:00003 mod_ldap.so
00002b8b6854c000      24 r-x-- 0000000000000000 008:00003 mod_authnz_ldap.so
00002b8b68552000    2044 ----- 0000000000006000 008:00003 mod_authnz_ldap.so
00002b8b68751000       8 rw--- 0000000000005000 008:00003 mod_authnz_ldap.so
00002b8b68753000      36 r-x-- 0000000000000000 008:00003 mod_include.so
00002b8b6875c000    2048 ----- 0000000000009000 008:00003 mod_include.so
00002b8b6895c000       8 rw--- 0000000000009000 008:00003 mod_include.so
00002b8b6895e000      20 r-x-- 0000000000000000 008:00003 mod_log_config.so
00002b8b68963000    2044 ----- 0000000000005000 008:00003 mod_log_config.so
00002b8b68b62000       8 rw--- 0000000000004000 008:00003 mod_log_config.so
00002b8b68b64000       8 r-x-- 0000000000000000 008:00003 mod_logio.so
00002b8b68b66000    2044 ----- 0000000000002000 008:00003 mod_logio.so
00002b8b68d65000       8 rw--- 0000000000001000 008:00003 mod_logio.so
00002b8b68d67000       4 r-x-- 0000000000000000 008:00003 mod_env.so
00002b8b68d68000    2048 ----- 0000000000001000 008:00003 mod_env.so
00002b8b68f68000       8 rw--- 0000000000001000 008:00003 mod_env.so
00002b8b68f6a000      16 r-x-- 0000000000000000 008:00003 mod_ext_filter.so
00002b8b68f6e000    2044 ----- 0000000000004000 008:00003 mod_ext_filter.so
00002b8b6916d000       8 rw--- 0000000000003000 008:00003 mod_ext_filter.so
00002b8b6916f000      20 r-x-- 0000000000000000 008:00003 mod_mime_magic.so
00002b8b69174000    2044 ----- 0000000000005000 008:00003 mod_mime_magic.so
00002b8b69373000       8 rw--- 0000000000004000 008:00003 mod_mime_magic.so
00002b8b69375000       8 r-x-- 0000000000000000 008:00003 mod_expires.so
00002b8b69377000    2044 ----- 0000000000002000 008:00003 mod_expires.so
00002b8b69576000       8 rw--- 0000000000001000 008:00003 mod_expires.so
00002b8b69578000      16 r-x-- 0000000000000000 008:00003 mod_deflate.so
00002b8b6957c000    2044 ----- 0000000000004000 008:00003 mod_deflate.so
00002b8b6977b000       8 rw--- 0000000000003000 008:00003 mod_deflate.so
00002b8b6977d000      12 r-x-- 0000000000000000 008:00003 mod_headers.so
00002b8b69780000    2048 ----- 0000000000003000 008:00003 mod_headers.so
00002b8b69980000       8 rw--- 0000000000003000 008:00003 mod_headers.so
00002b8b69982000       8 r-x-- 0000000000000000 008:00003 mod_usertrack.so
00002b8b69984000    2048 ----- 0000000000002000 008:00003 mod_usertrack.so
00002b8b69b84000       8 rw--- 0000000000002000 008:00003 mod_usertrack.so
00002b8b69b86000       8 r-x-- 0000000000000000 008:00003 mod_setenvif.so
00002b8b69b88000    2048 ----- 0000000000002000 008:00003 mod_setenvif.so
00002b8b69d88000       8 rw--- 0000000000002000 008:00003 mod_setenvif.so
00002b8b69d8a000      16 r-x-- 0000000000000000 008:00003 mod_mime.so
00002b8b69d8e000    2044 ----- 0000000000004000 008:00003 mod_mime.so
00002b8b69f8d000       8 rw--- 0000000000003000 008:00003 mod_mime.so
00002b8b69f8f000      84 r-x-- 0000000000000000 008:00003 mod_dav.so
00002b8b69fa4000    2044 ----- 0000000000015000 008:00003 mod_dav.so
00002b8b6a1a3000       8 rw--- 0000000000014000 008:00003 mod_dav.so
00002b8b6a1a5000      16 r-x-- 0000000000000000 008:00003 mod_status.so
00002b8b6a1a9000    2044 ----- 0000000000004000 008:00003 mod_status.so
00002b8b6a3a8000       8 rw--- 0000000000003000 008:00003 mod_status.so
00002b8b6a3aa000      32 r-x-- 0000000000000000 008:00003 mod_autoindex.so
00002b8b6a3b2000    2044 ----- 0000000000008000 008:00003 mod_autoindex.so
00002b8b6a5b1000       8 rw--- 0000000000007000 008:00003 mod_autoindex.so
00002b8b6a5b3000      16 r-x-- 0000000000000000 008:00003 mod_info.so
00002b8b6a5b7000    2044 ----- 0000000000004000 008:00003 mod_info.so
00002b8b6a7b6000       8 rw--- 0000000000003000 008:00003 mod_info.so
00002b8b6a7b8000      44 r-x-- 0000000000000000 008:00003 mod_dav_fs.so
00002b8b6a7c3000    2044 ----- 000000000000b000 008:00003 mod_dav_fs.so
00002b8b6a9c2000       8 rw--- 000000000000a000 008:00003 mod_dav_fs.so
00002b8b6a9c4000       8 r-x-- 0000000000000000 008:00003 mod_vhost_alias.so
00002b8b6a9c6000    2044 ----- 0000000000002000 008:00003 mod_vhost_alias.so
00002b8b6abc5000       8 rw--- 0000000000001000 008:00003 mod_vhost_alias.so
00002b8b6abc7000      28 r-x-- 0000000000000000 008:00003 mod_negotiation.so
00002b8b6abce000    2044 ----- 0000000000007000 008:00003 mod_negotiation.so
00002b8b6adcd000       8 rw--- 0000000000006000 008:00003 mod_negotiation.so
00002b8b6adcf000       8 r-x-- 0000000000000000 008:00003 mod_dir.so
00002b8b6add1000    2044 ----- 0000000000002000 008:00003 mod_dir.so
00002b8b6afd0000       8 rw--- 0000000000001000 008:00003 mod_dir.so
00002b8b6afd2000       8 r-x-- 0000000000000000 008:00003 mod_actions.so
00002b8b6afd4000    2044 ----- 0000000000002000 008:00003 mod_actions.so
00002b8b6b1d3000       8 rw--- 0000000000001000 008:00003 mod_actions.so
00002b8b6b1d5000       8 r-x-- 0000000000000000 008:00003 mod_speling.so
00002b8b6b1d7000    2048 ----- 0000000000002000 008:00003 mod_speling.so
00002b8b6b3d7000       8 rw--- 0000000000002000 008:00003 mod_speling.so
00002b8b6b3d9000       8 r-x-- 0000000000000000 008:00003 mod_userdir.so
00002b8b6b3db000    2044 ----- 0000000000002000 008:00003 mod_userdir.so
00002b8b6b5da000       8 rw--- 0000000000001000 008:00003 mod_userdir.so
00002b8b6b5dc000      12 r-x-- 0000000000000000 008:00003 mod_alias.so
00002b8b6b5df000    2044 ----- 0000000000003000 008:00003 mod_alias.so
00002b8b6b7de000       8 rw--- 0000000000002000 008:00003 mod_alias.so
00002b8b6b7e0000      56 r-x-- 0000000000000000 008:00003 mod_rewrite.so
00002b8b6b7ee000    2044 ----- 000000000000e000 008:00003 mod_rewrite.so
00002b8b6b9ed000       8 rw--- 000000000000d000 008:00003 mod_rewrite.so
00002b8b6b9ef000      72 r-x-- 0000000000000000 008:00003 mod_proxy.so
00002b8b6ba01000    2044 ----- 0000000000012000 008:00003 mod_proxy.so
00002b8b6bc00000       8 rw--- 0000000000011000 008:00003 mod_proxy.so
00002b8b6bc02000      20 r-x-- 0000000000000000 008:00003 mod_proxy_balancer.so
00002b8b6bc07000    2044 ----- 0000000000005000 008:00003 mod_proxy_balancer.so
00002b8b6be06000       8 rw--- 0000000000004000 008:00003 mod_proxy_balancer.so
00002b8b6be08000      28 r-x-- 0000000000000000 008:00003 mod_proxy_ftp.so
00002b8b6be0f000    2044 ----- 0000000000007000 008:00003 mod_proxy_ftp.so
00002b8b6c00e000       8 rw--- 0000000000006000 008:00003 mod_proxy_ftp.so
00002b8b6c010000      28 r-x-- 0000000000000000 008:00003 mod_proxy_http.so
00002b8b6c017000    2044 ----- 0000000000007000 008:00003 mod_proxy_http.so
00002b8b6c216000       8 rw--- 0000000000006000 008:00003 mod_proxy_http.so
00002b8b6c218000       8 r-x-- 0000000000000000 008:00003 mod_proxy_connect.so
00002b8b6c21a000    2044 ----- 0000000000002000 008:00003 mod_proxy_connect.so
00002b8b6c419000       8 rw--- 0000000000001000 008:00003 mod_proxy_connect.so
00002b8b6c41b000      28 r-x-- 0000000000000000 008:00003 mod_cache.so
00002b8b6c422000    2044 ----- 0000000000007000 008:00003 mod_cache.so
00002b8b6c621000       8 rw--- 0000000000006000 008:00003 mod_cache.so
00002b8b6c623000       4 r-x-- 0000000000000000 008:00003 mod_suexec.so
00002b8b6c624000    2048 ----- 0000000000001000 008:00003 mod_suexec.so
00002b8b6c824000       8 rw--- 0000000000001000 008:00003 mod_suexec.so
00002b8b6c826000      16 r-x-- 0000000000000000 008:00003 mod_disk_cache.so
00002b8b6c82a000    2048 ----- 0000000000004000 008:00003 mod_disk_cache.so
00002b8b6ca2a000       8 rw--- 0000000000004000 008:00003 mod_disk_cache.so
00002b8b6ca2c000       8 r-x-- 0000000000000000 008:00003 mod_file_cache.so
00002b8b6ca2e000    2044 ----- 0000000000002000 008:00003 mod_file_cache.so
00002b8b6cc2d000       8 rw--- 0000000000001000 008:00003 mod_file_cache.so
00002b8b6cc2f000      24 r-x-- 0000000000000000 008:00003 mod_mem_cache.so
00002b8b6cc35000    2044 ----- 0000000000006000 008:00003 mod_mem_cache.so
00002b8b6ce34000       8 rw--- 0000000000005000 008:00003 mod_mem_cache.so
00002b8b6ce36000      20 r-x-- 0000000000000000 008:00003 mod_cgi.so
00002b8b6ce3b000    2048 ----- 0000000000005000 008:00003 mod_cgi.so
00002b8b6d03b000       8 rw--- 0000000000005000 008:00003 mod_cgi.so
00002b8b6d03d000       8 r-x-- 0000000000000000 008:00003 mod_version.so
00002b8b6d03f000    2044 ----- 0000000000002000 008:00003 mod_version.so
00002b8b6d23e000       8 rw--- 0000000000001000 008:00003 mod_version.so
00002b8b6d240000    3180 r-x-- 0000000000000000 008:00003 libphp5.so
00002b8b6d55b000    2044 ----- 000000000031b000 008:00003 libphp5.so
00002b8b6d75a000     288 rw--- 000000000031a000 008:00003 libphp5.so
00002b8b6d7a2000      32 rw--- 00002b8b6d7a2000 000:00000   [ anon ]
00002b8b6d7af000     224 r-x-- 0000000000000000 008:00003 libgmp.so.3.3.3
00002b8b6d7e7000    2048 ----- 0000000000038000 008:00003 libgmp.so.3.3.3
00002b8b6d9e7000       4 rw--- 0000000000038000 008:00003 libgmp.so.3.3.3
00002b8b6d9e8000      60 r-x-- 0000000000000000 008:00003 libbz2.so.1.0.3
00002b8b6d9f7000    2044 ----- 000000000000f000 008:00003 libbz2.so.1.0.3
00002b8b6dbf6000       8 rw--- 000000000000e000 008:00003 libbz2.so.1.0.3
00002b8b6dbf8000    1228 r-x-- 0000000000000000 008:00003 libxml2.so.2.6.26
00002b8b6dd2b000    2048 ----- 0000000000133000 008:00003 libxml2.so.2.6.26
00002b8b6df2b000      36 rw--- 0000000000133000 008:00003 libxml2.so.2.6.26
00002b8b6df34000       4 rw--- 00002b8b6df34000 000:00000   [ anon ]
00002b8b6df35000      32 r-x-- 0000000000000000 008:00003 mod_proxy_ajp.so
00002b8b6df3d000    2044 ----- 0000000000008000 008:00003 mod_proxy_ajp.so
00002b8b6e13c000       8 rw--- 0000000000007000 008:00003 mod_proxy_ajp.so
00002b8b6e143000      40 r-x-- 0000000000000000 008:00003 libnss_files-2.5.so
00002b8b6e14d000    2044 ----- 000000000000a000 008:00003 libnss_files-2.5.so
00002b8b6e34c000       4 r---- 0000000000009000 008:00003 libnss_files-2.5.so
00002b8b6e34d000       4 rw--- 000000000000a000 008:00003 libnss_files-2.5.so
00002b8b6e34e000      84 r-x-- 0000000000000000 008:00003 apc.so
00002b8b6e363000    2048 ----- 0000000000015000 008:00003 apc.so
00002b8b6e563000       8 rw--- 0000000000015000 008:00003 apc.so
00002b8b6e565000      32 rw--- 00002b8b6e565000 000:00000   [ anon ]
00002b8b6e572000      28 r-x-- 0000000000000000 008:00003 librt-2.5.so
00002b8b6e579000    2048 ----- 0000000000007000 008:00003 librt-2.5.so
00002b8b6e779000       4 r---- 0000000000007000 008:00003 librt-2.5.so
00002b8b6e77a000       4 rw--- 0000000000008000 008:00003 librt-2.5.so
00002b8b6e77b000      56 r-x-- 0000000000000000 008:00003 curl.so
00002b8b6e789000    2044 ----- 000000000000e000 008:00003 curl.so
00002b8b6e988000       8 rw--- 000000000000d000 008:00003 curl.so
00002b8b6e98f000     236 r-x-- 0000000000000000 008:00003 libcurl.so.3.0.0
00002b8b6e9ca000    2048 ----- 000000000003b000 008:00003 libcurl.so.3.0.0
00002b8b6ebca000       8 rw--- 000000000003b000 008:00003 libcurl.so.3.0.0
00002b8b6ebcc000     196 r-x-- 0000000000000000 008:00003 libidn.so.11.5.19
00002b8b6ebfd000    2044 ----- 0000000000031000 008:00003 libidn.so.11.5.19
00002b8b6edfc000       4 rw--- 0000000000030000 008:00003 libidn.so.11.5.19
00002b8b6edfd000      28 r-x-- 0000000000000000 008:00003 dbase.so
00002b8b6ee04000    2048 ----- 0000000000007000 008:00003 dbase.so
00002b8b6f004000       4 rw--- 0000000000007000 008:00003 dbase.so
00002b8b6f005000     156 r-x-- 0000000000000000 008:00003 dom.so
00002b8b6f02c000    2044 ----- 0000000000027000 008:00003 dom.so
00002b8b6f22b000      24 rw--- 0000000000026000 008:00003 dom.so
00002b8b6f231000       4 rw--- 00002b8b6f231000 000:00000   [ anon ]
00002b8b6f232000      28 r-x-- 0000000000000000 008:00003 json.so
00002b8b6f239000    2044 ----- 0000000000007000 008:00003 json.so
00002b8b6f438000       4 rw--- 0000000000006000 008:00003 json.so
00002b8b6f439000    1944 r-x-- 0000000000000000 008:00003 mbstring.so
00002b8b6f61f000    2048 ----- 00000000001e6000 008:00003 mbstring.so
00002b8b6f81f000      36 rw--- 00000000001e6000 008:00003 mbstring.so
00002b8b6f828000      44 r-x-- 0000000000000000 008:00003 mysql.so
00002b8b6f833000    2044 ----- 000000000000b000 008:00003 mysql.so
00002b8b6fa32000       8 rw--- 000000000000a000 008:00003 mysql.so
00002b8b6fa39000    1220 r-x-- 0000000000000000 008:00003 libmysqlclient.so.16.0.0
00002b8b6fb6a000    2044 ----- 0000000000131000 008:00003 libmysqlclient.so.16.0.0
00002b8b6fd69000     308 rw--- 0000000000130000 008:00003 libmysqlclient.so.16.0.0
00002b8b6fdb6000       4 rw--- 00002b8b6fdb6000 000:00000   [ anon ]
00002b8b6fdb7000     104 r-x-- 0000000000000000 008:00003 mysqli.so
00002b8b6fdd1000    2044 ----- 000000000001a000 008:00003 mysqli.so
00002b8b6ffd0000      12 rw--- 0000000000019000 008:00003 mysqli.so
00002b8b6ffd3000       4 rw--- 00002b8b6ffd3000 000:00000   [ anon ]
00002b8b6ffd4000      88 r-x-- 0000000000000000 008:00003 pdo.so
00002b8b6ffea000    2048 ----- 0000000000016000 008:00003 pdo.so
00002b8b701ea000      12 rw--- 0000000000016000 008:00003 pdo.so
00002b8b701ed000      24 r-x-- 0000000000000000 008:00003 pdo_mysql.so
00002b8b701f3000    2048 ----- 0000000000006000 008:00003 pdo_mysql.so
00002b8b703f3000       4 rw--- 0000000000006000 008:00003 pdo_mysql.so
00002b8b703f4000      20 r-x-- 0000000000000000 008:00003 pdo_sqlite.so
00002b8b703f9000    2048 ----- 0000000000005000 008:00003 pdo_sqlite.so
00002b8b705f9000       4 rw--- 0000000000005000 008:00003 pdo_sqlite.so
00002b8b705fa000      64 r-x-- 0000000000000000 008:00003 sqlite.so
00002b8b7060a000    2044 ----- 0000000000010000 008:00003 sqlite.so
00002b8b70809000       8 rw--- 000000000000f000 008:00003 sqlite.so
00002b8b70810000     284 r-x-- 0000000000000000 008:00003 libsqlite.so.0.8.6
00002b8b70857000    2044 ----- 0000000000047000 008:00003 libsqlite.so.0.8.6
00002b8b70a56000      12 rw--- 0000000000046000 008:00003 libsqlite.so.0.8.6
00002b8b70a59000      28 r-x-- 0000000000000000 008:00003 wddx.so
00002b8b70a60000    2048 ----- 0000000000007000 008:00003 wddx.so
00002b8b70c60000       4 rw--- 0000000000007000 008:00003 wddx.so
00002b8b70c61000      28 r-x-- 0000000000000000 008:00003 xmlreader.so
00002b8b70c68000    2044 ----- 0000000000007000 008:00003 xmlreader.so
00002b8b70e67000       8 rw--- 0000000000006000 008:00003 xmlreader.so
00002b8b70e69000      28 r-x-- 0000000000000000 008:00003 xmlwriter.so
00002b8b70e70000    2044 ----- 0000000000007000 008:00003 xmlwriter.so
00002b8b7106f000       8 rw--- 0000000000006000 008:00003 xmlwriter.so
00002b8b71071000      28 r-x-- 0000000000000000 008:00003 xsl.so
00002b8b71078000    2044 ----- 0000000000007000 008:00003 xsl.so
00002b8b71277000       4 rw--- 0000000000006000 008:00003 xsl.so
00002b8b7127d000      68 r-x-- 0000000000000000 008:00003 libexslt.so.0.8.13
00002b8b7128e000    2048 ----- 0000000000011000 008:00003 libexslt.so.0.8.13
00002b8b7148e000       4 rw--- 0000000000011000 008:00003 libexslt.

使用預設的 http.conf(或非常接近它)實際上通常是一件好事。你會驚訝於這個 apache 開發人員和 redhat 工程師比我們大多數人要好得多 :)

首先,如果這聽起來很愚蠢,我深表歉意,但是您確定 nginx 是在apache*前面配置的嗎?*我無法告訴你有多少次我看到人們閱讀了一篇推薦 nginx 的部落格文章,然後將他們現有的 apache 設置為 mod_proxy /images 回到 nginx。

其次,大多數 apache 模組,尤其是 redhat/centos 建構中的模組,都非常適合使用共享庫和 apr 執行時,因此它們不太可能讓你買太多評論它們。

我認為您可能想要查看的最大的東西是 php op 記憶體。它可以對 php 腳本的性能和突發記憶體使用產生巨大影響。幸運的是,作為 CentOS 使用者,您可以設置 EPEL 儲存庫和“yum install php-pecl-apc”並立即進行設置。看看這有什麼幫助。

引用自:https://serverfault.com/questions/72177