Hardware Recommendations for Apache / PHP server

Hardware Recommendations for Apache / PHP server

by Eric Henson -
Number of replies: 9

I am currently in the planning stages for a new Moodle deployment for over 120 schools to share. This system will have about 3,800 teachers plus the students for teachers that use it which is expected to be about 40,000 – 50,000 students.

I am planning to split the server load between two powerful servers, one for the MySQL database and the other for the Apache / PHP / File storage.

The specs for the new database server are as follows:

  • Dell PowerEdge 2950
  • 2 – Dual Core Zeon 3.2 GHZ 1066MHz fsb
  • 4 GB RAM
  • 6 – 10,000 RPM 146 GB SCSI drives with split backplane
    • 2 – RAID 1
    • 4 – RAID 10
  • PERC 5 RAID controller

I am currently planning the specs for the Apache / PHP server. I was considering just using the same spec server as the one that I used for the database server, but I was wondering if anyone had any suggestions.

Does anyone know which server works harder? Database or Apache /PHP

What percent of the total work load is done by each server?

I am also going to use Windows Server 2003 R2 on the Database server because it has to double as a MS SQL and MySQL server, but for the Apache / PHP server, I am either going to use SUSE Linux 10.1, or Windows Server 2003 R2.

Thank you

Average of ratings: -
In reply to Eric Henson

Re: Hardware Recommendations for Apache / PHP server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

A couple of points....

  • I would always use Linux if there is a choice - MySql and apache are better supported on this platform as that's what most people use. SUSE 10.1 is a perfectly reasonable choice.

  • The number of users is in may ways irrelivant - it's how it is loaded that matter. Classes of 300 all accessing a quiz at the same time will kill you.

  • Although it pains me to say this, you might want to consider that MS SQL support for Moodle is just around the corner, so this may be an option if you have to run it anyway.

  • Make sure that your chosen OS supports that PERC RAID controller. I have had bother with those in the past. The Dell is probably a sensible choice if for no other reason that it isn't the end of the world (cost wise) if you need to upgrade later on.

  • It's very difficult to say which machine is likely to work harder as, again, it really depends on how the system is used. You will only know once it is actually up and running.

  • Databases are hard on disk access - make sure you get the fastest disks and the best disk controllers you can afford for your db server.

In reply to Howard Miller

Re: Hardware Recommendations for Apache / PHP server

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

Here is a recent discussion which may be relevant. http://moodle.org/mod/forum/discuss.php?d=50934

Also check the list of other threads I've compiled down in that discussion. http://moodle.org/mod/forum/discuss.php?d=50934#232855

You haven't supplied the most critical factor in estimating the peak load. As Howerd wrote:
> The number of users is in may ways irrelivant - it's how it is loaded that matter. Classes of 300 all accessing a quiz at the same time will kill you.

What is the maximum number of concurrent users you expect, how many of them will be using chat, how many quiz?
In reply to Visvanath Ratnaweera

Re: Hardware Recommendations for Apache / PHP server

by Eric Henson -
I am not really sure what the usage will be like for this server, I basically need to just make a guess and plan based on that guess.

Because my Moodle setup will be mostly for grades 4 - 12, I don't really expect it to be used as heavily as a university or community college, but I am going to plan as large as possible and still keep my costs low, and my configuration as simple as possible.  Load balancing is nice, but creates added complexity over just a simple two server setup with one box hosting the website and the other providing the database connected with a gigabit connection and a 10 Mbps DS-3.  From what I have read so far, I feel pretty confident that these servers will be able to handle the load.

One last question.  for the Apache server, I was planning on getting it with 2 - dual core zeon CPU's, but do you think that it really needs two for the apache server?  I am also going to have 4 GB of RAM and 6 - SCSI drives in a RAID 5 array.
In reply to Eric Henson

Re: Hardware Recommendations for Apache / PHP server

by Arnor Kristjansson -
It really depends on what you are doing. For my moodle setup the CPU basically idles all day except when doing the backup. My installation isn't as big as most people's though. To quote a source: "General rule of thumb for hardware upgrades: For PHP scripts, the main bottleneck is the CPU. For static HTML/images, the bottleneck is RAM and the network."
In reply to Eric Henson

Re: Hardware Recommendations for Apache / PHP server

by Arnor Kristjansson -
I don't have any direct experience but from what I have read in these forums you should take into account that apache users more memory per client than lighthttpd and might fill up those 4GBs fast.
In reply to Eric Henson

Re: Hardware Recommendations for Apache / PHP server

by Myles Carrick -
hey Eric,

Mate - Howard's advice looks to be on the mark with thinking about load in terms of maximum concurrent users... and in suggesting that a single apache box is unlikely to effectively handle a load that large... you definitely will need to plan (at least as Moodle usage increases) to set up a cluster of front-end boxes...

There's an intro to this at the MoodleDocs Performance page... or search / post to this forum for further info on how to configure it...

I have to say too that IMHO a single MySQL server for 120 schools (50K students) + Windows + MSSQL = headache...

Good luck with your planning!

MC

In reply to Eric Henson

Re: Hardware Recommendations for Apache / PHP server

by Richie Foreman -
The 2950's rock. We have a couple of those running some other web apps that we use, nothing comes close to em. For our Moodle stuff we have 2 1850s, and a 2850. Dell makes some rock solid stuff, and it serves our moodle very well. We have a similar raid controller in our 2850 (PERC4) and is pretty well supported under Linux, we had some issues with the 2.4 kernel, it just didn't want to play nice. I honestly think it's a personal problem, but when we had Debian Linux running the stock 2.4 kernel, the raid card worked fine. We ended up compiling our own 2.4 kernel (to enable high mem >64 support). After we compiled, our RAID didn't work, and I couldn't find the driver (MegaRaid) when I was configing the modules. Long story short we ended up bumping to 2.6 and we've never looked back. Not too sure if PERC5 is supported, being that it's SAS, but you might want to look for Linux Drivers on Dell's site. Dell also has rock solid support, we had a fan blow out the other day on one of our 1850's, and Dell came out the next day and installed the new fan for us, for free. I didn't even touch a screw driver. We've a couple Hard Drives blow out on some other App servers, and Dell usually responds with in 3 hours or so to "emergency" stuff. Good Luck! Dell is a great choice, you won't be dissapointed.
In reply to Eric Henson

Re: Hardware Recommendations for Apache / PHP server

by Wen Hao Chuang -
We are currently testing our new system setup (supposely would take more than 30000+ users), which has FIVE Sun Fire X4100 boxes with 8GB of ram on each server, running RedHat Enterprise Linux. Two will be app servers (behind a load balancer), one database server (which we are planning to max out the RAM, which will be 32GB), and one hot spare server (also running backup).

Our current setup is running two severs - one app (moodle), one database (mysql), both are running on Apple Xserve with OSX, serving 6000+ active users and 10000+ courses right now. Currently they are handling the traffic OK (we do have courses that have 900+ students, which when students are taking quizzes at the same time, it would really slow down the server). Recently we start to see some runaway apache or mysql processes that we had to restart the services from time to time, and we are using splunk to trouble shoot the problem, but other than the server looks really busy when those runaway processes happened, we couldn't find anything special from the log analysis so far. I believe that someone reported in this forum that MySQL does not like OSX, so hopefully when we move to the new setup it would solve some of these issues. At the same time if anyone knows anything about this or know how to tune up apache and/or mysql running on OSX, please do share your experience with us. Thanks!
In reply to Wen Hao Chuang

Re: Hardware Recommendations for Apache / PHP server

by Eric Henson -
Wen,

That is a very impressive setup that you are setting up.  I was considering load balancing two servers to run Apache, but I usually like to keep my setups as simple as possible (less to go wrong), and just see if I can run Apache on one really nice server such as a PowerEdge 2950 with two dual core Zeons, 4 GB RAM, 6 SCSI drives in a RAID 5 array for maximum read access.  I can't imagine this server getting overloaded within my environment of grade 4 - 12 teachers.

Thanks for all of your advice, and this will help me my decision making process.