I tried using jMeter and Moodle's built in performance testing (Site administration/Plugins/Caching/Test performance) to compare performance with Sessions to File vs Disk.
My DB performed slightly better than File for Sessions despite the moodle community often saying File should be better. I'm wondering why I don't see an improvement when using File rather than DB for Sessions, is this indicating my web server is slow reading/writing to disk or am I not testing performance correctly?
Are there any free tools someone can recommend, blazemeter for instance?
I used Blazemeter,com for some time and loved it. But it is pricy if you want to simulate more than 50 users.
The latest versions of JMeter will let you generate nice web-based output data with graphs and it's free. And you can export Jmeter testplans into BlazeMeter if you want to use that.
After testing the performance the real question arises: what is the bottleneck? We can do JMeter'd quizzes with 600 simulated users answering every question within 1 second and find they have to wait 25 secs max for a page to load... but then what?
The Benchmark plugin https://moodle.org/plugins/report_benchmark can provide some answers to where to optimise things but depending on the use of Moodle (doing quizzes for instance) different things need speeding up. Caching plugins may help but I learned the hard way that using caching with a slow Redis cache will make things worse than having the default caching.
Of course you will have to look at mysql and webserver stats to see if CPU or memory usage reaches 100% during a JMeter load test and add more (virtual) CPU or memory. That is the easiest way of optimizing performance.
Start with asking if you want to serve max 100 users with max 0.5 sec page load times or accept 1000 users with 30 sec page load times and create JMeter scripts for that.
And turn on debugging>performance_info to see the number of DB read/writes and page load times and caching info. I still need to figure out what to do with all that info on the bottom of each page but you will see that some pages use the DB more than others.