Apache tuning for Moodle

Apache tuning for Moodle

by Howard Miller -
Number of replies: 4
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Assuming the situation where the web server is separate from the database server, is there any specific advice going around in respect of tuning the webserver for Moodle (as opposed to the general resources for that that Google knows about!). I'm assuming Apache/Linux.

Any tips or experiences much appreciated.
Average of ratings: -
In reply to Howard Miller

Re: Apache tuning for Moodle

by Kiril Ilarionov -
My analyze concludes:

1. No any Windows;

2. to use Unix enviroments only.
The main opportunities are Linux distributions vs BSD family.
The final result is Debian vs Open BSD.
Now, I am seting up Open BSD / Apache
in connection with:
- Open BSD reliability and security policy;
- high performance as a result of installing
the core modules only for both Apache, Open BSD
and to install any add-ons on demand mainly by hand,
i.e. no any waste for system resources for
general tasks, which are not on demand for
a particular application.

Regards,

Kiril Ilarionov

In reply to Kiril Ilarionov

Re: Apache tuning for Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Kiril

Thanks for the write-up! I have some clarifications and comments on this:

> 1. No any Windows;

You mean MS Windows is unsuitable? Wasn't that obvious? ;-(

> 2. to use Unix enviroments only
Howard specifically asks for Linux/Apache. Therefore the comparison of various Unixes is off-topic. Still my guess is that the differences between Linux and *BSD in this respect are small. Mac OS X is an exception, it (still) has a problem with MySQL at high loads (see the parallel discussion http://moodle.org/mod/forum/discuss.php?d=84559 )

The point is, just tuning on the operating system is not going to help much. The biggest gain is by optimizing the application itself, then comes database tuning plus proper indexing. Recently it was reported in this forum about performance gains by replacing Apache with Lighttpd. (See http://moodle.org/mod/forum/discuss.php?d=83722 )

At the current state of affairs, RAM is the solution to PHP side; good (multi)CPU and i/o performance for the database side.
In reply to Visvanath Ratnaweera

Re: Apache tuning for Moodle

by Martín Langhoff -
One thing to note: Linux is way ahead of the pack in disk IO for DB workloads. The BSDs and MacOSX all have serious bottlenecks in parallel disk IO, and in some cases in SMP. It all goes back the the nasty Big Kernel Lock.

I think Solaris is the only other kernel that is good in this space -- probably was good at it before Linux got there, that's why Solaris is still popular with large Oracle setups. Haven't worked enough with Solaris to say which one is better today, but I sure know which one is improving faster wink
In reply to Martín Langhoff

Re: Apache tuning for Moodle

by Kiril Ilarionov -
Thank you very much for your professional comments.

Let me make notes as follows:

1. The hardware is IBM 814334G upgraded.
Do you heard about any Open BSD bugs for the above hardware?

2. The both, X and Win GUI, are not vitaly required for Moodle server only.

3. Yes, Solaris is a very good choice, however
here Soloris for PC is not used in practice.

4. Yes, just tuning on the operating system (OS) is not enough,
however it is a key decision. The OS tuning is a spare power
for other decisions (httpd server or RDBMS server for example).
There are various ways to optimize the application itself.
I do not like to reinvent the wheel, i.e.
the server modules and opportunities are wellcome,
incl. SQL knowledge and programming in depth.

5. In the case of production Moodle server,
I prefer Apache as a more traditional and proven choice today.
Meanhile, Open BSD is a traditional and proven choice too.

6. The major requirement is the server to work non-stop,
i.e. reliability about an IBM hardware,
an operating system, a web server, and a RDBMS server.

7. If you have spare time only then please look at
http://www.lethargy.org/~jesus/misc/BBPostgres.pdf

smile


P.S. The both projects, BSD and PostgreSQl have the same origin.