moodle 2.4.7 is very slow....help me please T_T

moodle 2.4.7 is very slow....help me please T_T

by Johnny Stevens -
Number of replies: 9

hi everyone

i update my moodle site from 1.9 -> 2.2 -> 2.3 -> 2.4.7+

and i find that moodle 2.4.7+ is really slow

i dont know what reason 

i need to wait at least 5 seconds to acess every page

login---> 5 seconds ---->  choose course 5seconds ....

someone help me please T_T

------------------------

ubuntu 10.04

php 5.1.72.0.0.10.04.1

mysql 5.3.2.1.4.21

Average of ratings: -
In reply to Johnny Stevens

Re: moodle 2.4.7 is very slow....help me please T_T

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

What's the hardware? How much memory? Is it all running on the same box? Is it virtualised? How many users does it need to be that slow (assuming more than 1)? What have you done, if anything, to diagnose the problem?

Who are you logged in as? Is this a big site with lots of courses, users, plugins? If you're logging in as admin try as an ordinary user for comparison.

In reply to Howard Miller

Re: moodle 2.4.7 is very slow....help me please T_T

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Is theme design mode on? What is page load time like if you turn off Javascript?

In reply to Marcus Green

回應: Re: moodle 2.4.7 is very slow....help me please T_T

by Johnny Stevens -

theme design mode is off

turned off javascript but nothing  different T_T

In reply to Howard Miller

回應: Re: moodle 2.4.7 is very slow....help me please T_T

by Johnny Stevens -

hardware 

memory -> 2GB

cpu        ->intel xeon e5405

not virtualised

-------------------------------------------------------------

no other extra plugins only the original ones 

i logged in as admin and i tried to login as an ordinary user after your post

it seems normal to login as an ordinary user ._.

where is the problem ?

thanks for your help :P

In reply to Johnny Stevens

Re: 回應: Re: moodle 2.4.7 is very slow....help me please T_T

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Do you mean that it is much faster when logged in as your test user?

You need to see what the machine is doing. I would watch 'top' when loading pages to see what is happening (e.g. http://www.jonathanmoeller.com/screed/?p=762) - particularly look out for the machine using 'swap' memory. 

You might want to install a monitoring program like 'munin' (https://help.ubuntu.com/12.04/serverguide/munin.html) which will give you a visual indication of what the box is doing. 

Just checking there's nothing else you haven't told us. What sort of hardware is this? Are the disks local or is your $CFG->dataroot on an NFS share or something similar? Sounds like your hardware is four or five years old and isn't likely to give fabulous performance but should be better than that. 

Have you checked your Apache log (/var/logs/apache2/error.log) to see if anything bad is happening. I would turn debugging on in Moodle too - just in case something is actually broken. 

Is anything else running on the server or is this dedicated to Moodle?

Average of ratings: Useful (2)
In reply to Howard Miller

回應: Re: moodle 2.4.7 is very slow....help me please T_T

by Johnny Stevens -

there are 5 courses and 2 accounts (one is admin another one is for testing)

db and moodle is working on the same server 

 

In reply to Johnny Stevens

Re: 回應: Re: moodle 2.4.7 is very slow....help me please T_T

by Greg Padberg -

Assuming that there is nothing wrong in the Moodle configuration and only the performance is bad and that nothing is broken, I would start with optimizing the database.  I am assuming you have the entire Moodle installation on a single server, and are using the default LAMP stack.  I moved my Moodle version 1.9 installation to a new server (Ubuntu Server 12.04 and upgraded to Moodle 2.0) during the summer of 2012 and when classes started again the new server just couldn't handle the load.  The server was in a VMware virtual environment, so adding more RAM and processor was easy.  Still, the server crashed under load a couple of times, and adding more RAM did not seem to help.

Installing mysqltuner and running it yielded a lot of hints to tweak how much memory could be allocated to the MySQL database.  The stock configuration does not make use of very much available memory so running mysqltuner and then tuning the my.cnf file accordingly repeatedly over time yielded much better results and complete stability.

Further speed increases were had by installing and tuning the APC (Alternative PHP Cache).  Now my benchmark is that pages should load in less than a second, and almost always are well under that.  FYI, my Moodle installation has about 2000 users total and runs on a single virtualized server.

Average of ratings: Useful (2)
In reply to Greg Padberg

Re: moodle 2.4.7 is very slow....help me please T_T

by Greg Padberg -

One more thing I forgot to mention, to determine your baseline of mysql current settings before any tuning the my.cnf file:

mysql show variables

In reply to Greg Padberg

Re: 回應: Re: moodle 2.4.7 is very slow....help me please T_T

by samuel h -

Would you be able to post the tuned version of my.cnf along with the current hardware setup?

 

Thanks,

S