We need advice on dealing with high volume users and the sheer size of first.js
We performed Load testing on our Moodle 3.7 using the LoadRunner Cloud software. The script was recorded using VuGen and modified to select a random user from 30 test users.
Eventually the Moodle site starts timing out after 30 seconds when approaching 500 users. We would aim to support approximately 1500 users concurrently. The server hardware is substantial.
Our test configuration is as follows:
Moodle 3.7.2+ on CentOS 7.5
The load test scenario is quite simple:
login > entering course > entering quiz > starting a new quiz > pressing next > trying to submit the quiz > logout
We have tried from 50-500 concurrent users from 30 randomly selected accounts.
We have tuned the server by moving from PHP-CGI to PHP-FPM and setting the number of threads and maxclients appropriately.
This has allowed 333 users to be served without excessive timeouts.
It seems that the network bandwidth with a 10Gbit/s connection is being saturated.
The effect of a 3Mb first.js not including any overhead of pages, images etc.
first.js is served from lib/requirejs.php
It doesn't seem to be retrieved from moodledata/cache
The cost of retrieving all js and globbing them together is about 44ms.
Am I right in saying that the client's browser cache with be loaded with
first.js from the server and then on subsequent page requests it will be retrieved from their client side cache?
The amount of users that can be served with the 3Mb first.js alone seems to be:
Network configuration: 1 Gbit/s backbone
125/3 = 41.6 users
It is easy to see that overhead of pages, images etc could saturate the available network bandwidth when scaling up.
Are there any other suggestions as to how this could be improved, especially with high instantaneous load? Does Moodle 3.9 use a different caching mechanism?