Moodle set up for 60 concurrent quiz users

Moodle set up for 60 concurrent quiz users

by Jeff Baldmann -
Number of replies: 14

Hi,

We are about to set up Moodle and I'm the person who has to make the decision on what obtain for the hosting of our site.

I expect we'll use 2.4.3 as this it the latest.

We have estimated that 60 people wil lbe attempting a quiz at the same time. This is a requirement that can't be re-organized.

I'm very anxious that things don't fall over badly when the quizzes are being taken.

I've looked at the documentation and it looks like I need 6 Gigabytes of RAM.

I don't know if we need 1 server core or 2. Information is conflicting.

The packages i've looked at seem to have a good connection and fast connections.

Is that enough RAM?

Do I need 2 server cores (I think they are 2.8 GBz speed.

Should I go for a dedicated server or would a decently specc'd share host be enough? How can I evaluate that?

Sorry of rall the questions and being generally clueless. I hope someone can help.

Average of ratings: -
In reply to Jeff Baldmann

Re: Moodle set up for 60 concurrent quiz users

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

60 people attempting a quiz is perfectly possible, and you are asking the right question: how much hardware? Answering is not so easy.

I would not attempt to use a shared host. You do want a dedicated server.

Assuming that usage may grow in future, it is perhaps more helpful to ask: How will you monitor your server once it is set up? Once things are running, you need to know "at times of peak usage, am I using 50%, 100% or 200% load." Then you can watch that, and as load increases, you can plan to upgrade your server.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Moodle set up for 60 concurrent quiz users

by Sam Mudle -

I highly recommend a dedicated server! DO NOT use a VPS or shared unless you are going to get a garunteed or reserved amount of IOPS. Your neighbors on the shared system might be using all available IOPS killing your Moodle site. Very important for MySQL

That's easy to say, but a dedicated server can cost around $100 a month which is expensive for many in the education business.sad

I used a $12/month shared host for 30 concurrent students, but I have to be careful to mitigate server spikes, otherwise I get nasty-grams from my provider.

You want to reduce the number of calls to the database happening AT THE EXACT SAME TIME.  It's all about concurrency. 

Make up a long password for the quiz so that students won't all start the quiz at the exact same time.

 

In reply to Jeff Baldmann

Re: Moodle set up for 60 concurrent quiz users

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

If you want a safe, 'finger in the air' estimate I would round it up to 8G and be happy. Having said that it might work fine with 4G. You don't really know until you do it (as it depends on exactly what's going on at the time).

Moodle does not seem to be especially processor hungry. The limiting factors are RAM (each process loads lots of PHP code into memory) and disk subsystem performance (it's a database). Caching of one kind or another helps but that means even more RAM.

I'd wouldn't over-spec on processors. Just the basic configuration that comes with a 6G+ machine will probably do the job.

To echo what Tim says, make sure you have exclusive rights to the RAM/processor power so I would think you are looking at a minimum of a VM and possibly a dedicated box. Make sure the web server and database are properly tuned so they can use the memory available (out of the box database configuration can be surprisingly conservative whereas Apache will run away with all your RAM). And, yes, have some sort of monitoring so you know what is going on ('munin' is a good start on Linux for example).

Read the performance pages in the docs.

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Moodle set up for 60 concurrent quiz users

by Jeff Baldmann -

Thank you very much for these answers. I appreciate it's not a simple formula and this gives me some guidance.

Howard are you suggesting that one server core is worth a try to start off?

Also, how can a server be at 200% load? I would have imagined that 100% would be the maximum.

Again apologies for the naive nature of my questions.

 

In reply to Jeff Baldmann

Re: Moodle set up for 60 concurrent quiz users

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

Not really - I was suggesting that anything you find with 8GB of RAM in it probably comes with a 4-core processor (say) by 'default'.

I was more suggesting that, load wise, a server of this nature will be spending a lot of time waiting for the disk. You rarely see constantly high processor load. However, as usual, in the real world it depends on what you are doing.

I suspect what you are looking at is a 2-core processor graph. It's a slightly mathematically challenged 100% per core.

Look at Load Average too, although you might want to read up on exactly what that means.

In reply to Jeff Baldmann

Re: Moodle set up for 60 concurrent quiz users

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Exactly, a server can't be at 200% load, so if you generate that much load, your server will crash, and that is a bad thing wink

One tip I have heard recently from a couple of sources is is that PHP-FPM (http://php.net/manual/en/install.fpm.php ) is better for high-performance Moodle sites. (One source was the Catalyst IT talk at the Dublin Moot, another was the OU server folks.) We have not tried it yet for the OU Moodle, but it is on our list to do some load-testing.

In reply to Tim Hunt

Re: Moodle set up for 60 concurrent quiz users

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

Tim,

If this is 'munin' then 200% cpu usage is possible. The convention is to allow 100% per processor. A maximum (I assume he meant maximum) just means there are 2 cores. A good chunk of that would (hopefully) be idle.

In reply to Jeff Baldmann

Re: Moodle set up for 60 concurrent quiz users

by Simon Story -

There is a module for moodle a few of us have hacked away at that can help you generate a load testing script. You can get it from https://github.com/lucisgit/moodle-jmeter-script-generator .

With that you can get it generate a script that will go through your quiz. You need a thing called jmeter to run the script. You can use the jmeter gui (Or just change the script in a text editor) to alter the parameters of the test. The amount of threads to use (Ie. individual users) and the delay between page loads are the two main variables to alter to come up with a reasonable simululation of what you think is going to happen in the real world.

And you have can have 200% load, sometimes it is represented that way. 'top' does this if a machine has multiple cores, so with 8 cores you could possibly see 800% load.

The architecture of how you've setup your moodle installation can alter how many reasources you will need to give it.

Average of ratings: Useful (1)
In reply to Jeff Baldmann

Re: Moodle set up for 60 concurrent quiz users

by jason everling -

I wanted to post this since I was looking in the forums and stumbled upon this, During this past hour we had a 100 Question Quiz with 85 Students in a class.

Do the Math with what our usage was and you can get a good idea of what you would need.

Our Server Specs;

VMware Hosted Web Server

Allocated CPU: 1 Intel Xeon 2.6 Ghz , 4 Cores

Allocated Memory: 16Gbs

 

VMware Hosted MySQL Galera Cluster

Allocated CPU: 2 Intel Xeon 2.6Ghz, 4 Cores Each, 8 Total Cores

Allocated Memory: 8Gbs each host, 3 Total

 

Web Server Stats 

MySQL Server Stats

In reply to jason everling

Re: Moodle set up for 60 concurrent quiz users

by Jeff Baldmann -

I'm a bit confused here. Is your message that we need a MUCH more powerful configuration than th eone I asked about?

In reply to Jeff Baldmann

Re: Moodle set up for 60 concurrent quiz users

by jason everling -

No not at all!! Look at how much was actually used.

For the web server at 60 students, 6.5-7 gbs of ram would suffice, you get away with lower but then your "Next" clicks for each question would increase to 3-4 seconds which some students get annoyed about in a timed test.

MySQL Server InnoDB Pool Size needs to be at least 4gbs so your system would need at least 6gbs of RAM in a 2 server scenario.

In a 1 server scenario you can probably get away with 8-10Gbs of RAM and with todays modern processors really any would do, most are 4-6 core would suffice. In a virtual environment like ours we gave it 1 processor with  4 cores. Our processing power rarely goes over 10% with less than 100 students testing. When we get over 100 it gets used a little more, memory mainly!

The specs I mention above would give you around a 1-2 second delay between clicking to the next question. Average around 1 second, which is good. Must use a PHP Accelerator also.

I highly recommend a dedicated server! DO NOT use a VPS or shared unless you are going to get a garunteed or reserved amount of IOPS. Your neighbors on the shared system might be using all available IOPS killing your Moodle site. Very important for MySQL

Average of ratings: Useful (2)
In reply to jason everling

Re: Moodle set up for 60 concurrent quiz users

by Martin Fernandes -

I used the following config pc with 60 concurrent users (Lan) the moodle crashed while quiz attempt was started

  • i3 3220 @3.30 GHz
  • 16Gb Ram
  • Windows 7

can you please guide

 

In reply to Martin Fernandes

Re: Moodle set up for 60 concurrent quiz users

by jason everling -

I am going to take a guess here and assume you are running both Web and DB on the same box.

Also please tell me that you are not using the XAMMP package for this. If you are then you need to switch to using Apache or IIS with MySQL installed and BOTH tuned correctly for a Windows OS. The XAMMP package is not for prod use, development use only as notated here; 

http://docs.moodle.org/24/en/Windows_installation_using_XAMPP

Did you happen to have any type of logging system running when it crashed? I can only assume so much so please fill me in on what you are running.

JASON