Serious Performance Issues

Serious Performance Issues

by Kent Villard -
Number of replies: 8
Hey folks - Since we upgraded to 1.9 (now running 1.9.3+) under HTTPS we have been having huge performance issues. 1.8 under HTTP ran very fast on this same server. It's a dual core 2.4Ghz Xeon with 2.5Gb RAM. We are running under Debian Linux/PostgreSQL 7.4 with less than 5000 users and less than 800 active courses (not all of those are even in use).

At times the system slows to an unusable state. I have tweak the database settings and it has helped some but things still are not right. Relatively simple things click clicking save on a course settings page takes anywhere from 30 seconds or several minutes to complete. It was nearly instantaneous on 1.8.

I know running under HTTPS will slow things down a bit but basic page delivery seems to be okay. It's when you try to upload, backup, restore, change course settings etc, that the performance issues hit.

Does anyone have any suggestions on what I should look at next. Thanks
Average of ratings: -
In reply to Kent Villard

Re: Serious Performance Issues

by Elvedin Trnjanin -
Check the CPU usage of the web server when you're downloading a file. Also, having two instances of the same Moodle installation, one over HTTPS and the other not. If the HTTPS instance has performance issues, then look into either benchmarking the crypto libs used to see if they're the cause or something else.
In reply to Kent Villard

Re: Serious Performance Issues

by HJWUCGA INC. -
Kent,

We're experiencing the same thing now too albeit with version 1.9.2. We're getting 504 - gateway timeouts when a user tries to restore or resets a course that really is not that big .. about 100 MB.

Does anyone have best practice advice on how to optomize apache and the db? mysql (ISAM)? More technical with examples would be best. The Moodle docs are too generic.

Thanks
In reply to Kent Villard

Re: Serious Performance Issues

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You need to get some information... Install munin or nagios. Failing that, just run 'top' and watch when it's slow. What processes are causing the bottleneck? Once you know that you can investigate further.
In reply to Kent Villard

Re: Serious Performance Issues

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Try it without https ... under https you will find a lot of browser caching doesn't work and this will impact a lot as Moodle can have some big stylesheets etc. I could be wrong about this for your case but at least you can eliminate https as a cause this way.

Generally 1.9 should be quite a bit faster than 1.8 ... a lot of optimisation was done on roles etc.

You may need to do some database tuning if the database sizes have changed.
In reply to Martin Dougiamas

Re: Serious Performance Issues

by Kent Villard -
Thanks Martin and everyone else who weighed in on this issue. You've given me some things to try and I am greatful! Off I go to do some testing smile
In reply to Martin Dougiamas

Re: Serious Performance Issues

by Mr. Marc -
Martin how do you know what to tune or how to tune it? where do you start?
In reply to Kent Villard

Re: Serious Performance Issues

by Dan Poltawski -
Hmm, I thought that we had depreciated support of postgres 7.3 in Moodle 1.9 and required 8 as a minimum. Its probably a bug that you have managed to upgrade with 7.3.

The recent versions of postgres have really had a lot of work put into performance, so I would suggest an upgrade to 8 even ignoring to Moodle requirement.

Also try running the missing indexes report in the xmldb editor.

In reply to Kent Villard

Re: Serious Performance Issues

by Samuli Karevaara -
Sometimes it's just a couple of slow database queries that can bring the system down. Can you take a look at the slow query log? (I'm not sure what it is called in Postgres, we are using MySQL).