![Page 1: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/1.jpg)
Moodle Performance and
Scalability Assurance
Jonathan Moore
![Page 2: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/2.jpg)
Analysing Usage
●We size for the highest peak
●Describe the peak scenario
●How many users?
●How short of interval?
●What are they doing?
●How much growth is expected?
![Page 3: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/3.jpg)
The mdl_log
●A wealth of information
●Many sites have > year of data
●Determine concurrency
●Determine % of activity types
●Visualize historical usage
![Page 4: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/4.jpg)
Optimizing Performance
●Use a PHP accelerator
●Balance your memory budget
●Make InnoDB buffer pool same size as DB (see
mysqltuner.pl)
●Most sensitive to slow disks
–Sessions
–Moodle source
–Moodle database
![Page 5: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/5.jpg)
Some General Sizing Guidelines
●~25-30 MB per apache client /w accelerator
●~200-250 logged in users per core
●~4-6 x more resources for a user's first minute
●~10 logged in users supportable per apache child
●DB generally 1/10 size of Moodledata folder
●5-10% of population is common peak for
concurrency
![Page 6: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/6.jpg)
JMeter Benchmarking
●Simulates simultaneous user activity
●Gathers response and throughput results
●Not a browser can't test javascript
●Can use to measure +/- of changes
●Can use to estimate expected concurrency, but
harder
![Page 7: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/7.jpg)
What to Use for Testing?
●Copy of production for test site
–+Harder for server to cache
–-More likely errors in results due to broken content
–-Have to reset user passwords
●Synthetic test site
–+Can use known good content less false errors
–-Takes a lot of time and effort to prepare
–-Smaller DB = easier server caching
●Hybrids
![Page 8: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/8.jpg)
Testing Changes
–Single test user and course may work well
–More accurate the test rig less likely to miss problem
–Run same test between changes
–If results degrade don't move forward with change without careful review
![Page 9: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/9.jpg)
Measuring Concurrent Capacity
●Test users, enrolment, and course population
should be on par with production site
●Test set mix should reflect activity % of production
site
●Calculate
–Simultaneous logged in user count
–Simultaneous logging in users count
–They are different
–Know what you need for each
![Page 10: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/10.jpg)
Moodle 2.6 and JMeter
●New integration available
●Creates test plan with many activity types
●Provides comparison reports
●Only single user / single course test?
![Page 11: Moodle performance testing presentation - Jonathon Moore](https://reader036.vdocuments.us/reader036/viewer/2022081209/53fabe1a8d7f7253318b5624/html5/thumbnails/11.jpg)
Tools
●jMeter
●SQL queries + mdl_log
●PHP Accelerator
●Cacti, munin, nagios, etc
●CLI: top, sar, innotop, mysqltuner.pl etc