I have noticed a drastic slowdown recently on our production server when pulling up the /mod/assignment/submissions.php page. When there are no submissions the page comes up within a second; however, if there are submissions the response time has really dropped and even once timed out at 30 seconds. Before I start diving into code to see what is happening I thought I might see if anyone else has experienced this. I am running a WIMP server (Windows 2003, IIS 6, MySQL 5.0.18, and PHP 5.1.2) using Moodle 1.5.3+. I did notice in the database that some of the table types are MyISAM and others are INNODB. While I am familiar with some of the advantages and disadvantages, I was curious in practice what most folks are using for the table type, should these all be the same, or even if it matters at all? Any recommendations would be greatly appreciated. Peace.
Gracias. I have used phpmyadmin to alter the table type and change it to myisam and it still seems pretty slow. After doing the alter table statement, do I need to restart the mysql server for the changes to take place? It seemed to execute the alter statement really quickly and I am wondering if it is really using MyIsam. Paz - Antonio
I don't really know
On the other hand, I think you can enable DB performance measurements in Moodle (and MySQL too, look for 'slow queries' in this same forum). Yes, here it is, from config-dist-php:
// Performance profiling
//
// If you set Debug to "Yes" in the Configuration->Variables page some
// performance profiling data will show up on your footer (in default theme).
// With these settings you get more granular control over the capture
// and printout of the data
//
// Capture performance profiling data
// define('MDL_PERF' , true);
//
// Capture additional data from DB
// define('MDL_PERFDB' , true);
//
// Print to log (for passive profiling of production servers)
// define('MDL_PERFTOLOG' , true);
//
// Print to footer (works with the default theme)
// define('MDL_PERFTOFOOT', true);
//
So maybe you could define MDL_PERF and MDL_PERFDB and have a look at the numbers to see if the slowdown comes from MySQL or from Moodle.
[Edit: This thread seems interesting
http://moodle.org/mod/forum/discuss.php?d=42040#193478 ]
Saludos. Iñaki.
On the other hand, I think you can enable DB performance measurements in Moodle (and MySQL too, look for 'slow queries' in this same forum). Yes, here it is, from config-dist-php:
// Performance profiling
//
// If you set Debug to "Yes" in the Configuration->Variables page some
// performance profiling data will show up on your footer (in default theme).
// With these settings you get more granular control over the capture
// and printout of the data
//
// Capture performance profiling data
// define('MDL_PERF' , true);
//
// Capture additional data from DB
// define('MDL_PERFDB' , true);
//
// Print to log (for passive profiling of production servers)
// define('MDL_PERFTOLOG' , true);
//
// Print to footer (works with the default theme)
// define('MDL_PERFTOFOOT', true);
//
So maybe you could define MDL_PERF and MDL_PERFDB and have a look at the numbers to see if the slowdown comes from MySQL or from Moodle.
[Edit: This thread seems interesting
http://moodle.org/mod/forum/discuss.php?d=42040#193478 ]
Saludos. Iñaki.
I turned on and checked the slow query logs and did not see anything there. I suspect that it is on the Moodle end. In particular, I am beginning to think that it is because I have enabled some filters (namely, autolinking) and with 600 words per student * 30 students I am guessing that processing that amount of text has slowed things down. I am thinking of looking into a way of hacking the page so that it does not attempt to do the Resource and Activity auto-linking filters. I would like to leave Algebra and TeX filtering in case one of the courses in the Math department uses it as well as the filter for inappropriate language and also the word censorship filter. It seems to me that it might be helpful to have a little more control over when the filters get used especially if they are going to cause a significant performance hit.
Having the same problem in assignment mod is slowing down. I did check if the group having more and more activity the slower the assigment module.
I looking for a patch or something to accelerate the assignment mod. Thanks
After a series of test, I therefore conclude its the cuplication of activity causes the slow down