Server performance

Server performance

by Gustavo García -
Number of replies: 5

Hello everyone,

We have on our website (moodle version 3.5) 10 courses with 800 students enrolled. In the afternoon is when the peak of simultaneous access to the different courses that reach the server use quotas of 90/95% (attached) occurs. We have consulted our hosting and they tell us that what they consume most resources is access to datamodel.php, which seems to be related to scorm. They tell us that if these requests could be reduced, consumption would fall significantly.

From our hosting they recommend limiting this type of POST requests /mod/scorm/datamodel.php if we want to support this type of traffic peaks.

Is there any way to do it?.

Thank you

Gus.

Attachment 2020-02-12 cPanel - Resource usage.png
Average of ratings: -
In reply to Gustavo García

Re: Server performance

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Gustavo,
if your business is to provide training via SCORM courses, you cannot do anything but increasing "the size" of your (DB) server: 2 core and 2GB is IMHO an underestimated deploy configuration.

You might change the way your SCORM contents track students experience but it would hurt the way you're currently collect info about that experience.

HTH,
Matteo

Average of ratings: Useful (1)
In reply to Matteo Scaramuccia

Re: Server performance

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

I wouldn't dream of trying to run a 'production' Moodle site in 2GB of RAM.
In reply to Howard Miller

Re: Server performance

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
+1 here too. Another +1 to Matteo's post.

In other words, your server needs more power!

Pl. read other similar discussions in this forum. Also study the forum documentation https://docs.moodle.org/en/Performance and https://docs.moodle.org/en/Performance_FAQ.

I'm just curious. How do you make your posts in "landscape" format? (See screen shot.) I have to scroll sideways to read them!

Attachment forum-landscape.png
In reply to Matteo Scaramuccia

Re: Server performance

by Gustavo García -
Hi,

Thank you very much for your quick response. I would have liked to test the site before putting it into operation, but we could not do the necessary tests due to date problems. Luckily we are not only dedicated to moodle, this has been an exception.

I understand that in this case higher specifications are needed, but from my hosting they indicate that the problem is the high number of POST requests /mod/scorm/datamodel.php.

However, they have elevated server performance (attached image). I don't know if it will be enough. In any case, in your opinion, what would be the minimum requirements for moodle to run correctly?

Thank you.
Regards,
Gustavo Garcia



Attachment 2020-02-18.png
In reply to Gustavo García

Re: Server performance

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Gustavo,

the problem is the high number of POST requests /mod/scorm/datamodel.php

the reason is due to the SCORM activities you're using in your courses: unless you can remove them, you need to cope with that "high volume".
But I'm not sure they're the root cause of your perfomance issues: an high rate of those calls is quite normal/expected when you host several SCORM activities.

Based on your DB graph the bottleneck looks like on the web server: what is the PHP version? Is OPcache enabled? What is your web server? Is the disk hosting the moodle data on a spinning disk or on a SSD?
I'd guess that:

  1. (optional) using nginx and php-fpm
  2. (optional) using PHP 7.3 by moving to the latest Moodle version i.e. forget LTS (which could not be an actual option, I guess)
  3. using SSD, if you're using the default MUC configuration
  4. adding 2 more core
  5. adding 2 more GB of RAM

could be what required to perform way better than now.

https://moodle.org/plugins/report_benchmark will help you to create kind of quick baseline to understand where you're now and if changing something in the web server will improve the numbers (the lower the better). https://moodle.org/mod/forum/discuss.php?d=335357 will give you a great picture of real life numbers.

That being said, you could eventually create a load test to simulate your average load and use it to check your progress on improving the performance: it will require much more effort but it would be the way to go. More e.g. in https://tjhunt.blogspot.com/2014/04/load-testing-moodle-262-at-ou.html.

HTH,
Matteo

Average of ratings: Useful (1)