Moodle quiz load tests

Last updates:

20220928 - v1

Currently, this page has information about the moodle quiz load tests that were ran in our servers in 2020.

Attached (at the bottom of this page) is a brief presentation of this work, and a report with more detail (with some apache and php-fpm configuration).

You can contact us writing to , with the word "performance" in the subject.

Files for load tests

Attached there are the following files:

  • Moodle quiz backup
  • Test users file, for enrollment in the test course
  • Jmeter script for load test (jmx)
  • Users file for jmeter script
  • Image with upload options for users import in moodle

Configuration of the jmeter script

(The script was tested with jmeter 5.4.1 and moodle 3.8)

The script uses plugins, so the plugins-manager.jar is required. It can be downloaded from https://jmeter-plugins.org/install/Install/ and put in the lib/ext directory of jmeter (jmeter restart required).

The parameters for the test are:

1. In "Configuracion del CSV dataset" you have to set the path and name of the users file (usuarios5000.csv)
2. In "plan de pruebas", you have to configure the course id, quiz id and server url.
3. In "valores por defecto para peticion HTTP" set the server url
servidor

In "grupo de hilos original" the threads number and ramp up time can be specified. Start with only 1 thread until the test run with no errors, then try more threads, in an incremental way. In our tests, we used, up 3000 threads with a 180 seconds ramp up.

TO DO: The script has "Assertions" for controlling that the server response is what we expect in a successful execution, it works inspecting the html in the response with a pre-defined text. We used, for example "Pagina 1 de 8", a text that appears in the bottom of the quiz pages. This text is in spanish, so it works if the language for the users is spanish. You can change that assertion text, or set lang=es in the mdl_user table, with an

update mdl_user set lang='es' where username like 'prueba%'; 

Tips for running the tests:

  • We ran the script with a maximum of 1500 threads per client (generator). If more is used, is probable that errors appear but they are because the client cant support that load, in that case, you can run more than one client at the same time, or use the jmeter capabilities to do a distributed load test.

Running from command line:

$ ./jmeter -n -t /home/epenna/moodle-quiz3-v1.jmx -l /home/epenna/jmeterout.jtl

moodle-quiz3-v1-ori.jmx - Jmeter script (372,5 KB) Emilio Penna, Martes, 27 de Setiembre de 2022 17:12:58 -0300

users5000.csv - CSV file with users for jmeter script (86,8 KB) Emilio Penna, Martes, 27 de Setiembre de 2022 17:12:58 -0300

usuarios_curso.csv - File with users for enrollment in moodle course (454,7 KB) Emilio Penna, Martes, 27 de Setiembre de 2022 17:24:29 -0300

copia_de_seguridad-moodle2-activity-890-quiz890-20210505-1209-nu.mbz - Moodle quiz backup (34,9 KB) Emilio Penna, Martes, 27 de Setiembre de 2022 17:25:21 -0300

upload-users-options.png - Upload users options - image (45,8 KB) Emilio Penna, Martes, 27 de Setiembre de 2022 17:25:53 -0300

Apuntes-pruebas_3_4_dic.pdf - Report of the tests (in spanish) (574,1 KB) Emilio Penna, Martes, 27 de Setiembre de 2022 17:55:29 -0300

moodlemootglobal22_presentation_udelar2.pdf - Presentation - moodlemoot22 (890,7 KB) Emilio Penna, Martes, 27 de Setiembre de 2022 18:41:53 -0300

reporte-experiencia-emilio2.pdf - Reporte de experiencia para WOPR Chile 2023 (957,8 KB) Emilio Penna, Viernes, 10 de Noviembre de 2023 10:34:25 -0300