Load Testing Moodle 2.9 with 250 concurrent users

Load Testing Moodle 2.9 with 250 concurrent users

by Montai Settapokin -
Number of replies: 3

From what I have read here: https://moodle.org/mod/forum/discuss.php?d=316736 about the 50MB RAM / user.


So if I have more CPU / RAM, I should be able to support more users. These are the system we got:


Dev. Servers

Software: Moodle 2.9 on Redhat 6.4

Hardware: 1 CPU 2 core , 4GB Memory , 100GB HDD

Database:

Software: Windows Server 2012 with MSSQL Server 2012

Hardware: 1 CPU 2 core, 4GB Memory , 100GB HDD


Staging Servers

Software: Moodle 2.9 on Redhat 6.4

Hardware: 1 CPU 4 core, 8GB Memory , 100GB HDD

Database:

Software: Windows Server 2012 with MSSQL Server 2012

Hardware: 1 CPU 4 core, 8GB Memory , 100GB HDD


As you can see, our Staging environment is more powerful than our Dev. environment; 2x in CPU & RAM

So our staging servers should be able to handle around 160 users (concurrent?), and 80 users for dev. environment.


However after load testing, both of our system can only handle around 50 concurrent users. (ramp-up time = 1 sec.)

100 users with 200 secs ramp-up time; 250 users with 600 secs ramp-up time with no errors.


Since our dev. servers can handle 50 concurrent users, our staging servers should be able to handle 100 concurrent users. But no, it still can only handle 50 concurrent users.


The test scenario is quite simple: login > entering course > entering quiz > starting a new quiz (5 multiple choice questions) > pressing next > trying to submit the quiz > logout


If we load testing more than 50, the errors will begin to appear in various steps & with various user accounts; mostly, "Error in reading to database" & "Error in writing to database". Also some "Internal Server Errors" and "Service Unavailable".


We wonder why the CPU / RAM has no effects on the amount of concurrent users at all?  Or we have to configure something?

Average of ratings: -
In reply to Montai Settapokin

Re: Load Testing Moodle 2.9 with 250 concurrent users

by Tomasz Muras -
Picture of Core developers Picture of Plugin developers Picture of Plugins guardians Picture of Translators

Hi Montai,

When you run your tests and monitor both servers - where is the bottleneck? Which resource is exhausted first? Is it CPU, I/O, network - and on which server?

cheers,
Tomek

In reply to Tomasz Muras

Re: Load Testing Moodle 2.9 with 250 concurrent users

by Montai Settapokin -

Hello Tomek,


When running the load test, our web server CPU peaks at 90%+ , RAM usage is at 80%; however, the CPU on the database servers remain at 2-3% only.


We checked the "User Connections" on the MSSQL using: select * from sys.dm_os_performance_counters where counter_name ='User Connections' ,and the max connections at a time is around 50.


Some of the Moodle errors are saying "Maybe the database is overloaded..." too, but we don't see any congestion or locking in our database at all.


We are thinking that maybe there are some configurations that limit our Moodle connections to the MSSQL database.

So we checked the settings in MSSQL using: select * from sys.configurations where name ='user connections'

and saw a maximum of 32767, and the value_in_use is equal to 0 (default settings).


Thanks.

In reply to Montai Settapokin

Re: Load Testing Moodle 2.9 with 250 concurrent users

by Tony Nguyen -
Did you try Memcache ? I've been using it on my DEV Windows & MSSQL box and that helps A LOT!