best architecture for a large installation

best architecture for a large installation

by Fouzi Sukhilala -
Number of replies: 13

Hello everybody,

We plan to have a Moodle installation to serve more than 20000 users. At this time we expect to have some 500-100o concurrent user on the platforme.

We need some kind of hardware architecture (nombre of servers, roles of each server,...) to adopt for this aim. is there any suggestion or doc that can help?

ps: i already seen http://docs.moodle.org/en/Performance. What I need is something more concrete.

Thanks

Average of ratings: -
In reply to Fouzi Sukhilala

Odp: best architecture for a large installation

by Bartosz Cisek -

Hi,

I would start from 2 servers. One for frontend and one for database. As much RAM as you can affrord. DB needs lots of IOs, so 4 HDD in RAID 10 10k RPM. Some good NIC with MSI-X, Intel maybe. 8 CPU cores per server.

In reply to Bartosz Cisek

Re: Odp: best architecture for a large installation

by Fouzi Sukhilala -

thanks! We plan to have some LVS centric architecture. I don't know if it's the best solution available.

so, I thing we can have 1Loadbalancer+2webservers+1DBserver at least.

Now, what's about the MoodleData and clustering the DB sever?

Can we mount Moodledata on Db server and have a good result? or should we think SAN or additional file server?

Is it necessary to have a DB cluster?

In fact, the plateform should be scalable enough to have more than 100000 users. The number of concurent ones is still unkown smile

In reply to Fouzi Sukhilala

Odp: Re: Odp: best architecture for a large installation

by Bartosz Cisek -

Hi,

LVS is a very good tool. I would duplicate also loadbalancer. Without it maintenance would be very hard.

MoodleData and DB needs IO a lot, so be sure you have them enough. On that scale I suggest separate network storage shared between frontend servers.

Don't forget to set up caching on aplication severs. Server side and user side. Memcache, APC is one thing. I usually tweak TTL for default CSS an JS files shiped with Moodle.

Make sure Etag is calculated on file name, not inode number and so on. Dig into developer.yahoo.com

In reply to Bartosz Cisek

Re: Odp: Re: Odp: best architecture for a large installation

by d morte -

I'm going to jump in here on behalf of my tech department. The organization that I work for serves seventeen public school districts and about 40 non-public schools. In total we have over 8000 teachers and 75000 students. We've learned a lot in the past eight months since going with Moodle, but what we haven't learned is the proper setup for a large scale implementation of Moodle. I should point out here that many of the courses we host are very video intensive - with several hundred MB of Captivate simulations and other video files.

What are looking for some specific hardware/software recommendations based on our above numbers.

1. What specific operating system would/do you use for a large scale implementation? (Fedora, Ubuntu, Centos, etc..) Also, which version of the OS?
2. Which version of PHP would you recommend in conjunction with the above OS?
3. Which database management system (mysql, postgres)?
4. Do you virtualize your large scale installation?
5. How much RAM should be allocated to handle the 1000 concurrent users in your experience in that large scale implementation?

As always, thank you!

 

 

In reply to d morte

Re: Odp: Re: Odp: best architecture for a large installation

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

> We've learned a lot in the past eight months since going with Moodle, but what we haven't learned is the proper setup for a large scale implementation of Moodle.

I was following the other thread http://moodle.org/mod/forum/discuss.php?d=159495 serving Moodle at this scale needs a lot of experience and know-how. Once you start "tuning" such installations, the whole thing becomes more of an art ;-(

Now to your questions:

> 1. What specific operating system would/do you use for a large scale implementation? (Fedora, Ubuntu, Centos, etc..) Also, which version of the OS?

Fedora, Ubuntu, Centos, etc. all are the same OS, Linux, a Unix-clone. They are just different "distributions" of Linux http://en.wikipedia.org/wiki/Linux_distribution There are many other Unix-clones, very popular as server OS are the *BSDs: FreeBSD, OpenBSD, NetBSD, .. http://en.wikipedia.org/wiki/Comparison_of_BSD_operating_systems

Your question is which distribution, I guess. That is the second famous moot topic (behind the legendary Emacs vs Vi discussion). The neutral answer is, take the distribution you know well! For long answers, search this forum for "linux flavour".

> 2. Which version of PHP would you recommend in conjunction with the above OS?

Moodle dictates the minimam PHP version, and also a recommended version. If you know your distribution, you know how to get a particular version.

> 3. Which database management system (mysql, postgres)?

Somewhat similar to the distributions discussion. The people in this forum who maintain really big Moodle installations recommend PostgreSQL. Again, this is a circular answer: If you know your database system, you know whether it'll handle the load or not, and how.

> 4. Do you virtualize your large scale installation?

I was surprised that you go with virualization for such a big installation. People here have repeatedy advices against (for big installations).

> 5. How much RAM should be allocated to handle the 1000 concurrent users in your experience in that large scale implementation?

http://docs.moodle.org/en/Installing_Moodle says "The general rule of thumb is that Moodle can support 50 concurrent users for every 1GB of RAM, ..."

The whole thing sums up to years of experience, which can not be summerized into forum postings. Serving 8000 teachers and 75000 is not to be underestimated. Why don't you engage professionals who specializes on big Moodle installations for the job?
In reply to d morte

Re: Odp: Re: Odp: best architecture for a large installation

by Bryan Smith -

I run an Moodle Cluster for about 70 school districts in Michigan. We've used all virtual Ubuntu Servers running on VMware HA Cluster (2 dedicated noes). I have a about 10 virtaul servers in the mix currently and have the 70 db's sharded across two db servers. I'm really a fan of using vmware for even a large scale project. It introduces some HA and rebooting a node in trouble only takes 10-12 seconds. At that speed my load balancer has even had the chance to time out a user.

The amount of ram is the biggest guess there is in the equation. It really depends on what your users are doing and how often they are using the system. You really have to formulate your own base line based on your own user population.

Average of ratings: Useful (1)
In reply to Bryan Smith

Re: Odp: Re: Odp: best architecture for a large installation

by d morte -

@ Bryan - What database do you use?

@ Visvanath - If you advise against virtual servers, can you cite some specific reasons why this is not an ideal scenario? We successfully use VMWare here for almost all of our servers and haven't had any significant issues until Moodle.

In reply to d morte

Re: Odp: Re: Odp: best architecture for a large installation

by d morte -

First, I love Moodle because the community is so willing to help. That everyone here is sharing their time like this is truly appreciated.

I've been reading the forums about virtualization and whether or not it should be done. There seems to be quite a few people that say "Good" and just as many that say "Bad." I suppose that I'm a bit confused because I don't know how to differentiate between the variables. I understand why everyone might say "It isn't wrong if you can get it to work well for you" , but I need to hear of a specific scenario that does work.  I'm not sure if I'm asking the correct questions, but I think I'll keep asking... If you are running more than one instance of Moodle and have more than 5000 accounts in at least one instance of moodle (or experience more than 600 concurrent logins), could you please answer the following:

  1. We run _____  # instances of Moodle.
  2. We have a total potential user base across all installations of _______ thousand users.
  3. We run ______  OS distribution.
  4. We run Virtual or Physical for our Webserver(s). (VMWare?)
  5. We run Virtual or Physical for our Database.
  6. We run ________ database. (Postgres, Mysql, SQL, Oracle?)
  7. We have ____ GB of RAM allocated to the Webserver.
  8. We have ____ GB of RAM allocated to the Database server.
  9. We have _____ processors allocated.
  10. Our moodledata directory is stored ______ (location relative to webserver and database).
In reply to d morte

Re: Odp: Re: Odp: best architecture for a large installation

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Sure this looks like a fun survey. I'm only referring to 'my part' of the Open University installation which is our main one for paying students, we do have others but I can't answer for them. Do bear in mind that I'm not actually a 'system person' so some of these answers are a bit approximate.

1. One (given the above)

2. Approx 150,000 (these are supposedly 'active' users ie students currently registered on a course that is running now; the user table actually contains > 500,000)

3. Red Hat Enterprise Linux (version 5, I think)

4. Physical (note: virtual servers are used for all the test systems etc, and I believe for our other Moodle installations that I don't know about as well)

5. Physical

6. Postgres 8.3; intending to move to 9.0 with our Moodle 2 installation if it works out okay.

7. I think the webservers (there are four) have 16GB RAM each.

8. I think the db server (only one - well there's a pair with fail-over) has 64GB.

9. Webservers I think have four cores each, db server has 16 cores; could be wrong though.

10. via an NFS cluster, in our SAN.

--sam

Average of ratings: Useful (1)
In reply to d morte

Re: Odp: Re: Odp: best architecture for a large installation

by Daniel Nelson -

We are mostly physical with a 2 webserver nodes on VM as a test run. So far we've been pretty happy with them. 

1. We have 1 Production Instance of Moodle

2. We have 35,000 users

3. We have 2 Physical and 2 Virtual Webservers. We use VMWare

4. We have 1 Physical Database server. 

5. We use Oracle. 

6. Physical Webservers have 96GB of RAM. VM Webservers have 16GB of RAM

7. Database has 128GB of RAM.

8. I forget something like 12 or 16. 

9. The Moodledata volumen is on a Netapp Filer and NFS mounted by each Node. 

In reply to d morte

Re: Odp: Re: Odp: best architecture for a large installation

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

I don't claim to have experience in virtualized servers under heavy load. The last time I was asked to run LAMP inside somebody else's Windows + VMware bloat, I almost suffocated.
sad

In the occations I use virtualizastion for servers, like laboratory servers for 20 - 30 students, it works, but not snappy. I know, that doesn' sound very scientific. But it is not worth the trouble (for me) to try to scale virtual servers, hardware is cheap since a long time!

No, I was referring to older discussions in this forum, for example http://moodle.org/mod/forum/discuss.php?d=145091 run a search in this forum.
In reply to d morte

Re: Odp: Re: Odp: best architecture for a large installation

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
A side note on the subject: How come that there are two requests for the "best architecture for a large installation"? _The best_ could only be one! ;-(
In reply to Fouzi Sukhilala

Re: best architecture for a large installation

by Albert Ramsbottom -

Hi

 

I got decent performance from 2 x web nodes, under a cluster LB setup with 1 x DB using VMWare although I have to admit hardware is always best when it concerns Moodle

If you share a Moodle data folder across 2 x web nodes, i.e Thick Provisioned Eager Zeroed disk for Moodle data then you will need to use OCFS2 as a clustering service

Thanks to Jason for that info!

Albert

Average of ratings: Useful (2)