I have been testing Moodle 2.4 in AWS as we are looking to upgrade from Moodle 2.4 and switch hosting providers. In short, the performance was much slower than our current setup and I was hoping that someone might be able to give some general advice for why that might be the case and/or how I could go about improving performance.
Profiling was completed using xhprof to keep track of specific functionality performance (as described in this helpful blog: *cannot post links for 24 hours).
The following screenshots outline the amount of time taken to open the ./question/category.php page for three different server environments. In each screenshot, the hardware resources of the environment increases and this is associated with only minor performance gains. The web server is being hosted in EC2 and the database server is being hosted in RDS.
c1.xlarge - (7GB memory, 4 x 420 GB storage)
db.m2.xlarge - (17.1GB memory, 6.5 ECU (2 virtual cores with 3.25 ECUs each), 64-bit platform, High I/O Capacity)
c1.xlarge - (7GB memory, 4 x 420 GB storage)
db.m2.x2large - (34GB memory, 13 ECU (4 virtual cores with 3.25 ECUs each), 64-bit platform, High I/O Capacity)
hi1.4xlarge - (60.5GB memory, 2 x 1024 SSD GB storage)
db.m2.x2large - (34GB memory, 13 ECU (4 virtual cores with 3.25 ECUs each), 64-bit platform, High I/O Capacity)
What I observed from this profiling was that at best the categories page would take just under ten seconds to load on average. Xhprof pointed out specifically that the mysql query related to the main function call was talking up the majority of processing time at roughly 4.5 seconds. Therefore, I was surprised that doubling the hardware resources for the database server and more than doubling the hardware resources for the web server had little improvement on the processing time. Of note, additional tests were ran for similar functions, with multiple runs for each function and the results were all similar.
I had heard some criticisms in general about IOPS performance for Moodle in AWS (see: *cannot post links for 24 hours) but I am attracted to the ease of use and hosting solutions provided by Amazon and therefore I would rather work out a solution if possible. Could this just be a matter of software optimization that has to take place? If yes, do you have any advice specific to a Moodle 2.4 setup in the AWS Cloud?
Here is some additional information about our Moodle extensions: PHP version 5.4.6, Apache 2.2.22, MYSQL 5.5.29, APC 3.1.13.
Any help is much appreciated. Thanks!
(Edited by Helen Foster to add images - original submission Thursday, 20 June 2013, 5:28 PM)