|
ru.linux- RU.LINUX --------------------------------------------------------------------- From : Sergey N Osipov 2:5090/33.12 28 Oct 2004 01:04:47 To : All Subject : Apache1.3.31+PHP4.3.9 vs Apache2.0.47+PHP4.3.4 -------------------------------------------------------------------------------- ниже (httpd.conf & php.ini)... Посмотрел результат работы... ab из комплекта Apache 1 1 ./ab -v 4 -n 10000 -c 5 http://localhost/xml2.rar 1>bench1_1.txt 2>bench2_1.txt *Apache 1* Time taken for tests: 64.517 seconds Requests per second: 155.00 [#/sec] (mean) Time per request: 32.26 [ms] (mean) Time per request: 6.45 [ms] (mean, across all concurrent requests) Transfer rate: 12631.21 [Kbytes/sec] received *Apache 2* Time taken for tests: 42.474 seconds !!! *Requests per second: 235.44 [#/sec] (mean)* Time per request: 21.24 [ms] (mean) Time per request: 4.25 [ms] (mean, across all concurrent requests) !!! *Transfer rate: 19180.27 [Kbytes/sec] received* !!! IMHO Transfer rate для Apache 1 должен быть больше чем у Apache 2 ??? 2 ./ab -v 4 -n 10000 -c 5 http://localhost/test_zoo/test.php 1>bench1_3.txt 2>bench2_3.txt Тут вообще ужас !!! *Apache 1* Time taken for tests: 1695.223 seconds Requests per second: 5.90 [#/sec] (mean) Time per request: 847.61 [ms] (mean) Time per request: 169.52 [ms] (mean, across all concurrent requests) Transfer rate: 1.05 [Kbytes/sec] received *Apache 2* !!! *Time taken for tests: 132.401 seconds* Requests per second: 75.53 [#/sec] (mean) Time per request: 66.20 [ms] (mean) Time per request: 13.24 [ms] (mean, across all concurrent requests) !!! *Transfer rate: 16.54 [Kbytes/sec] received* !!! IMHO Должно быть наоборот... или я не прав ??? PHP 4.3.9 собирал так : ... может в CFLAGS дело ??? Если не сложно разъясните подробнее... ----------------------------------------------------------------------------- CFLAGS="-O3 -g -fomit-frame-pointer -fno-strength-reduce -mcpu=i586 -march=i586 -mmmx -malign-functions=4 -funroll-loops -fexpensive-optimizations -fschedule-insns2 -Wall -mfancy-math-387 -pipe -mpreferred-stack-boundary=2" ./configure \ --prefix=/opt/httpd \ --sysconfdir=/etc/httpd/conf \ --mandir=/usr/man \ --with-apache=../apache_1.3.31 \ --disable-cgi \ --disable-path-info-check \ --with-config-file-path=/etc/httpd/conf \ --enable-sigchild \ --disable-short-tags \ --without-openssl \ --with-zlib=/usr \ --with-zlib-dir=/usr/lib \ --disable-bcmath \ --with-bz2=/usr \ --disable-calendar \ --with-curl=/usr/local/lib/libcurl \ --disable-dba \ --disable-dio \ --with-dom=/usr/lib \ --disable-exif \ --disable-filepro \ --disable-ftp \ --with-gd=/usr \ --with-jpeg-dir=/usr/lib \ --with-png-dir=/usr/lib \ --with-xpm-dir=/usr/X11R6/lib \ --with-ttf=/usr/lib \ --with-freetype-dir=/usr/lib \ --with-t1lib=/usr/lib \ --enable-gd-native-ttf \ --without-gettext \ --disable-mbstring \ --disable-mbregex \ --with-mcrypt=/usr \ --without-mhash \ --without-mime-magic \ --without-ming \ --without-mysql \ --without-mysql-sock \ --without-ncurses \ --with-oci8=/u01/app/oracle/product/8.1.7 \ --without-iodbc \ --without-pdflib \ --with-pgsql=/usr \ --disable-posix \ --without-qtdom \ --without-libedit \ --without-readline \ --without-recode \ --with-mm=/usr \ --disable-shmop \ --disable-sockets \ --without-swf \ --disable-sysvmsg \ --disable-sysvsem \ --disable-sysvshm \ --disable-tokenizer \ --disable-wddx \ --enable-xml \ --with-expat-dir=/usr \ --disable-xslt \ --with-pear=/var/www/include/pear \ --with-gnu-ld \ --enable-zend-multibyte \ --enable-static=yes ----------------------------------------------------------------------------- Apache 1.3.31 так : ----------------------------------------------------------------------------- SSL_BASE=/usr \ EAPI_MM=SYSTEM \ CFLAGS="-DBUFFERED_LOGS -O3 -g -fomit-frame-pointer -fno-strength-reduce -mcpu=i586 -march=i586 -mmmx -malign-functions=4 -funroll-loops -fexpensive-optimizations -fschedule-insns2 -Wall -mfancy-math-387 -pipe -mpreferred-stack-boundary=2" ./configure \ --target="httpd" \ --prefix=/opt/httpd \ --exec-prefix=/opt/httpd \ --sbindir=/opt/httpd/bin \ --mandir=/usr/man \ --sysconfdir=/etc/httpd/conf \ --runtimedir=/var/run/httpd \ --logfiledir=/var/log/httpd \ --enable-rule=DEV_RANDOM \ --enable-rule=WANTHSREGEX \ --enable-rule=EAPI \ --enable-rule=SSL_EXPERIMENTAL \ --disable-rule=PARANOID \ --disable-rule=EXPAT \ --disable-rule=SOCKS5 \ --disable-rule=SOCKS4 \ --disable-rule=SHARED_CHAIN \ --disable-rule=SHARED_CORE \ --disable-rule=CYGWIN_WINSOCK \ --disable-rule=IRIXN32 \ --disable-rule=IRIXNIS \ --disable-rule=SSL_COMPAT \ --disable-rule=SSL_CONSERVATIVE \ --disable-rule=SSL_VENDOR \ --enable-module=ssl \ --enable-module=mime_magic \ --enable-module=mime \ --enable-module=negotiation \ --enable-module=mmap_static \ --enable-module=log_config \ --enable-module=dir \ --enable-module=include \ --enable-module=rewrite \ --enable-module=access \ --enable-module=log_forensic \ --enable-module=unique_id \ --enable-module=setenvif \ --disable-module=alias \ --disable-module=vhost_alias \ --disable-module=env \ --disable-module=so \ --disable-module=log_agent \ --disable-module=log_referer \ --disable-module=status \ --disable-module=info \ --disable-module=speling \ --disable-module=userdir \ --disable-module=example \ --disable-module=proxy \ --disable-module=autoindex \ --disable-module=auth \ --disable-module=auth_dbm \ --disable-module=auth_db \ --disable-module=auth_anon \ --disable-module=digest \ --disable-module=auth_digest \ --disable-module=asis \ --disable-module=cgi \ --disable-module=actions \ --disable-module=cern_meta \ --disable-module=headers \ --disable-module=expires \ --disable-module=imap \ --disable-module=usertrack \ --disable-shared=all \ --activate-module=src/modules/php4/libphp4.a \ --with-perl=/usr/bin \ --with-port=80 \ --server-uid=nobody \ --server-gid=nobody ----------------------------------------------------------------------------- Различие в настройках... Apache1+PHP4.3.9 и Apache2+PHP4.3.4 ----------------------------------------------------------------------------- diff -ur ./apache1/httpd.conf.out ./apache2/httpd.conf.out -+- ./apache1/httpd.conf.out Wed Oct 27 14:30:51 2004 +++ ./apache2/httpd.conf.out Wed Oct 27 14:42:49 2004 @@ -1,96 +1,179 @@ -ServerType standalone ServerRoot "/opt/httpd" -LockFile /var/run/httpd/httpd.lock -PidFile /var/run/httpd/httpd.pid -ScoreBoardFile /var/run/httpd/httpd.scoreboard -ResourceConfig /dev/null -AccessConfig /dev/null -Timeout 66 +<IfModule !mpm_winnt.c> +<IfModule !mpm_netware.c> +</IfModule> +</IfModule> +<IfModule !mpm_netware.c> +<IfModule !perchild.c> +</IfModule> +</IfModule> +<IfModule !mpm_netware.c> +PidFile logs/httpd.pid +</IfModule> +Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 -MinSpareServers 5 -MaxSpareServers 10 -StartServers 5 -MaxClients 150 -MaxRequestsPerChild 0 -Port 80 -<IfDefine SSL> +<IfModule prefork.c> +StartServers 5 +MinSpareServers 5 +MaxSpareServers 10 +MaxClients 150 +MaxRequestsPerChild 0 +</IfModule> +<IfModule worker.c> +StartServers 2 +MaxClients 150 +MinSpareThreads 25 +MaxSpareThreads 75 +ThreadsPerChild 25 +MaxRequestsPerChild 0 +</IfModule> +<IfModule perchild.c> +NumServers 5 +StartThreads 5 +MinSpareThreads 5 +MaxSpareThreads 10 +MaxThreadsPerChild 20 +MaxRequestsPerChild 0 +</IfModule> +<IfModule mpm_winnt.c> +ThreadsPerChild 250 +MaxRequestsPerChild 0 +</IfModule> +<IfModule beos.c> +StartThreads 10 +MaxClients 50 +MaxRequestsPerThread 10000 +</IfModule> +<IfModule mpm_netware.c> +ThreadStackSize 65536 +StartThreads 250 +MinSpareThreads 25 +MaxSpareThreads 250 +MaxThreads 1000 +MaxRequestsPerChild 0 +</IfModule> +<IfModule mpmt_os2.c> +StartServers 2 +MinSpareThreads 5 +MaxSpareThreads 10 +MaxRequestsPerChild 0 +</IfModule> Listen 80 -Listen 443 +LoadModule access_module modules/mod_access.so +LoadModule auth_digest_module modules/mod_auth_digest.so +LoadModule ext_filter_module modules/mod_ext_filter.so +LoadModule include_module modules/mod_include.so +LoadModule log_config_module modules/mod_log_config.so +LoadModule logio_module modules/mod_logio.so +LoadModule env_module modules/mod_env.so +LoadModule mime_magic_module modules/mod_mime_magic.so +LoadModule headers_module modules/mod_headers.so +LoadModule unique_id_module modules/mod_unique_id.so +LoadModule setenvif_module modules/mod_setenvif.so +<IfDefine SSL> +LoadModule ssl_module modules/mod_ssl.so </IfDefine> -User nobody +LoadModule mime_module modules/mod_mime.so +LoadModule negotiation_module modules/mod_negotiation.so +LoadModule dir_module modules/mod_dir.so +LoadModule rewrite_module modules/mod_rewrite.so +LoadModule php4_module modules/libphp4.so +Header unset Server +RequestHeader unset Server +<IfModule !mpm_winnt.c> +<IfModule !mpm_netware.c> +User nobody Group nobody -ServerName localhost +</IfModule> +</IfModule> +ServerName localhost:80 RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] -LimitRequestBody 2560000 -DocumentRoot "/var/www" +UseCanonicalName Off +DocumentRoot "/var/nosecwww" <Directory /> Options FollowSymLinks AllowOverride None Options +Includes </Directory> -<IfModule mod_dir.c> - DirectoryIndex index.html index.asp index.php index.htm -</IfModule> +<Directory "/var/nosecwww"> + Options Indexes FollowSymLinks + AllowOverride None + Order allow,deny + Allow from all +</Directory> +DirectoryIndex index.html index.html.var index.xml AccessFileName .htaccess <Files ~ "^\.ht"> Order allow,deny Deny from all - Satisfy All </Files> -UseCanonicalName Off -<IfModule mod_mime.c> -</IfModule> +TypesConfig /etc/httpd/conf/mime.types DefaultType text/plain <IfModule mod_mime_magic.c> + MIMEMagicFile /etc/httpd/conf/magic </IfModule> HostnameLookups Off -ErrorLog /var/log/httpd/error_log -LogLevel error +ErrorLog logs/error_log +LogLevel warn +LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%h %l %u %t \"%r\" %>s %b" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent +CustomLog logs/access_log common +CustomLog logs/referer_log referer +CustomLog logs/agent_log agent ServerTokens Prod ServerSignature Off +<IfModule mod_cgid.c> +</IfModule> +AddEncoding x-compress Z +AddEncoding x-gzip gz tgz +DefaultLanguage ru +AddLanguage ru .ru +LanguagePriority ru +ForceLanguagePriority Prefer Fallback +AddDefaultCharset KOI8-r +AddCharset KOI8-r .koi8-r .koi8-ru +AddType application/x-tar .tgz +AddType image/x-icon .ico +AddHandler type-map var +AddType text/html .shtml +AddOutputFilter INCLUDES .shtml +BrowserMatch "Mozilla/2" nokeepalive +BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 +BrowserMatch "RealPlayer 4\.0" force-response-1.0 +BrowserMatch "Java/1\.0" force-response-1.0 +BrowserMatch "JDK/1\.0" force-response-1.0 +BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully +BrowserMatch "^WebDrive" redirect-carefully +BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully +BrowserMatch "^gnome-vfs" redirect-carefully +<IfModule mod_ssl.c> + Include /etc/httpd/conf/ssl.conf +</IfModule> <IfModule mod_mime.c> - DefaultLanguage ru - AddLanguage ru .ru - AddDefaultCharset KOI8-R - AddCharset KOI8-R .koi8-r - <IfModule mod_negotiation.c> - LanguagePriority ru - </IfModule> - AddType application/x-tar .tgz - AddEncoding x-compress .Z - AddEncoding x-gzip .gz .tgz - AddType text/html .shtml - AddHandler server-parsed .shtml - AddType application/x-httpd-php .php .asp -</IfModule> -<IfModule mod_setenvif.c> - BrowserMatch "Mozilla/2" nokeepalive - BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 - BrowserMatch "RealPlayer 4\.0" force-response-1.0 - BrowserMatch "Java/1\.0" force-response-1.0 - BrowserMatch "JDK/1\.0" force-response-1.0 + AddType application/x-httpd-php .php .asp + AddType application/x-httpd-php-source .phps .sasp </IfModule> <IfDefine SSL> +Listen 443 AddType application/x-x509-ca-cert .crt AddType application/x-pkcs7-crl .crl -</IfDefine> -<IfModule mod_ssl.c> SSLPassPhraseDialog builtin -SSLSessionCache dbm:/var/run/httpd/ssl_scache +SSLSessionCache dbm:logs/ssl_scache SSLSessionCacheTimeout 300 -SSLMutex file:/var/run/httpd/ssl_mutex +SSLMutex file:logs/ssl_mutex SSLRandomSeed startup file:/dev/urandom 512 SSLRandomSeed connect file:/dev/urandom 512 -</IfModule> -<IfDefine SSL> <VirtualHost _default_:443> DocumentRoot "/var/www" -ServerName localhost -ErrorLog /var/log/httpd/error_log +ServerName localhost:443 +ErrorLog logs/error_log +TransferLog logs/access_log RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] diff -ur ./apache1/php.ini.out ./apache2/php.ini.out -+- ./apache1/php.ini.out Wed Oct 27 14:32:54 2004 +++ ./apache2/php.ini.out Wed Oct 27 14:35:37 2004 @@ -16,7 +16,7 @@ safe_mode_exec_dir = safe_mode_allowed_env_vars = PHP_ safe_mode_protected_env_vars = LD_LIBRARY_PATH -open_basedir = /var/www +open_basedir = disable_functions = disable_classes = expose_php = Off @@ -32,9 +32,9 @@ ignore_repeated_source = Off report_memleaks = On track_errors = On -error_log = /var/log/httpd/php_error_log +error_log = /opt/httpd/logs/php_errors variables_order = "GPCS" -register_globals = Off +register_globals=Off register_argc_argv = Off post_max_size = 8M gpc_order = "GPC" @@ -45,21 +45,34 @@ auto_append_file = default_mimetype = "text/html" default_charset = "koi8-r" -include_path = ".:/var/www/include:/opt/httpd/pear" -doc_root = "/var/www" +include_path = "/var/www/include:/opt/httpd/lib/php" +doc_root = user_dir = -enable_dl = Off +extension_dir = "/opt/httpd/lib/extensions/no-debug-non-zts-20020429" +enable_dl = On ignore_user_abort off file_uploads = On upload_tmp_dir = /var/www/tmp upload_max_filesize = 2M allow_url_fopen = On default_socket_timeout = 60 +extension=bz2.so +extension=domxml.so +extension=gd.so +extension=gettext.so +extension=mcrypt.so +extension=mhash.so +extension=ming.so +extension=ncurses.so +extension=oci8.so +extension=pdf.so +extension=recode.so +extension=swf.so ----------------------------------------------------------------------------- С уважением, *Sergey* --- ifmail v.2.14.os-p7+ * Origin: --- (2:5090/33.12) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.linux/23721418053cb.html, оценка из 5, голосов 10
|