Database Issues

Database Issues

by Obada Qafisheh -
Number of replies: 0

Hi All,

We are running Moodle infrastructure on AWS with the following components:

1- Moodle files and code in an EC2 instance (c5.4xlarge) with 16 vCPUs, 32 GiB of memory, up to 10 Gbps network bandwidth, and 4750 Gbps EBS bandwidth.

2- Database is RDS MySQL (db.m6g.2xlarge) with 8 vCPUs, 32 GiB of memory, and up to 3000 IOPS.

Here are some issues we are facing:

  • Sometimes, the CPU utilization of the database reaches more than 95% with less than 200 concurrent connections!! this is so weird because based on AWS documentation, it should handle more than 2500 concurrent connections, there are no spikes in IOPS or any other metrics at the CPU spike time.
  • The free memory size is 5 GiB out of 32 GiB, this number is almost constant since the day we have resized DB memory to 32 GiB. We need to know why the memory is used all the time, even when the number of connections on the DB is low. It may be caused by the InnoDB buffer pool. The current DB storage is 49 GiB and the located memory for the InnoDB buffer pool is 75% of the memory. is there a required memory size and the percentage of the InnoDB buffer pool for such database size?
  • The database size is too large, and it will accumulate at a high rate. We started with 9 GiB on 4 August and today we have 49 GiB. The largest table in the database is the mdl_logstore_standard_log table with over 53 million records, can we migrate its content to an external data warehouse to separate the data that needs an OLAP solution?


Average of ratings: -