Our Moodle Site Slow Over Internet

Our Moodle Site Slow Over Internet

by Reynard Cobham -
Number of replies: 10

This is probably a setup issue, but I've been unable to track it down.

On our local intranet, Moodle is extremely quick and very responsive, however over the internet page load times are awful, with simple courses with just text taking over 15 seconds, which has proven too much for our staff to cope with and all my hard work is currently gone to waste as they refuse to use it as is.

Moodle is 1.9+ (fairly close to the initial 1.9 release - as I've not been on-site for some time and have a limited remote access window I've not wanted to mess with this, as the updates have been more bug fixes than performance related)

Its based on Windows 2003 Enterprise server, with IIS6, mysql 5.0.45 , and php 5.2.5.

The hardware is overly specced but was intended for 1400 students, 100+ teachers and every course taught (approx 600) and is as follows:

Dual Quad Core Xeon processors @ 1.86GHz each core, 8GHz Ram and 2 SCSI 15k rpm 72Gb drives mirrored for the OS and 4 SCSI 15k rpm 300Gb drives in Raid 5.  The Internet provider is meant to provide a measly 4 Mbit upload I believe.

The ISP (our LEA designated one) provided an external IP address, but requested we use only our internal one - their DNS server presumably providing the redirection to our site and I'm wondering if this is the stumbling block.  IIS and local network settings are only set to the given local IP, with Moodles config pointing to the full URL.  This is not my area of expertise and I'd appreciate any info on how this should have been setup! smile

Thanks muchly,

Rey

Average of ratings: -
In reply to Reynard Cobham

Re: Our Moodle Site Slow Over Internet

by Ken Wilson -
What's the site's URL, Rey? Sometimes external access is subject to localised ISP issues, so it would be helpful to have the URL to check speeds from various locations.
In reply to Ken Wilson

Re: Our Moodle Site Slow Over Internet

by Reynard Cobham -

Can certainly try it - the system is currently untouched by other staff since April, I've created a testmoodle user with a password of test123.

The address is http://moodle.derbymoor.derby.sch.uk/  It did look OK on both Firefox and IE but seems somethings thrown Firefox off a little.  I'll get round to working that one out shortly smile

Logging in will show a copy of one of the slow courses, plus a couple of others which dont seem so bad.  Editing rights have been given for those courses as its then the slowness really starts to show.

I didnt attempt to use a php accelerator with Moodle for our site but have noticed that even just browsing Assign Role type pages the server is painfully slow off-site.  I was hoping the server being fairly powerful wouldnt have need of another bolt-on app for speed.  It isnt performing any functions other than Moodle and I'm the only user at the moment!

Thanks for the interest smile

Rey

In reply to Reynard Cobham

Re: Our Moodle Site Slow Over Internet

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I have tried it from here (Spain, 00:13 AM) on a 3 Mbps DSL line. And it doesn't look that bad (1-4 seconds to load any of the course pages that were available to that user). Times go up when you enable editing, but they are mainly spent on the server side.

I've used Firebug (a firefox plugin) that measures the download times of every different component of the page (html, images, css, js, etc.), as well as giving a total time. That coupled with the performance information at the bottom of your pages has led me to the conclusion I mention above.

Saludos. Iñaki.

In reply to Reynard Cobham

Re: Our Moodle Site Slow Over Internet

by Ken Wilson -
To confirm Iñaki's observations, I'm getting respectable (<2s) server-side page generation times displayed in the performance footer from Hull (UK). Things vary on the browser side with YSlow reporting times ranging between 3s - 9s for the sample course and 2s to 6s for the features course. That may explain the apparent slowness.

Some suggestions:
  • Have you tried downloading YSlow? It will analyse the site based on Yahoo's 13 rules for high performance web sites, so may improve things on the browser side. Take a look also at this article, which explains the basis for these 13 rules: http://developer.yahoo.com/performance/
  • It may also be a good idea to add a PHP accelerator - just to make sure that you've done all that you can to reduce those page generation times in the performance footer even further. Choose whichever one you like best - there's really little difference between them - although this site suggests going for APC or Xcache thoughtful.
  • I also noticed that RAM usage was quite high at around 15MB, so another improvement would be to look at your webserver itself and your PHP compilation to find ways of reducing the memory usage. There have been success stories with lighttpd reported, so you may want to take a look at that one.
Finally, try to make all of the MySQL improvements as suggested in the Performance FAQ. Aim to get server-side page generation times reduced to < 0.5s and YSlow times reduced to < 2s.

Hope this helps!

Ken
In reply to Ken Wilson

Re: Our Moodle Site Slow Over Internet

by Reynard Cobham -

Thanks muchly to both Ken and Iñaki for your info/thoughts smile

I will certainly look into the reading materials and tweaks.  I have done some of the MySQL mods but will check again with the FAQ.

Alas I've since been told the school has to go with Sharepoint as their 'VLE' sad  However they will be keeping Moodle for the moment as we did generate a couple of questionnaires that have proven useful (and they cant work out how to generate their own yet!)

Sad days for me, but as I'm no longer on-site and not being paid for any work on the server it is more for curiousities sake.  I know a number of staff were interested in Moodle - but the school didnt take me up on getting myself and other key members trained on good course creation techniques.  There may still be some hope for it if I can get some staff support, but I suspect without the support from senior management it'll never achieve what it could have.

Are there any decent guides for Teachers/Course Creation? The ones I did find seemed a bit too longwinded and unwieldy for todays overworked teachers!

The testmoodle account will be disabled now, should anyone be reading this at a later date.

Thanks again,

Rey

In reply to Reynard Cobham

Re: Our Moodle Site Slow Over Internet

by Matt Gibson -
Sharepoint isn't really a VLE as such from my understanding, but a way of gluing other things together. It has webparts for Moodle so that Moodle can be directly integrated with it available from the modules and plugins forum, so you could try persuading them to integrate it with moodle long term. I'm pretty sure there is a lot more you can do with Moodle.
In reply to Reynard Cobham

Re: Our Moodle Site Slow Over Internet

by Srikrishna Das -
Took about 4 secs to load that page. (256Kbps line here)
In reply to Reynard Cobham

Re: Our Moodle Site Slow Over Internet

by Jamie Robe -
Hi. I am new to Moodle but have created and operated Plone and other CMS websites for years. I had a very perplexing situation similar to this once. It had to do with slow websites too.

We had users inside our firewall accessing the website using a real-world IP address supplied by our ISP, pointing to our Reverse Proxy webserver - a Linux box running Pound. Thsi box was way over speced too and Pound just passes on teh request to backend servers inside the Firewall (in our case I had SSH tunnels poking thru from the inside servers for security sake,but that is another story...). Anyway, our ISP did some changes, and around the same time soem of the users on the inside started reporting periods of use (editing the content) that seemed slow. I also started experiencing this. Thinking our bandwidth, server loads, or something was up, ran all sorts of tests. Ended up having people use the network IP addresses of the inside servers, wen editing from inside the site. A pain, but it was faster.

The curious thing was that when I was at home, I never had that problem. I just access the site using the real world IP or domain name, all was cool.

Turned out it was due to some sort of wierd DNS problem the ISP had caused. Sort of a loop or extra hops that or some extended period of DNS lookup that our messed up our inside domain controller. The ISP did some magic and we never had that problem.

Given that the moodlers testing your site from the outside saw it as pretty fast or acceptable, perhaps something similar is happening. I have learned to never trust any ISP smile

I haven't seem it discussed her on moodle yet, but having a hardened webserver running something like pound as your exposed server, and passing all requests back to the server running moodle would seem a smart idea. Has always helped protect our Plone websites and you can always scale up multiple backend servers - pound is load balancer too.

Just felt like sharing that,
Jamie



In reply to Jamie Robe

Re: Our Moodle Site Slow Over Internet

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> ... soem of the users on the inside started reporting periods of use (editing the content) that seemed slow. I also started experiencing this. Thinking our bandwidth, server loads, or something was up, ran all sorts of tests. Ended up having people use the network IP addresses of the inside servers, wen editing from inside the site. A pain, but it was faster.

> The curious thing was that when I was at home, I never had that problem. I just access the site using the real world IP or domain name, all was cool.

What is your $CFG->wwwroot variable in config.php?

> Turned out it was due to some sort of wierd DNS problem the ISP had caused. Sort of a loop or extra hops that or some extended period of DNS lookup that our messed up our inside domain controller. The ISP did some magic and we never had that problem.

Oh, that's scary! sad

> I haven't seem it discussed her on moodle yet, but having a hardened webserver running something like pound as your exposed server, and passing all requests back to the server running moodle would seem a smart idea.

This topic comes up quite often in this forum. See for example http://moodle.org/mod/forum/discuss.php?d=102500

Incidentally wordpress is moving from pound to varnish: http://barry.wordpress.com/2008/04/28/load-balancer-update/
In reply to Visvanath Ratnaweera

Re: Our Moodle Site Slow Over Internet

by Jamie Robe -
Hi. I was just talking with our network admin about this again. In our case the cure was adding a dns record to our domain controller. After that, both connections from inside and outside our network ran fast.