httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yvo van Doorn" <yvo.vando...@gmail.com>
Subject Re: [users@httpd] Apache 2.2 utilize more physical memory than apache 1.3
Date Tue, 27 Feb 2007 04:25:09 GMT
On 2/26/07, arun kumar <arun.apache@yahoo.com> wrote:
> Hi All,
>
> We are in the process of moving apache 1.3 to apache 2.2....we migrated and
> done the load testing and monitoring....we find that in apache 2.2 physical
> memory usage is more than apache 1.3....we added cache and deflate module in
> apache 2.2.
>
> Below find my apache 1.3 and 2.2 httpd.conf file.
>
> Apache 1.3 httpd.conf
>
> ##
> ## httpd.conf -- Apache HTTP server configuration file
> ##
> ##
> ## Server/instance-specific base configuration settings
> ##
> ServerType standalone
> ServerRoot "/local/apache/aws"
> PidFile /var/run/httpd.pid
> User kumarar3
> Group eadmin
> Timeout 300
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
> StartServers 5
> MinSpareServers 5
> MaxSpareServers 10
> MaxClients 150
> MaxRequestsPerChild 0
> HostnameLookups Off
> ##
> ## Dynamic Shared Object (DSO) Module Inclusions
> ##
> LoadModule security_module    libexec/mod_security.so
> #LoadModule vhost_alias_module libexec/mod_vhost_alias.so
> #LoadModule agent_log_module   libexec/mod_log_agent.so
> #LoadModule referer_log_module libexec/mod_log_referer.so
> #LoadModule mime_magic_module  libexec/mod_mime_magic.so
> #LoadModule speling_module     libexec/mod_speling.so
> #LoadModule anon_auth_module   libexec/mod_auth_anon.so
> #LoadModule digest_module      libexec/mod_digest.so
> #LoadModule cern_meta_module   libexec/mod_cern_meta.so
> #LoadModule usertrack_module   libexec/mod_usertrack.so
> #LoadModule unique_id_module   libexec/mod_unique_id.so
> LoadModule weblogic_module libexec/mod_wl_ssl-8.1sp3.so
> #LoadModule pmplight_module libexec/mod_pmplight.so
> LoadModule ssl_module libexec/libssl.so
> #LoadModule proxy_module libexec/libproxy.so
> ClearModuleList
> AddModule mod_security.c
> #AddModule mod_vhost_alias.c
> AddModule mod_env.c
> AddModule mod_log_config.c
> #AddModule mod_log_agent.c
> #AddModule mod_log_referer.c
> #AddModule mod_mime_magic.c
> AddModule mod_mime.c
> AddModule mod_negotiation.c
> AddModule mod_status.c
> AddModule mod_info.c
> AddModule mod_include.c
> AddModule mod_autoindex.c
> AddModule mod_dir.c
> AddModule mod_cgi.c
> AddModule mod_asis.c
> AddModule mod_imap.c
> AddModule mod_actions.c
> #AddModule mod_speling.c
> #AddModule mod_userdir.c
> AddModule mod_alias.c
> AddModule mod_rewrite.c
> AddModule mod_access.c
> AddModule mod_auth.c
> #AddModule mod_auth_anon.c
> #AddModule mod_digest.c
> #AddModule mod_cern_meta.c
> AddModule mod_expires.c
> AddModule mod_headers.c
> #AddModule mod_usertrack.c
> #AddModule mod_unique_id.c
> AddModule mod_so.c
> AddModule mod_setenvif.c
> #AddModule mod_perl.c
> #AddModule mod_pmplight.c
> AddModule mod_weblogic.c
> AddModule mod_ssl.c
> #AddModule mod_proxy.c
> ##
> ## Load standard server configuration common GLOBAL settings
> ## DO NOT DELETE/DISABLE
> ##
> Include conf/common-configs/main-common.conf
> ErrorLog /local/apache/apache-logs/error-logs/error_log
> ##
> ## If mod_ssl is loaded, load common mod_ssl GLOBAL settings
> ## Then set server/instance-specific mod_ssl GLOBAL settings.
> ## DO NOT DELETE/DISABLE
> ##
> <IfModule mod_ssl.c>
>     Include conf/common-configs/ssl-common.conf
>     SSLLog          /local/apache/apache-logs/ssl_log
>     SSLLogLevel     none
>     SSLSessionCache
> shmcb:/var/run/www.janus.novartis.intra.wls81-ssl_scache(512000)
>     SSLMutex
> file:/var/run/www.janus.novartis.intra.wls81-ssl_mutex
> </IfModule>
> ##
> ## Virtual Host Settings/Include directives below here
> ##
> Include
> conf/instances/www.janus.novartis.intra.wls81/www.janus.novartis.intra.wls81.conf
>
>
> Apache 2.2 httpd.conf
>
> ##
> ## httpd.conf -- Apache HTTP server configuration file
> ##
> ##
> ## Server/instance-specific base configuration settings
> ##
> ServerRoot "/local/apache/aws"
> PidFile /var/run/projectname-httpd.pid
> ## Method that Apache uses to serialize multiple children accepting requests
> on network sockets
> AcceptMutex pthread
> ## User: The userid under which the server will answer requests
> ## Group: The groupid under which the server will answer requests
> User userid
> Group groupid
> #Timeout : Amount of time the server will wait for certain events before
> failing a request
> #KeepAlive  : Enables HTTP persistent connections
> #MaxKeepAliveRequests : Number of requests allowed on a persistent
> connection
> #KeepAliveTimeout :  Amount of time the server will wait for subsequent
> requests on a persistent connection
> Timeout 3000
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
> # LimitRequestBody : Restricts the total size of the HTTP request body sent
> from the client
> # LimitRequestFields : Limits the number of HTTP request header fields that
> will be accepted from the client
> # LimitRequestFieldSize : Limits the size of the HTTP request header allowed
> from the client
> # LimitRequestLine : Limit the size of the HTTP request line that will be
> accepted from the client
> LimitRequestBody 10000000
> LimitRequestFields 100
> LimitRequestFieldSize 8190
> LimitRequestLine 8190
> AddHandler cgi-script .cgi
> AddHandler cgi-script .pl
> <Directory />
>     Options FollowSymLinks
>     AllowOverride None
> </Directory>
> # worker MPM
> # StartServers: initial number of server processes to start
> # MaxClients: maximum number of simultaneous client connections
> # MinSpareThreads: minimum number of worker threads which are kept spare
> # MaxSpareThreads: maximum number of worker threads which are kept spare
> # ThreadsPerChild: constant number of worker threads in each server process
> # MaxRequestsPerChild: maximum number of requests a server process serves
> StartServers         10
> MaxClients          150
> MinSpareThreads      25
> MaxSpareThreads      75
> ThreadsPerChild      25
> MaxRequestsPerChild   0
> ServerLimit 2048
> ListenBacklog 1000
> <Directory />
>     Options FollowSymLinks
>     AllowOverride None
> </Directory>
>
> #Enables DNS lookups on client IP addresses
> HostnameLookups Off
> # ServerTokens
> # This directive configures what you return as the Server HTTP response
> # Header. The default is 'Full' which sends information about the OS-Type
> # and compiled in modules.
> # Set to one of:  Full | OS | Minor | Minimal | Major | Prod
> # where Full conveys the most information, and Prod the least.
> #
> ServerTokens Prod
> ServerSignature Off
>
> ##
> ## Dynamic Shared Object (DSO) Module Inclusions
> ##
> LoadFile /usr/local/lib/libssl.so.0.9.8
> LoadFile /usr/local/lib/libcrypto.so.0.9.8
> LoadFile /usr/local/lib/libgcc_s.so.1
> LoadModule weblogic_module modules/mod_wl_22.so
> LoadModule unique_id_module   modules/mod_unique_id.so
> LoadFile /local/home/kumarar3/apache/aws/modules/libm.so.2
> LoadFile /local/home/kumarar3/apache/aws/modules/libxml2.so
> LoadModule security2_module modules/mod_security2.so
> LoadModule setenvif_module modules/mod_setenvif.so
> LoadModule ssl_module modules/mod_ssl.so
> LoadModule deflate_module modules/mod_deflate.so
> LoadModule mime_module modules/mod_mime.so
> LoadModule cache_module modules/mod_cache.so
> LoadModule disk_cache_module modules/mod_disk_cache.so
> LoadModule alias_module modules/mod_alias.so
> LoadModule env_module modules/mod_env.so
> LoadModule cgid_module modules/mod_cgid.so
> LoadModule rewrite_module modules/mod_rewrite.so
> LoadModule authz_host_module modules/mod_authz_host.so
> LoadModule log_config_module modules/mod_log_config.so
>
> ##
> ## Load standard server configuration common GLOBAL settings
> ## DO NOT DELETE/DISABLE
> ##
> #Include conf/common-configs/main-common.conf
> ErrorLog
> /local/apache/apache-logs/error-logs/projectname-main_error_log
> ##
> ## If mod_ssl is loaded, load common mod_ssl GLOBAL settings
> ## Then set server/instance-specific mod_ssl GLOBAL settings.
> ## DO NOT DELETE/DISABLE
> ##
> <IfModule mod_ssl.c>
>     Include conf/common-configs/ssl-common.conf
>     SSLSessionCache
> shmcb:/var/run/projectname-ssl_scache(512000)
>     SSLMutex        file:var/run/projectname-ssl_mutex
> </IfModule>
>
> ##
> ## Load cgid module
> ##
> ##
> <IfModule cgid_module>
>     #
>     # ScriptSock: On threaded servers, designate the path to the UNIX
>     # socket used to communicate with the CGI daemon of mod_cgid.
>     #
>    Scriptsock logs/cgisock
> </IfModule>
>
> ##
> ## Load mod_status module
> ##
> ##
> <IfModule status_module>
>         <Location /server-status>
>         SetHandler server-status
>         Order Deny,Allow
>         Deny from all
>         Allow from "your.domain"
>         </Location>
> </IfModule>
>
> ##
> ## Load deflate module
> ## The mod_deflate module provides the DEFLATE output filter that allows
> output from your server to be compressed before bein
> #g sent to
> ## the client over the network.
> ##
> <IfModule deflate_module>
> <Location />
> AddOutputFilterByType DEFLATE text/plain
> AddOutputFilterByType DEFLATE text/xml
> AddOutputFilterByType DEFLATE application/xhtml+xml
> AddOutputFilterByType DEFLATE text/css
> AddOutputFilterByType DEFLATE application/xml
> AddOutputFilterByType DEFLATE image/svg+xml
> AddOutputFilterByType DEFLATE application/rss+xml
> AddOutputFilterByType DEFLATE application/atom_xml
> AddOutputFilterByType DEFLATE application/x-javascript
> AddOutputFilterByType DEFLATE text/html
> SetOutputFilter DEFLATE
> ## In real life, there are issues with compressing other types of files such
> as mp3 or images.
> ## If you dont want to compress images or mp3 files then add following to
> your configuration
> SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
> SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
> SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
> SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary
> SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary
> SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
> SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary
> SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary
> </Location>
> </IfModule>
> ####################################################################
> ### Load Cache Module
> ##CacheEnable : Enable caching of specified URLs using a specified storage
> manager
> ##CacheDefaultExpire : The default duration to cache a document when no
> expiry date is specified.
> ##CacheIgnoreCacheControl : Ignore request to not serve cached content to
> client
> ##CacheIgnoreHeaders : Do not store the given HTTP header(s) in the cache
> ##CacheIgnoreNoLastMod: Ignore the fact that a response has no Last Modified
> header.
> ##CacheMaxFileSize The maximum size (in bytes) of a document to be placed in
> the cache
> ##CacheMinFileSize The minimum size (in bytes) of a document to be placed in
> the cache
> ##CacheRoot : The directory root under which cache files are stored
> ##CacheDirLevels: The number of levels of subdirectories in the cache
> ##CacheDirLength : The number of characters of subdirectories in the cache
> ####################################################################
> <IfModule mod_cache.c>
> <IfModule mod_disk_cache.c>
>        UseCanonicalName Off
>        CacheRoot /local/apache/cache/projectname
>        CacheEnable disk /
>        CacheIgnoreNoLastMod On
>        CacheIgnoreCacheControl Off
>        CacheIgnoreHeaders Set-Cookie
>        CacheDefaultExpire 1800
>        CacheMinFileSize 64
>        CacheMaxFileSize 64000
>        CacheDirLevels 2
>        CacheDirLength 1
> </IfModule>
> </IfModule>
> ##
> ## Virtual Host Settings/Include directives below here
> ##
> # VHost [project name] created on Fri Sep 29 10:25:58 EDT 2006 by root
> Include conf/instances/projectname/projectname.conf
>
> Please let me know in apache 2.2 why physical memory is consumping more
>
> Regards,
> Arun
>
>  ________________________________
>  Don't get soaked. Take a quick peak at the forecast
>  with theYahoo! Search weather shortcut.
>
>


Ok so you show us conf files and what not but how much more memory is
Apache 2.2 using. You have to understand a lot can impact why Apache
2.2 is using more physical memory. From the way it was compiled, to
the current kernel version and the library files on your server.

Also understand that its the nature of the beast that a newer version
of *any* program will use more memory then the last. I am sure that
Linux 2.6 kernel  uses more memory then 2.2, just like Windows Vista
uses more memory then Windows XP or XP compared to 98. Last, please
also consider that both mod_cache and mod_deflate will increase memory
usage.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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


Mime
View raw message