We have done a load test of 1500 active users in an hour on Moodle 2.4 (Load balancer + 5 web servers + 1 MySQL 5.5 with innodb). The test plans included both reading (e.g. notes, forum) and submitting (e.g. quiz, assignment, forum). We find that the performance bottleneck is caused by the table locking of mainly 3 tables in MySQL 5.5, mdl_cache_text, mdl_grade_item and mdl_forum_discussions. Among them, mdl_cache_text has the most serious table locking problem (there is even deadlocking).
We find that mdl_cache_text is used by almost each activity, including assignment, forum, choice, quiz, feedback, etc. The data in mdl_cache_text are being read and updated very frequently by Moodle. The data in mdl_grade_item and mdl_forum_discussions are also being read and updated frequently by Moodle. Thus, we believe that the long table locking time is due to many simultanenous read and write operations on the same rows of these tables given that the innodb row-level shared (for reading) and exclusive (for writing) locks in MySQL are in conflicting state.
May i ask how we can overcome this performance bottleneck in Moodle? Besides, does Moodle HQ have any plan to incorporate the mdl_cache_text table in the future Moodle 2.4 MUC implementations?
Thanks a lot