Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 21359 invoked from network); 1 Jul 2007 18:18:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jul 2007 18:18:34 -0000 Received: (qmail 91329 invoked by uid 500); 1 Jul 2007 18:18:22 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 91136 invoked by uid 500); 1 Jul 2007 18:18:22 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 91125 invoked by uid 99); 1 Jul 2007 18:18:21 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jul 2007 11:18:21 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of jultus@gmail.com designates 64.233.166.176 as permitted sender) Received: from [64.233.166.176] (HELO py-out-1112.google.com) (64.233.166.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jul 2007 11:18:13 -0700 Received: by py-out-1112.google.com with SMTP id u52so2518346pyb for ; Sun, 01 Jul 2007 11:17:52 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=kQPArfu4gSHfOmUmZNmnXIFu4gyPULTec3oqi274qJxYLoOxuFS4ucuAlLDJPxpv2pjJ5ATbvRoDCjhOtTOMdEugi4lUZaT5C1oAyNAmhKI9HAGu6sIsWssxpu3vMaRspn1C0/l+SC0RGMi5qFlyyjavSrMhEhdvDGPzQG5d+38= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=lQUsmVo2U2fUMzbOJbrtHBELriKXIW50HgWvADBiyVu6grGnl+0kDoPVook+qQMxA6dt0HeBWo3ywJ8hz8YTjEJAylUi3xZhSSCYIzXurpWTz2Q0s5ZSiOcSJhssDu9Da/ndP8zPtMFhMZjUrV4u5x0VfEX9F+u34m/5+rhi0gQ= Received: by 10.141.108.21 with SMTP id k21mr1251802rvm.1183313872313; Sun, 01 Jul 2007 11:17:52 -0700 (PDT) Received: by 10.141.175.5 with HTTP; Sun, 1 Jul 2007 11:17:52 -0700 (PDT) Message-ID: Date: Sun, 1 Jul 2007 20:17:52 +0200 From: "Julius Thyssen" To: users@httpd.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] performance and mod_deflate optimization Hi, I'm trying to optimize speed by using mod_deflate on a particular personal server. It runs Apache httpd 2.052+ and PHP Version 5.1.6, with eaccellerator, on Linux 2.6.9-023stab033.6 SMP kernel for CentOS 4.5. Roughly, it serves 5 websites, combined they get about 1 real human visit each second in total (excluding redirected hits, blocked spammers/IPs/robots/spiders). One of the sites is behind SSL, for squirrelmail webmail. Most filetypes it serves are php (flatfile non-mysql weblogs), a few text and .htm* files, a very small cgi-script here and there (and a couple of imagefiles, avi's and mp3's, but not very much). Bandwidth/traffic are no problem factors for this server, it runs with a 100 mbit NIC to the net, and I can use it wide-open. Currently it uses about 210 MB of DDR3, and I have at least another 128 MB of RAM left, and CPU also has room to do more. >From the current httpd.conf : # added gzip for mod_deflate: # SetOutputFilter DEFLATE BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|wav|mp3|ogg|bmp|avi|mpg)$ no-gzip dont-vary Header append Vary User-Agent env=!dont-vary DeflateCompressionLevel 5 DeflateMemLevel 9 DeflateWindowSize 14 # #AddOutputFilterByType DEFLATE text/html text/plain text/xml (When I uncomment the Location tags, Apache won't start. Haven't figured out why, but doesn't seem to matter, since I'm running it for all the sites anyway.) This httpd.conf has had a pretty long life, so I forgot much of what I've changed over the years. But I was wondering how I could better load speeds for php webpages using mod_deflate, and also, handy pointers on how to best measure this perhaps, although I don't have very much time to spend on that. I just wonder if any of you sees really strange or bad general config values. For that I'm posting some other more or less crucial values from the same conf: Timeout 120 KeepAlive On MaxKeepAliveRequests 60 KeepAliveTimeout 22 # SendBufferSize 16384 StartServers 8 MinSpareServers 4 MaxSpareServers 16 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 800 StartServers 4 MaxClients 128 MinSpareThreads 16 MaxSpareThreads 70 ThreadsPerChild 24 MaxRequestsPerChild 800 LoadModule access_module modules/mod_access.so LoadModule auth_module modules/mod_auth.so LoadModule auth_anon_module modules/mod_auth_anon.so LoadModule auth_dbm_module modules/mod_auth_dbm.so LoadModule auth_digest_module modules/mod_auth_digest.so LoadModule ldap_module modules/mod_ldap.so #LoadModule auth_ldap_module modules/mod_auth_ldap.so #LoadModule include_module modules/mod_include.so LoadModule log_config_module modules/mod_log_config.so LoadModule env_module modules/mod_env.so LoadModule mime_magic_module modules/mod_mime_magic.so #LoadModule cern_meta_module modules/mod_cern_meta.so LoadModule expires_module modules/mod_expires.so LoadModule deflate_module modules/mod_deflate.so LoadModule headers_module modules/mod_headers.so #LoadModule usertrack_module modules/mod_usertrack.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule mime_module modules/mod_mime.so #LoadModule dav_module modules/mod_dav.so #LoadModule status_module modules/mod_status.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule asis_module modules/mod_asis.so #LoadModule info_module modules/mod_info.so #LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule vhost_alias_module modules/mod_vhost_alias.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule dir_module modules/mod_dir.so LoadModule imap_module modules/mod_imap.so LoadModule actions_module modules/mod_actions.so LoadModule speling_module modules/mod_speling.so CheckSpelling on #LoadModule userdir_module modules/mod_userdir.so LoadModule alias_module modules/mod_alias.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule cache_module modules/mod_cache.so LoadModule suexec_module modules/mod_suexec.so LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule file_cache_module modules/mod_file_cache.so LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule cgi_module modules/mod_cgi.so # added april 2007: LoadFile /usr/lib/libxml2.so LoadModule unique_id_module modules/mod_unique_id.so LoadModule security2_module modules/mod_security2.so #LoadModule evasive20_module modules/mod_evasive20.so Those last ones I'm still experimenting with. For now I use mod_security with only very basic defaults. This server doesn't really suffer from DDoS attacks often. Any advice or improvements highly appreciated. Regards, Julius --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org