Delay between quiz question pages (how do I eliminate it?)

Delay between quiz question pages (how do I eliminate it?)

by A Guy -
Number of replies: 5

What are we using: Windows 2008 R2. Moodle 2.3 MySQL Innodb.

 

Each quiz question is its own page. When the student clicks next to go to the next question there is a delay while the next question loads.

 

I have tuned teh database some. It helped speed the entire site up and reduced the quiz question dely by about .66 seconds. But there is still a delay.

I have reviewed all the other suggestions for performance and they don't apply--filters, language packs, reports, etc. 

I turned slow querying on (this is MySQL) and the quiz does put some slow queries in there. While I have not examined for "slowness" or to optimize them it would mean customizing Moodle code as this is default stuff.

 

So what can I do/try? I have reviewed the message boards and saw that a person or other has referenced how slow the quiz module is. As a matter of fact Moodle's performance page comments on it when it talks about how to get a true test of concurrent users.

 

Average of ratings: -
In reply to A Guy

Re: Delay between quiz question pages (how do I eliminate it?)

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

A Guy,

Are you using any kind of PHP cache on your server. One of my biggest performance improvements I experienced on my server with Moodle 2.3 was when I finally started using a PHP cache.

AL

In reply to AL Rachels

Re: Delay between quiz question pages (how do I eliminate it?)

by A Guy -

Yep Wincache is installed

In reply to A Guy

Re: Delay between quiz question pages (how do I eliminate it?)

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

How much memory are you allocating to wincache? I have never used it, but I am guessing it is similar to the cache programs used on Linux servers. I am using Centos 6.3 with APC. A default install of APC allocates only 32 MB of RAM for the cache. By trial and error, I have learned that starting from an empty cache, that just loading the front page of my Moodle 2.3.2+ will cache about 1100 files and use about 68.5 MB of memory. In other words, the default install really doesn't help as it is instantly filled up with only part of the files needed for the first page load. The time to live setting keeps them there too.

On my server, listing performance at the bottom of a Moodle page shows NO SIGNIFICANT difference in time with cache turned off and with it on when set to the default 32 MB cache size because not enough of the needed files make it into the cache. When I allocate enough memory to keep from instantly filling it, the first load will not show any improvement either, but once the files are cached, each succeeding page load sees about a 33% improvement of the time listed as nearly every file is now coming from the cache. My students usually see much faster times than I do as the admin. They typically see .1 to .4 seconds for almost any page while I usually get .4 to .8 seconds. Compared to the 2.o to 8.0 seconds I was getting in June, I am now very happy with my current server setup.

I am still trying to figure out how large I need to ultimately make my cache. I have just recently decided 256 MB is too small for my Moodle 2.3.2+ install. Next week, I am going to try upping it to 512 MB and see how that works.

No guarantees that you will see improvement like I have but it is something to look at. Your mileage may vary.

HTH

AL

In reply to AL Rachels

Re: Delay between quiz question pages (how do I eliminate it?)

by A Guy -

I found out that wincache was installed but no turned on if you will. So I am going through that process. It actually involved changing the PHP build and swithcing ISAPI to FastCGI etc as this is IIS 6.0. I will see if wincache solves this and get back to this post.

In reply to A Guy

Re: Delay between quiz question pages (how do I eliminate it?)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Those slow queries are thrown by quizzes, right? What are they? A detailed report will help the developers to optimize them.