Moodle Statistics block slowing down moodle

Moodle Statistics block slowing down moodle

by Tom Moseley -
Number of replies: 5

Hi

We have moodle 1.9 installed on a local server. Recently our statistics block has started really slowing down moodle. To the point that when a lot of users were on it was adding 30 seconds to loading the page. When there isn't many connections it still takes about 15 seconds to load. When it is hidden the problem goes away.

Anyone else had this problem or know what is causing it?

Cheers

 

Average of ratings: -
In reply to Tom Moseley

Re: Moodle Statistics block slowing down moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Could be useful: "Please include as much background information as possible about your hardware, the operating system, the web server, the database server, the PHP scripting framework, etc." (source: https://moodle.org/mod/forum/view.php?id=596 ) and perhaps the Moodle (point) version?
In reply to Visvanath Ratnaweera

Re: Moodle Statistics block slowing down moodle

by Tom Moseley -

Hi Sorry.

It's Moodle 1.9.16 on windows server 2008. 

PHP version 5.2.14

HP ML350 with 8GB RAM and Xeon E5504 processsor.

The statistics have been running fine and then just recently started horrifically slowing moodle down unless hidden.

Thanks

In reply to Tom Moseley

Re: Moodle Statistics block slowing down moodle

by Frederic Nevers -

Have you checked your database? Are any of the tables corrupt by any chance? Might be worth optimizing/repairing tables and see whether that makes a difference. This is a bit of a shot in the dark.

Is your cron still running?

Cheers, 

Fred

 

In reply to Frederic Nevers

Re: Moodle Statistics block slowing down moodle

by Tom Moseley -

Hi 

I think my statistics table could be too full as the daily one is 54mb. How do i clean it out to start afresh. As i have tried optimising it also but it still seems pretty large.

Thanks

Tom

Attachment Screen Shot 2013-03-01 at 15.06.45.png
In reply to Tom Moseley

Re: Moodle Statistics block slowing down moodle

by J S -

Hi

Statistics is primarily a database oriented task.  I would focus exclusively on the database first and work your way out to other systems as you learn more.  

A couple suggestions:

- Run statistics during a well known downtime (overnight, weekends, etc) or with less frequency

- When the problem presents itself, log into the database and do a listing of all the database processes (within the database).  Statistics will probably be the longest running process.  If you see something that has been running longer, that could be conflicting with stats causing your slowness.

- Monitor your database server looking at the 4 main areas (cpu, mem, network, disk).  Real time monitoring is not enough.  You need to monitor and measure your performance using a monitoring tool to know what is "normal" and what is not normal.

- Upgrade your database if not running something fairly recent.  Typically db upgrades come with performance enhancements.

- Upgrade moodle to 2.x

- Trim data from your database and optimize the database.

good luck