MySQL performance issue

MySQL performance issue

by Sarath P -
Number of replies: 1

Hello everyone,

I have installed Moodle 4.0.1 (Build: 20220509) on a Ubuntu 20.04 server with 23 GB of memory, 10 CPU cores, and around 100 GB of storage. I have created 5 Question categories which have a total of 300 questions. We have a quiz setup with 30 random questions from 5 question categories. 

We do not have any performance issues with regular usage. However, when I tried to open any one question category, it took around 2 min 55 sec to load the page. During that period I executed "top" and I found that MySQL was taking around 29.3% of CPU. I confirmed that there are no other users using the site by checking the live logs. Once the page finished loading, the CPU usage drops down to 0.3%. 

Is this because all 5 question categories are linked to a quiz that fetches 6 questions randomly from each question category?

Last time when 2 users were editing the questions at the same time the CPU resource for MySQL was around 60%. 

Is this normal usage? or do I have to update anything on the server side to get a smooth performance?

Average of ratings: -