Splitting Moodle Services to Multiple Servers

Early this year we moved our Moodle server from a Linux server to an Apple server (Moving to Moodle 2.0:Pt. 1 – The Decision) and upgraded from 1.9 to 2.1.

In doing so we were concerned with a number of  issues, particularly performance and stability.  Once the school year started we would be monitoring the server to make sure that our students and teachers had the best possible experience.

When school started we took time to train our teachers on the new system and with any change there is always anxiety, but our teachers took to it and work hard to learn the in’s and out’s of Moodle 2.1.

So… when on the first day with students back in school there were some performance and stability issues we wanted to respond immediately.  The server was slow to respond and there were database time out errors along with numerous httpd processes, which we believed may have hit their limit due to hardware.

In conversations with our previous support company, suggestions from people on Twitter (@SDCMoodle – Moodle site & @ghenrick – Some Random Thoughts) and thoughts from other technical professionals (Precision Consulting) we decided to split out the Apache/PHP and MySQL services onto their own servers to improve performance.

Everyone I talked to said that this would provide an optimal environment for optimizing Moodle.  This also made sense to me from previous experiences when dealing with servers… make them as close to singular focus as possible.

How we are going to do this and where I need your help, suggestions and ideas.

We plan on cloning the existing server and editing IP, server and configurations settings/files.  The steps we are going to take are [UPDATED PROCESS HERE]:

  1. Take the existing server offline.
  2. Clone server to new Apple Mini server (new)
  3. Configure the new server as Apache/PHP web server
    1. Change server serial number to avoid conflict
    2. Change IP – Unix command
    3. Turn off MySQL service
    4. Change Moodle config.php file to point to MySQL server.
    5. Double-check web server configuration
  4. Turn off web services from MySQL server (existing)
  5. Make network changes:
    1. Firewall ports
    2. Port forwards
    3. NAT changes

I am not sure what I am missing in this process or what other things I should be considering.  One question is if there is anything we need to do on the MySQL server to allow access from another server?

What I need from you is you help.  If you see something here that doesn’t make sense or we should be doing differently please let me know by commenting below.  Once we get through the process I will be sure to update this post with our results.

UPDATE 9/9/2011:

Made some minor changes to the Apache httpd.conf file to try to address some issues.  Changes made:

  • OLD SETTING: MaxClients 1024 – NEW SETTING: MaxClients 600
    • (80% of 8GB RAM = 6GB. 6GB = 10MB per session = 600 sessions)
  • OLD SETTING: MaxRequestsPerChild 100000  – NEW SETTING: MaxRequestsPerChild 1000
  • OLD SETTING: KeepAliveTimeout 15  –  NEW SETTING: KeepAliveTimeout 10

 

 

About William Stites

Currently the Director of Technology for Montclair Kimberley Academy, occasional consultant, serial volunteer for ATIS, husband, and father to two crazy kids who make me smile everyday.
This entry was posted in EdTech, Moodle, Technical and tagged , , , , , . Bookmark the permalink.

10 Responses to Splitting Moodle Services to Multiple Servers

  1. Ben says:

    Before I started to split stuff up, I think I would replace the slow disk that comes with the Mini’s with a SSD. Pick one that is optimized for lots of small transfers rather than big read or writes. If the internal disks were mirrored, the OS and db compete for disk IO. I don’t remember the number, but I believe that OSX has a hard coded limit for httpd instances, so that might need to be tuned if in fact it is hitting the limit. 

  2. Ernest Koe says:

    i am not a fan of cloning environments. Seems better if you had two vanilla OS  installs and just move the db. You’ll need to configure mysql so that the right ports are open to the network, then you probably want to lock it down to specific IPs.

  3. Pingback: Splitting Moodle Services to Multiple Servers | williamstites.net : FRIENDDAT BLOG

  4. Groupwise was all hosted on campus with multiple servers that we had to maintain,” he said … Nicholls is switching from the Blackboard service to Moodle. …

Comments are closed.