Specific areas of Moodle slow, others perform fine

Specific areas of Moodle slow, others perform fine

by David Nelson -
Number of replies: 3

I have a two instances of Moodle -- last year's (so people can download and import their old courses), and this year's. One VM is the web server for both, the other is database for both.

On the new instance, a couple specific areas of Moodle are very slow. For example if we go into a course and click on a folder that has several images in it, it can take up to 30 seconds for a given image to load. Also, if you go to the list of all courses, it can take 30 seconds or so for the list to load.

Meanwhile last year's Moodle, which has a comparable number of courses and *much* more data in it, loads everything near instantly.

The targeted slowness is reproducible even off hours when the servers are under virtually no load whatsoever, so it doesn't seem to be a matter of being starved for resources. I've also been combing the admin screens one by one trying to find a difference between the two setups but am coming up with nothing there. 

The current one is running 3.1.2+ (Build: 20160915) while last year's is on 2.9.1 (Build: 20150706). The web and database server are both CentOS 7 with latest Apache and MariaDB currently available. As I mentioned earlier they are hosted on the same web server and same database server, so there is no difference in the server configuration and specs.


What should I be looking for to figure out why this year's instance has these issues compared to last?

Thanks!

Average of ratings: -
In reply to David Nelson

Re: Specific areas of Moodle slow, others perform fine

by Ken Task -
Picture of Particularly helpful Moodlers

Could be many ... hard to tell ...

Got mysqltuner.pl on the DB box?  If not install it and run the tuner to see what it recommends for tweaks that might be needed.

Config for DB might need to skip_networking.

Install same tuner on the web server and run it at the DB box ... you'll see some differences.

Caching ... using memcache or other?   How about php-opcache?

What's setup of Apache?   mod or a fastcgi?

What's free and df look like?   How about top?

VM's ... got noisy neighbors?

Nothing in error logs?

'spirit of sharing', Ken


In reply to David Nelson

Re: Specific areas of Moodle slow, others perform fine

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Are you able to make a copy of your site on another server? If so, you can using the XHProf PHP extension to see where the time is going. See this blog post: http://tjhunt.blogspot.co.uk/2013/05/performance-testing-moodle.html. (You probably would not want to enable XHProf on your live server, at least, not permanently.)

In reply to David Nelson

Re: Specific areas of Moodle slow, others perform fine

by David Nelson -

Hi all, thanks for the feedback. The problem is fixed though I can't say precisely how.  

We were under some pressure to get it resolved quickly so I tried just setting up a whole new server with the latest Ubuntu, hoping that some difference in the server environment would help  

First I tried pairing the existing CentOS 7 web server with Ubuntu for the database but that didn't help. So I tried making the new Ubuntu system the web server pointing to the existing CentOS 7 MariaDB server and that fixed it.

I wish I could share what difference between the two actually solved it, but I am just glad to have it fixed. I did go straight to PHP 7 on the new web server so that could have been a factor, but hard to say without further trial and error. And I'm not too keen on that now that it's working.

Thank you!