Moodle Disk Utilization Problem

Moodle Disk Utilization Problem

by Tofig Orucov -
Number of replies: 5

PHP : PHP 8.1.31 (cli)

Moodle  : '4.3+ (Build: 20231124)

mysql : mysql  Ver 15.1 Distrib 10.6.21-MariaDB

I am encountering a proxy error when trying to add a course in Moodle.

While investigating the issue, I noticed that CPU usage occasionally drops, but the problem does not seem to be related to CPU or RAM. Instead, I found that disk utilization is extremely high.

  • There is enough free space on the disk.
  • However, when monitoring utilization via Zabbix, I see that it is consistently 97% to over 100%.
  • When checking with iostat, disk utilization remains above 90% on average.
  • The MariaDB database is using the disk heavily, and this high utilization has been continuous since the issue started.

What steps should I take to troubleshoot and resolve this problem?

Note: I don’t have deep knowledge of Moodle LMS, unfortunately. I am a Linux administrator, and I took over managing this server after the previous admin left the job.

Average of ratings: -
In reply to Tofig Orucov

Re: Moodle Disk Utilization Problem

by Brett Dalton -
Picture of Moodle HQ Picture of Particularly helpful Moodlers
Without further information I would suggest that the memory available for the database is insufficient and is swapping a large amount of data to disk. If this is periodic this its likely caused by a large background task or report, or a query with a large sort operation. You wont see MariaDB or Mysql overruning your memory because they are limited in their usage in the config files. Do you have any specific monitoring on the database?
In reply to Brett Dalton

Re: Moodle Disk Utilization Problem

by Tofig Orucov -
I think it is possible to see the services that use the disk the most with the iostat -oP command, and I am using this.

MariaDB appears to be the one using the most.
In reply to Brett Dalton

Re: Moodle Disk Utilization Problem

by Tofig Orucov -
No, there is no specific monitoring (there are things like Zabbix and Grafana), and I really can't understand what is happening.

If there is an application/service that is using the disk so heavily, or if something else unrelated to the disk is causing this, how can I detect it?

Thank you for your response!
In reply to Tofig Orucov

Re: Moodle Disk Utilization Problem

by Ken Task -
Picture of Particularly helpful Moodlers

Suggest a couple of things ...

From CLI run admin/cli/check_database_schema.php

and

install MySQLTuner ... a perl script.  Run as superuser for DB server.  Pay attention memory items at top of the report and to InnoDB references/sections. Tuner will make recommendations but you do not have to apply them.

'SoS'. Ken