You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tony Mobily <me...@mobily1.com> on 2011/02/15 13:46:41 UTC

[users@httpd] More info...

Hi,

I just realised I didn't give much info in my previous post  about
Apache's memory output.
OK, here is more info.
In httpd.conf I have:

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      20
MaxClients      20
MaxRequestsPerChild  1500
</IfModule>


It's a Linux box:

[root@centos555208 etc]# uname -a
Linux centos555208 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST
2010 x86_64 x86_64 x86_64 GNU/Linux
[root@centos555208 etc]#

[Tue Feb 15 04:45:01 2011] [notice] Graceful restart requested, doing restart
Warning: DocumentRoot [/home/www/drupal/drigg-distr-TEST] does not exist
[Tue Feb 15 04:45:03 2011] [notice] Digest: generating secret for
digest authentication ...
[Tue Feb 15 04:45:03 2011] [notice] Digest: done
[eAccelerator] This build of "eAccelerator" was compiled for PHP
version 5.2.13. Rebuild it for your PHP version (5.2.11) or download
precompiled binaries.
[Tue Feb 15 04:45:03 2011] [notice] mod_python: Creating 4 session
mutexes based on 20 max processes and 0 max threads.
[Tue Feb 15 04:45:03 2011] [notice] mod_python: using mutex_directory /tmp
[Tue Feb 15 04:45:03 2011] [notice] Apache/2.2.14 (Unix) DAV/2
mod_auth_kerb/5.1 mod_auth_pgsql/2.0.3 mod_nss/2.2.3 NSS/3.12.4.1
Basic ECC Beta PHP/5.2.11 mod_python/3.3.1 Python/2.4.3 mod_ssl/2.2.14
OpenSSL/0.9.8e-fips-rhel5 mod_perl/2.0.4 Perl/v5.8.8 configured --
resuming normal operations

And I am still getting this with top:

[root@centos555208 httpd]# top

top - 04:46:03 up 48 days,  9:14,  1 user,  load average: 0.56, 0.36, 0.31
Tasks: 134 total,   1 running, 133 sleeping,   0 stopped,   0 zombie
Cpu(s):  3.2%us,  0.6%sy,  0.0%ni, 95.9%id,  0.2%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:   8072080k total,  5552744k used,  2519336k free,    67364k buffers
Swap:  1959888k total,  1959824k used,       64k free,  1274184k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
19067 apache    15   0 5570m 2.9g 3476 S  6.7 37.8   0:01.36 httpd
19060 apache    15   0 5570m 2.9g 3340 S  5.0 37.7   0:00.23 httpd
19089 apache    15   0 5570m 2.9g 3380 S  1.0 37.8   0:00.27 httpd
 2821 mysql     15   0  481m 105m 3612 S  0.7  1.3   3283:09 mysqld
19059 apache    16   0 5570m 2.9g 3412 S  0.7 37.8   0:00.34 httpd
19064 apache    15   0 5570m 2.9g 3484 S  0.7 37.8   0:00.82 httpd
19073 apache    15   0 5570m 2.9g 3148 S  0.3 37.7   0:00.08 httpd
19077 apache    15   0 5570m 2.9g 3440 S  0.3 37.8   0:00.43 httpd
    1 root      15   0 10348  600  572 S  0.0  0.0   0:11.87 init
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.14 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.01 ksoftirqd/0
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0

3Gb for a process seems a _little_ excessive!

Merc.

---------------------------------------------------------------------
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


Re: [users@httpd] More info...

Posted by Julien Cigar <jc...@ulb.ac.be>.
On 02/15/2011 13:46, Tony Mobily wrote:
> Hi,
>
> I just realised I didn't give much info in my previous post  about
> Apache's memory output.
> OK, here is more info.
> In httpd.conf I have:
>
> <IfModule prefork.c>
> StartServers       8
> MinSpareServers    5
> MaxSpareServers   20
> ServerLimit      20
> MaxClients      20
> MaxRequestsPerChild  1500
> </IfModule>
>
>
> It's a Linux box:
>
> [root@centos555208 etc]# uname -a
> Linux centos555208 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST
> 2010 x86_64 x86_64 x86_64 GNU/Linux
> [root@centos555208 etc]#
>
> [Tue Feb 15 04:45:01 2011] [notice] Graceful restart requested, doing restart
> Warning: DocumentRoot [/home/www/drupal/drigg-distr-TEST] does not exist
> [Tue Feb 15 04:45:03 2011] [notice] Digest: generating secret for
> digest authentication ...
> [Tue Feb 15 04:45:03 2011] [notice] Digest: done
> [eAccelerator] This build of "eAccelerator" was compiled for PHP
> version 5.2.13. Rebuild it for your PHP version (5.2.11) or download
> precompiled binaries.
> [Tue Feb 15 04:45:03 2011] [notice] mod_python: Creating 4 session
> mutexes based on 20 max processes and 0 max threads.
> [Tue Feb 15 04:45:03 2011] [notice] mod_python: using mutex_directory /tmp
> [Tue Feb 15 04:45:03 2011] [notice] Apache/2.2.14 (Unix) DAV/2
> mod_auth_kerb/5.1 mod_auth_pgsql/2.0.3 mod_nss/2.2.3 NSS/3.12.4.1
> Basic ECC Beta PHP/5.2.11 mod_python/3.3.1 Python/2.4.3 mod_ssl/2.2.14
> OpenSSL/0.9.8e-fips-rhel5 mod_perl/2.0.4 Perl/v5.8.8 configured --
> resuming normal operations
>
> And I am still getting this with top:
>
> [root@centos555208 httpd]# top
>
> top - 04:46:03 up 48 days,  9:14,  1 user,  load average: 0.56, 0.36, 0.31
> Tasks: 134 total,   1 running, 133 sleeping,   0 stopped,   0 zombie
> Cpu(s):  3.2%us,  0.6%sy,  0.0%ni, 95.9%id,  0.2%wa,  0.0%hi,  0.1%si,  0.0%st
> Mem:   8072080k total,  5552744k used,  2519336k free,    67364k buffers
> Swap:  1959888k total,  1959824k used,       64k free,  1274184k cached
>
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 19067 apache    15   0 5570m 2.9g 3476 S  6.7 37.8   0:01.36 httpd
> 19060 apache    15   0 5570m 2.9g 3340 S  5.0 37.7   0:00.23 httpd
> 19089 apache    15   0 5570m 2.9g 3380 S  1.0 37.8   0:00.27 httpd
>   2821 mysql     15   0  481m 105m 3612 S  0.7  1.3   3283:09 mysqld
> 19059 apache    16   0 5570m 2.9g 3412 S  0.7 37.8   0:00.34 httpd
> 19064 apache    15   0 5570m 2.9g 3484 S  0.7 37.8   0:00.82 httpd
> 19073 apache    15   0 5570m 2.9g 3148 S  0.3 37.7   0:00.08 httpd
> 19077 apache    15   0 5570m 2.9g 3440 S  0.3 37.8   0:00.43 httpd
>      1 root      15   0 10348  600  572 S  0.0  0.0   0:11.87 init
>      2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.14 migration/0
>      3 root      34  19     0    0    0 S  0.0  0.0   0:00.01 ksoftirqd/0
>      4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
>
> 3Gb for a process seems a _little_ excessive!

I suggest that you run
1) PHP in FCGI mod with a fixed number of processes (for example NCPU + 
1), and with PHP_FCGI_MAX_REQUESTS=10000 and,
2) Apache with mpm_worker instead of mpm_prefork

>
> Merc.
>
> ---------------------------------------------------------------------
> 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
>


-- 
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.