Assignment Submissions Slow Down

Assignment Submissions Slow Down

by Anthony Borrow -
Number of replies: 6
Picture of Core developers Picture of Plugin developers Picture of Testers
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.
Average of ratings: -
In reply to Anthony Borrow

Re: Assignment Submissions Slow Down

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
MyISAM tables are faster, but don't have transaction support. Given that Moodle doesn't use transactions when using MySQL (it does with Postgres in certain areas), using InnoDB doesn't really buys you anything.

So I guess MyISAM is the way to go with Moodle at this moment.

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: Assignment Submissions Slow Down

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
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
In reply to Anthony Borrow

Re: Assignment Submissions Slow Down

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I don't really know sad

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.
In reply to Iñaki Arenaza

Re: Assignment Submissions Slow Down

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
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. 
In reply to Anthony Borrow

Re: Assignment Submissions Slow Down

by Genner Cerna -

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

In reply to Genner Cerna

Re: Assignment Submissions Slow Down

by Genner Cerna -

After a series of test, I therefore conclude its the cuplication of activity causes the slow down