Loading Time
Number of replies: 10
I have Moodle installed on a Windows 2003 server (1GB RAM), and I am finding that the initial loading of Moodle is slow, then it flies. When I first visit my site, the browser says "Looking Up" and my tab shows "Loading" and it does this for about 5 seconds. Then all of a sudden, the whole site loads instantly. This is on my LAN as well as when I access the site outside the LAN. I don't think it is a Moodle config problem, rather, an Apache setting that needs changing. Any ideas what I could do to improve performance?
Re: Loading Time
Hi Chris
I can't tell which version of Moodle you're using, so... If you're using Moodle 1.7 and loading the moodle/index.php page is slow, then in addition to any Apache tuning which you may have to do, it could also be as a result of a query which works out the roles, capabilities and overrides of the user. Take a look through the posts in this forum especially (http://moodle.org/mod/forum/discuss.php?d=58208) and also MDL-8120.
Hope this helps!
Ken
Re: Loading Time
Hi Chris,
I would just like to add one thing to Ken's excellent reply: if you have a way of monitoring queries going through your database, this could tell you if it's a slow SQL query. I was able to start MySQL with the --log-slow-queries parameter and monitor this log for indications that our database was a bottleneck. If you have a number of users, courses, or content, you might be affected by the MDL-8120 issue. A forum thread discussing this can be found at: http://moodle.org/mod/forum/discuss.php?d=61845
-Max
I would just like to add one thing to Ken's excellent reply: if you have a way of monitoring queries going through your database, this could tell you if it's a slow SQL query. I was able to start MySQL with the --log-slow-queries parameter and monitor this log for indications that our database was a bottleneck. If you have a number of users, courses, or content, you might be affected by the MDL-8120 issue. A forum thread discussing this can be found at: http://moodle.org/mod/forum/discuss.php?d=61845
-Max
Re: Loading Time
Thanks guys. I don't know if it would be the database. Right now, I only have about 4 classes on Moodle, with a total of 85 student users, and no more than 25 on at a single time. I can't figure out why it runs so slowly. I was reading about a tune-up and might try that approach.
Re: Loading Time
If you don't know if it would be the database, you should probably follow the posters advice about logging the slow queries. In my experience, 99% of performance problems with moodle can be traced back to the database. My guess, if you have very few courses, is that somehow your indexes are messed up but I don't know.
However, if you log the slow queries it might steer you in the right direction.
However, if you log the slow queries it might steer you in the right direction.
Re: Loading Time
Re: Loading Time
Yes, I have tried it in both firefox and Safari and it does the same thing.
As I look at it more, I think it might be a php issue. So I wanted to look and see if I could use a php accelerator. I went to the Moodle/php folder and I see there is a folder marked for eaccelerator and zendoptimizer. I want to use eaccelerator and I see that there are only 4 files in there - eaccelerator.php, eaccelerator_password.php, encoder.php and a readme. I then went to the eaccelerator site and downloaded the latest release. How do I now use it? Do I just extract the files to that folder and open the eaccelerator.php file? I tried looking at http://eaccelerator.net/wiki/InstallFromSource and there is just so much I am unfamilar with there to make sense of it.
As I look at it more, I think it might be a php issue. So I wanted to look and see if I could use a php accelerator. I went to the Moodle/php folder and I see there is a folder marked for eaccelerator and zendoptimizer. I want to use eaccelerator and I see that there are only 4 files in there - eaccelerator.php, eaccelerator_password.php, encoder.php and a readme. I then went to the eaccelerator site and downloaded the latest release. How do I now use it? Do I just extract the files to that folder and open the eaccelerator.php file? I tried looking at http://eaccelerator.net/wiki/InstallFromSource and there is just so much I am unfamilar with there to make sense of it.
Re: Loading Time
1 GB RAM hesitating to display even the homepage? There is something very wrong.
Did you check the obvious? $CFG->wwwroot = 'http://the.way.you/moodle'; in your config.php?
Is this the way you debug Windows servers? You speculate "something wrong with PHP", and then? reinstall PHP? Add RAM, add an accelerator? All that sound very tedius to me
If your customer is a proffessional institution, consider switchting to a Unix flavour.
Did you check the obvious? $CFG->wwwroot = 'http://the.way.you/moodle'; in your config.php?
Is this the way you debug Windows servers? You speculate "something wrong with PHP", and then? reinstall PHP? Add RAM, add an accelerator? All that sound very tedius to me
If your customer is a proffessional institution, consider switchting to a Unix flavour.
Re: Loading Time
I did check the wwwroot and I have it setup correctly. The reason I speculated it might be something wrong with PHP is when one person logs on, the delay is between 5-10 seconds before the page loads. But once there is a group logging on (and by group, I mean between 5-25 students simultaneously), a couple of kids get on but all the others get 60 second timeout errors. I have looked at the resource usage on the server and it is never at maximum when the students are trying to logon. So that is why I am considering php accerlerators.
If I had control of the budget, I would consider switching OS's, but since the Windows server is in place, that is what I have to work with.
If I had control of the budget, I would consider switching OS's, but since the Windows server is in place, that is what I have to work with.
Re: Loading Time
If you are stuck with windows try to approach the issues in a Linux/Unix way (i.e. get your hands on some good monitoring tools) - I strongly recommend http://www.sysinternals.com/Utilities/NtfsDos.html (don't be confused about "DOS").
Also:
-how is your Windows DNS resolution set up?
-is Apache configured to do a reverse DNS on the client?
Also:
-how is your Windows DNS resolution set up?
-is Apache configured to do a reverse DNS on the client?
Re: Loading Time
Talking about Windows, may be that Dept. know this problem
http://moodle.org/mod/forum/view.php?f=931
http://moodle.org/mod/forum/view.php?f=931