httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josu Lazkano <josu.lazk...@barcelonamedia.org>
Subject Re: [users@httpd] High CPU usage with Moodle
Date Tue, 25 Oct 2011 08:36:05 GMT
On Tue, 2011-10-18 at 11:32 +0200, Tom Evans wrote:
> On Mon, Oct 17, 2011 at 1:01 PM, Josu Lazkano
> <josu.lazkano@barcelonamedia.org> wrote:
> > Hello list! I have a Ubuntu server with Apache2 to serve a Moodle web.
> >
> > I notice that where there are few users (4 or 5) requesting pages, the
> > Apache2 process goes to 100% on all CPUs (4 cores).
> >
> > I try with memcached but it still getting 100% CPU usage.
> >
> > What I must check? I will appreciate any help.
> >
> > Thanks and best regards.
> >
> >
> 
> Moodle is a PHP framework.
> PHP scripts run embedded inside Apache*.
> High CPU usage in Apache whilst serving PHP pages is usually due to
> the PHP page.
> 
> The best people to help with why the framework works so poorly are the
> people who wrote the framework.
> 
> Cheers
> 
> Tom
> 
> * Usually. You can also run out of process, using FastCGI, which will
> quickly make clear how much work Apache is doing, and how much work
> PHP is doing. If you are using mod_php, its running embedded.
> 
> ---------------------------------------------------------------------
> 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
> 

Thanks Tom, I check the Moodle forum but I don't find any interesting
post about Apache performance.

I configure some parameters on my Apache but it still not work (I can
block the server just hitting the F5 key 10 times).

This is my Apache2:

$ apache2ctl -l
Compiled in modules:
  core.c
  mod_log_config.c
  mod_logio.c
  prefork.c
  http_core.c
  mod_so.c

And this is my configuration:
http://dl.dropbox.com/u/1541853/apache2.conf

I just change this values:

<IfModule mpm_prefork_module>
    StartServers          8
    MinSpareServers       5
    MaxSpareServers      20
    MaxClients          256
    MaxRequestsPerChild   4000
</IfModule>

Is possible to know witch PHP files is getting 100% of the CPU? Some
debugging tool for that?

I don't know what else to try. The server is a virtual one with 8GB of
memory and 4 CPUs, I think it is enough for a 50 user Moodle.

Thanks for your help.

Kind regards.


-- 
Josu Lazkano
Barcelona Media – Centre d’Innovació


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