Capacity

Capacity

by Alison Wright -
Number of replies: 6

Is there a document anywhere that outlines roughly how much server space, memory etc... is needed according to number of users and courses on Moodle?

Need to know whether our current server could cope with 10-15,000 Moodlers.  Our current server specs: 120 GB hard drive, 1024mb ram, 2.8 GHz.  The database server lives on the same server as the web server.

TIA

Average of ratings: -
In reply to Alison Wright

Re: Capacity

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Its a bit of a "how long is a piece of string" question. Each individual session, i.e. establishing and maintaining a user accessing a moodle resource makes a miniscule demand on the hardware. If your users had a fairly even access distribution and were mainly accessing text/html pages with a few quizzes then that configuration would probably be a fine configuration.

But if you have courses that are chock full of large graphics, video and/or audio then the usage of resources goes up dramatcially.  Any estimates of resource requirements will at best be wild estimates, so you are probably best placed if you go with the configuration you suggest but keep in the back of your mind (and your plans) the possibility of upgrade in the future. In fact, check out the price of another gig of ram, as I suspect the price is sufficiently small to say "why not, it's easier to get it now than upgrade later".

Note that the PHP/MySQL combination that Moodle uses is almost certainly the biggest Activity per CPU cycle (bang for your buck) combination by comparison with competing technologies (Java/Perl/ASP etc).

Marcus
In reply to Marcus Green

Re: Capacity

by Alison Wright -

Thanks for your reply Marcus.

I had a suspicion that it would be difficult to answer this but your guidance has been helpful. 

Alison

In reply to Marcus Green

Re: Capacity

by Carl Keil -
I'm assuming you mean 10,000 - 15,000 otherwise it's quite a broad range of users you're planning for. 

Anyway, I don't run a huge site, but my instincts are a little different.  For sure get as much RAM as your server and/or budget can handle.  But you might want to look for other bottle necks.  You didn't specify, but SCSI hard drives make a big difference.  As does tuning your mysql, php, apache, dns, network, gateway, router, firewall, etc., etc.

With that many users, it wouldn't take much for your site to get "slashdotted" at the start of the term, or if you launch a new course or something, your server could get seriously crunched.  Then all the reputation, acceptance of Moodle and/or your content that you've worked for will get a black eye. 

I'd really make a worst case (or is it best case - you want a lot of users) assessment of how much content (html, scripts, graphics, media) bandwidth, CPU(database queries, php execution) and RAM(session data, database queries, php) your server will be asked to deliver at peak times and then make sure there are no bottlenecks anywhere in the system that preclude you delivering it. 

With that many users you should consider your backup/redundancy plan very seriously as well.

Just my US $0.02.

ck
In reply to Carl Keil

Re: Capacity

by Ken Wilson -
Alison -- To add to all that has been said, at the end of the day you need to be able to perform some form of simulation to indicate if your system will be able to cope with the load you anticipate.

One suggestion is to use apache jmeter (http://jakarta.apache.org/jmeter/index.html) to simulate a certain number of users browsing your moodle site using the Gaussian Random Timer. There are many other web stress tools out there, but you'll get a good idea of the response of your system quickly. It can help if you perform the test from a user workstation as it then factors-in overall network latency. PHP is set to timeout after 30seconds by default, so if your average response is greater than this you know you've got capacity problems.

We found that running PHP as a CGI process crippled our server - although others report that using FastCGI works well (but I've never managed to get it to work blush). The general rule also mentionned is that no matter how much RAM you have, you need to tune so that the system does not page to disk. So be careful when setting php memory_limit and apache/IIS process memory limits. For high capacity sites, assuming you'll not be changing moodle's php scripts that much, a good suggestion is to use a cache: apc which is developed by core php developers) will enable you to cope with more concurrent users than an opcode optimiser (zend) - see this article.

HTH -- Ken


In reply to Alison Wright

Re: Capacity

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
As you may have already heard, the most important load factors of a Moodle server are

1. the number of _concurrent_ users i.e. the number of users who have clicked on something and waiting for results. We are talking about time slots of the order of a fraction to a couple of seconds

2. the type of activities they are using. 'cause some activities consume more ressources than others. Most notorius is the chat module then comes quizes.

Did you go through the privious postings in this forum? Specially
http://moodle.org/mod/forum/discuss.php?d=50043
http://moodle.org/mod/forum/discuss.php?d=45093
http://moodle.org/mod/forum/discuss.php?d=44945
http://moodle.org/mod/forum/discuss.php?d=44626
http://moodle.org/mod/forum/discuss.php?d=39903
http://moodle.org/mod/forum/discuss.php?d=6920#32597
http://moodle.org/mod/forum/discuss.php?d=38448
In reply to Visvanath Ratnaweera

Re: Capacity

by Tom Ceresini -
Visvanath,

Thanks for providing the back references, it's very helpful to "newbies" like me.

Tom