Disk usage calculation is very slow with NFS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Unassigned |
Bug Description
https:/
We experienced a very strange issue while upgrading from Mahara 18.10.3 to 19.10.1. It was stuck at cron_site_
if ($oldversion < 2019011500) {
}
The cron job call the same function and it is stuck for a very long time due to the same reasons.
We believe this is an NFS file locking issue. The data root is mounted on an NFS volume, and it is around 500 GB. Even the Linux du utility takes around 20 minutes to calculate the size of this NFS mount point.
We fixed this issue by swapping the dirsize function (htdocs\
function usqdirsize($path) {
$disktotalspace = disk_total_
$diskfreespace = disk_free_
$diskusage = $disktotalspace - $diskfreespace;
return $diskusage;
}
Question: do we need to calculate the size of a directory by iterating its contents? If not happy to commit this patch with a bug report.
description: | updated |
Changed in mahara: | |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in mahara: | |
milestone: | none → 22.04.0 |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/10780