Obciążaja skrypty php na www
na www jest suexec średnio maksywalne 25 - 30 wywołań na sekundę ok 500tys na dzień +- 100tys w zależności od dnia
Większość zapytań jest w cache za pomocą Cache_Lite (biblioteka pear) + autorska klasa do cacheowania zapytań sqli i tablic.
konfiguracja Apache
LoadModule authz_host_module libexec/apache22/mod_authz_host.so
LoadModule deflate_module libexec/apache22/mod_deflate.so
LoadModule log_config_module libexec/apache22/mod_log_config.so
LoadModule logio_module libexec/apache22/mod_logio.so
LoadModule env_module libexec/apache22/mod_env.so
LoadModule expires_module libexec/apache22/mod_expires.so
LoadModule headers_module libexec/apache22/mod_headers.so
LoadModule unique_id_module libexec/apache22/mod_unique_id.so
LoadModule setenvif_module libexec/apache22/mod_setenvif.so
LoadModule mime_module libexec/apache22/mod_mime.so
LoadModule autoindex_module libexec/apache22/mod_autoindex.so
LoadModule suexec_module libexec/apache22/mod_suexec.so
LoadModule cgi_module libexec/apache22/mod_cgi.so
LoadModule cgid_module libexec/apache22/mod_cgid.so
LoadModule vhost_alias_module libexec/apache22/mod_vhost_alias.so
LoadModule negotiation_module libexec/apache22/mod_negotiation.so
LoadModule dir_module libexec/apache22/mod_dir.so
LoadModule imagemap_module libexec/apache22/mod_imagemap.so
LoadModule actions_module libexec/apache22/mod_actions.so
LoadModule alias_module libexec/apache22/mod_alias.so
LoadModule rewrite_module libexec/apache22/mod_rewrite.so
LoadModule file_cache_module libexec/apache22/mod_file_cache.so
<Directory "/home/*/docs">
<Limit GET POST>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User www
Group www
</IfModule>
</IfModule>
<Directory />
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/usr/local/www/apache22/data">
Options -Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.htm index.html index.php index.php5
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
ErrorLog "/var/log/httpd-error2.log"
<IfModule log_config_module>
SetEnvIfNoCase Request_URI "\.gif$|\.jpg$|\.jpeg$|\.png$|\.js$|\.ico$|\.css$" NOLOG
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" %T %V \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "/var/log/httpd-access2.log" combined env=!NOLOG
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/usr/local/www/apache22/cgi-bin/"
</IfModule>
<Directory "/usr/local/www/apache22/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DefaultType text/plain
<IfModule mime_module>
TypesConfig etc/apache22/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
EnableMMAP off
EnableSendfile off
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
Timeout 90
KeepAlive Off
MaxKeepAliveRequests 80
KeepAliveTimeout 2
UseCanonicalName Off
AccessFileName .htaccess
ServerTokens Prod
ServerSignature On
HostnameLookups Off
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 25
MaxClients 200
MaxRequestsPerChild 4000
</IfModule>
Jeśli chodzi o ram
www : Mem: 104M Active, 1271M Inact, 397M Wired, 81M Cache, 213M Buf, 120M Free
sql : Mem: 137M Active, 1273M Inact, 419M Wired, 69M Cache, 213M Buf, 78M Free
d.jpg obciązenie CPU serwer www
d2.jpg obciązenie CPU serwer sql
wykresy są robione od 12:30 do 12:30 następnego dnia