|
|
|
Environment:
|
Solaris 10, Mysql 5.0.54, PHP 5.2.4
|
|
|
We have struggled with cron.php's automatic backups taking an inordinately long time. Like, many, MANY hours (40+ for one site).
There may be more than one thing going on here, but one performance improvement I made that helped dramatically was increasing the chunk size tenfold in backuplib.php function backup_log_info():
Snippet lines 1463-1468
-----
function backup_log_info($bf,$preferences) {
global $CFG;
//Number of records to get in every chunk
// $recordset_size = 1000;
// CHANGE THIS to 10k:
$recordset_size = 10000;
-----
I tried upping it to 100k but that did not significantly further improve performance, and also required an increase in PHP's max_memory configuration.
For courses with large logs -- "Front Page" for example -- there were hundreds of chunks. All these database calls were very time consuming.
I strongly recommend increasing the chunk size here. I hate to have to locally patch our builds for little things like this, so it would be great to see this pushed back to Moodle core.
Any comments on this topic are welcome! thanks
|
|
Description
|
We have struggled with cron.php's automatic backups taking an inordinately long time. Like, many, MANY hours (40+ for one site).
There may be more than one thing going on here, but one performance improvement I made that helped dramatically was increasing the chunk size tenfold in backuplib.php function backup_log_info():
Snippet lines 1463-1468
-----
function backup_log_info($bf,$preferences) {
global $CFG;
//Number of records to get in every chunk
// $recordset_size = 1000;
// CHANGE THIS to 10k:
$recordset_size = 10000;
-----
I tried upping it to 100k but that did not significantly further improve performance, and also required an increase in PHP's max_memory configuration.
For courses with large logs -- "Front Page" for example -- there were hundreds of chunks. All these database calls were very time consuming.
I strongly recommend increasing the chunk size here. I hate to have to locally patch our builds for little things like this, so it would be great to see this pushed back to Moodle core.
Any comments on this topic are welcome! thanks |
Show » |
| No changes have yet been made on this issue.
|
|