Wiki
Versión 12 (Emilio Penna, Miércoles, 28 de Setiembre de 2022 12:31:24 -0300)
1 | 10 | Emilio Penna | h1. Moodle quiz load tests |
---|---|---|---|
2 | 1 | ||
3 | 12 | Emilio Penna | Last updates: |
4 | 12 | Emilio Penna | |
5 | 12 | Emilio Penna | 20220928 - v1 |
6 | 12 | Emilio Penna | |
7 | 8 | Emilio Penna | Currently, this page has information about the moodle quiz load tests that were ran in our servers in 2020. |
8 | 1 | ||
9 | 9 | Emilio Penna | 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). |
10 | 12 | Emilio Penna | |
11 | 12 | Emilio Penna | You can contact us writing to soporte.eva@seciu.edu.uy, with the word "performance" in the subject. |
12 | 1 | ||
13 | 8 | Emilio Penna | |
14 | 1 | h2. Files for load tests |
|
15 | 1 | ||
16 | 9 | Emilio Penna | Attached there are the following files: |
17 | 2 | Emilio Penna | |
18 | 1 | ||
19 | 6 | Emilio Penna | * Moodle quiz backup |
20 | 6 | Emilio Penna | * Test users file, for enrollment in the test course |
21 | 6 | Emilio Penna | * Jmeter script for load test (jmx) |
22 | 6 | Emilio Penna | * Users file for jmeter script |
23 | 6 | Emilio Penna | * Image with upload options for users import in moodle |
24 | 2 | Emilio Penna | |
25 | 1 | ||
26 | 6 | Emilio Penna | h2. Configuration of the jmeter script |
27 | 2 | Emilio Penna | |
28 | 2 | Emilio Penna | |
29 | 6 | Emilio Penna | (The script was tested with jmeter 5.4.1) |
30 | 2 | Emilio Penna | |
31 | 6 | Emilio Penna | 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). |
32 | 2 | Emilio Penna | |
33 | 6 | Emilio Penna | The parameters for the test are: |
34 | 2 | Emilio Penna | |
35 | 6 | Emilio Penna | 1. In "Configuracion del CSV dataset" you have to set the path and name of the users file (usuarios5000.csv) |
36 | 6 | Emilio Penna | 2. In "plan de pruebas", you have to configure the course id, quiz id and server url. |
37 | 6 | Emilio Penna | 3. In "valores por defecto para peticion HTTP" set the server url |
38 | 6 | Emilio Penna | servidor |
39 | 2 | Emilio Penna | |
40 | 11 | Emilio Penna | 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. |
41 | 1 | ||
42 | 7 | Emilio Penna | 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 |
43 | 7 | Emilio Penna | <pre> |
44 | 7 | Emilio Penna | update mdl_user set lang='es' where username like 'prueba%'; |
45 | 7 | Emilio Penna | </pre> |
46 | 1 | ||
47 | 1 | ||
48 | 7 | Emilio Penna | h2. Tips for running the tests: |
49 | 1 | ||
50 | 7 | Emilio Penna | * 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. |
51 | 2 | Emilio Penna | |
52 | 2 | Emilio Penna | |
53 | 7 | Emilio Penna | Running from command line: |
54 | 2 | Emilio Penna | |
55 | 2 | Emilio Penna | <pre> |
56 | 2 | Emilio Penna | $ ./jmeter -n -t /home/epenna/moodle-quiz3-v1.jmx -l /home/epenna/jmeterout.jtl |
57 | 3 | Emilio Penna | </pre> |