[CDBUG-talk] Slow LAMP apps

James L. Lauser james at jlauser.net
Mon Sep 30 17:34:48 EDT 2013

Hey Jamie. Some stuff to try:

* Make sure you increased MySQL's memory allocation from the defaults. Take
a look at /usr/local/share/mysql. There are sample my.cnf files in there
labeled "large" and "huge" consider one of those if you have lots of memory.
* Consider a PHP precompiler. I was using eaccelerator for a while and it
has pretty dramatic performance effects. Remember that PHP is an on-the-fly
interpreted language. In the general case, every script is recompiled every
time it gets called. That chews up precious milliseconds. eaccelerator (or
the like) will cache the compiled version and only recompile if the source
file changes.

--  James L. Lauser
    james at jlauser.net

On Sun, Sep 29, 2013 at 9:24 AM, Jaime <jaime at snowmoon.com> wrote:

> I'm looking for tips on speeding up a few LAMP applications.
> Specifically, the two slow ones use FreeBSD, Apache 2, MySQL 5.x and
> PHP 5.x.  One is Moodle and uses LDAP and has its biggest issues when
> users login for the first time (especially 20-25 users in the same few
> minutes, as happens in a classroom.)  The other is Drupal 7.x and
> doesn't use LDAP, but its running on the same server.
> By comparison, DokuWiki uses ASCII files instead of MySQL and it DOES
> use LDAP for authentication.  Its the same LDAP server as in the
> Moodle instance.  I haven't noticed any lag in DokuWiki, but maybe its
> just lighter code in the first place.  I'm not sure.
> Any thoughts on how to figure this out?
> Thanks in advance,
> Jaime
> _______________________________________________
> CDBUG-talk mailing list
> CDBUG-talk at lists.nycbug.org
> http://lists.nycbug.org/mailman/listinfo/cdbug-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/cdbug-talk/attachments/20130930/94828f25/attachment.html>

More information about the CDBUG-talk mailing list