Re: High CPU usage with Moodle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 

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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux