logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache Memory Usage
Author
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Thu 15 Mar '07 16:25    Post subject: Apache Memory Usage Reply with quote

My httpd Config:
Quote:

LoadModule mime_module modules/mod_mime.so
LoadModule alias_module modules/mod_alias.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule autoindex_module modules/mod_autoindex.so

LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so

LoadModule bw_module modules/mod_bw.so
LoadModule rewrite_module modules/mod_rewrite.so

# =================================================
# HTTP and performance settings
# =================================================
Timeout 200
KeepAlive On
MaxKeepAliveRequests 15
KeepAliveTimeout 15
MaxMemFree 10

<IfModule prefork.c>
StartServers 2
MinSpareServers 1
MaxSpareServers 5
MaxClients 5
MaxRequestsPerChild 300
</IfModule>

<IfModule worker.c>
StartServers 3
MaxClients 8
MinSpareThreads 5
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild 0
</IfModule>




PHP5 AS ISAPI

Memory Usage by Apache:
Mem Usage: 104MB
VM Size: 219Mb
and
Small usage by core httpd.exe
Mem Usage: 200k
VM Size: 10Mb

And question what is your Mem usage by apache now in PSexplorer a had 29 active connection. Why i ask meybe PHP5 As Fast cgi has smaller mem usage or other config can do better performance. My advice for height mem usage is restart apache per hour then all worker mem are free.

ps.
Ohh my terible engrish wrr
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3058
Location: Hilversum, NL, EU

PostPosted: Thu 15 Mar '07 22:05    Post subject: Reply with quote

I am running php as Fastcgi (mod_fcgid from our download page) at the Apache Lounge and the memory usage of httpd.exe is now after some time ~100M and two php processes of ~15M each. Mod_fcgid "kills" a php proces after predefined time and/or number of requests and starts a new one. When I runned php as module it was far over 400M and was growing and growing. Your milage may vary.

So running as Fastcgi memory usage of Apache is far less en the Speed is on par when running as module. There are advantages to running PHP with FCGI. Separating the PHP code from the web server removes 'bloat' from the main server, and improves the performance of non-PHP requests. Secondly, having one permanent PHP process as opposed to one per apache process means that shared resources like persistent MySQL connections are used more efficiently. And maybe even more important is stability, since I run FCGI my server never crashed caused by php (extension) errors.
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Fri 16 Mar '07 15:30    Post subject: Re: Problem z dodawaniem wpisów Reply with quote

This is nice thx for advices now ram usage is 500Mb sic
In test of old performance like on lighttpd ther are only show graph for ISApi Apache but not for fastcgi.
And what witchs PHP as Fast CGI:
- security [ server/php/php-cli.exe ]
- register globals whose 'on' in my old hosting in Fastcgi mode can i turn off in this mode
+ performance
+ stable

http://www.lighttpd.net/benchmark/
Back to top
unmgroup



Joined: 22 Jul 2006
Posts: 19

PostPosted: Thu 22 Mar '07 1:34    Post subject: Reply with quote

Steffen wrote:
I am running php as Fastcgi (mod_fcgid from our download page) at the Apache Lounge and the memory usage of httpd.exe is now after some time ~100M and two php processes of ~15M each. Mod_fcgid "kills" a php proces after predefined time and/or number of requests and starts a new one. When I runned php as module it was far over 400M and was growing and growing. Your milage may vary.

So running as Fastcgi memory usage of Apache is far less en the Speed is on par when running as module. There are advantages to running PHP with FCGI. Separating the PHP code from the web server removes 'bloat' from the main server, and improves the performance of non-PHP requests. Secondly, having one permanent PHP process as opposed to one per apache process means that shared resources like persistent MySQL connections are used more efficiently. And maybe even more important is stability, since I run FCGI my server never crashed caused by php (extension) errors.


How do you configure apache to to use PHP with FCGI? I've been searching but can't find out what lines to add to my apache and/or php configuration. I've downloaded the new FCGI module from the downloads section here, but im unsure of how to setup php to use FCGI. Right now php is running as a module with apache, and crashes every few minutes and the memory usage goes over 400+
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Thu 22 Mar '07 10:28    Post subject: Reply with quote

There is a topic about that!
http://www.apachelounge.com/viewtopic.php?p=5579

If you still have a question, please post again.
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Fri 23 Mar '07 11:43    Post subject: Reply with quote

U used now PHPAs CGI

witch FastCGI mem usage 700Mb + mysql etc apache
PHP witch mod_php5 1,2GB + mysql etc apache sic
Back to top


Reply to topic   Topic: Apache Memory Usage View previous topic :: View next topic
Post new topic   Forum Index -> Apache