Moodle 2 is VERY SLOW - Staff are not happy!

Moodle 2 is VERY SLOW - Staff are not happy!

eftir Michael Dean -
Number of replies: 21

Hi Guys, Recently started 2012 with a fresh Moodle install. We installed 2.1, and then 2.2 - manually migrated 300 courses from 1.9, and yesterday my staff came to me at the end of their tether - Moodle 2 is unusably slow...

I have spent hours following tuning guides etc, installing PHP accelerators... Now teachers are returning and my complaints tray is overflowing.

I spent a lot of time getting faith back in eLearning using 1.9 - and I feel that it is going backwards.

What can I do to get this moving (server is running 4G RAM on 32bit Windows IIS6, FCGI).. PLEASE!!!

 

Average of ratings:Useful (1)
In reply to Michael Dean

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Perry Gretton -

If the response is slow when there's only one user on the system, it could be that you were close to the server's limit previously. Release 2.x is more demanding than 1.9.

In reply to Michael Dean

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Brandon Blackmoor -

First, you may need to migrate to an actual web server. Trying to run a web server on a Windows machine is like riding a bicycle on the freeway.

Second, check to see if either the web root or the Moodle files directory are on a NFS mount. Moodle does not work well with NFS mounts (for reasons which make no sense to me). We had a similar "very slow -- staff not happy" situation, because the files directory we were using was ona NFS mount. We switched it to a local directory, and that fixed our "very slow" problem.

Good luck.

In reply to Brandon Blackmoor

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Michael Dean -

Cheers guys. I've come from a corporate Comms background, so I am pretty OK with Servers and hosting. Here however, I am constrained to the corporate policy.

I am unsure why the system is on a 32 bit OS in a virtual environment - But I'm not happy as I have obviously tapped the 4GB ceiling...

The Moodledata directory and Webroot are both on straight "folders", no NFS access, just plain old NTFS.

So far I have removed ITS running the whole system over SSL (including database transactions). I have increased memory limits on scripst and processes (Previously only 500MB of RAM was ever being used... The only thing spiking is CPU (due to FastCGI)

In reply to Michael Dean

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Marc Grober -

Did someone say "pointy haired boss"?

Restore the 1.9 Moodle that was in place. Never abandon what works in favor of an unknown.

Ask management to put out an RFP to have a Moodle Partner diagnose the problem you are having. Offer a competing proposal to build an appropriate server (understanding from the get go that Modle 2 is a bit of a cow.)

When management realizes what a mess they are in based on the above and provide you the resources to do your job, create a fresh Moodle 2 install. Now have your instructors re-design their course to address the dofferences in Moodle 2, and install each course in Moodle 2 and stres test as you go.

When you have a usable (5 nines) Moodle 2 install, turn down your Moodle 1.9 instancne and move your folk over (prefereably NOT in mod course.)

Average of ratings:Useful (1)
In reply to Michael Dean

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir greg mushial -

Michael - have you looked at your memory utilization? Or paging rates? What caught my eye when you were talking about moving 300 courses across - I'm assuming that they're being used at least at some level, ie, your concurrent user numbers aren't zero - supporting them is going take some memory. In honing our 1.9 system, about everything improved by throwing memory at it - this is a LAMPS system - but by going from 4GB to 8GB to 16GB, we were able to give APC everything it wanted, likewise memcache and mysql. And given the cost of memory, this was a hugely cost-effective change. Since you're running a 32bit windows, maybe you can't do anything about the RAM..  but that's where I would look (after the mount point question).

Average of ratings:Useful (1)
In reply to greg mushial

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Michael Dean -

Cheers again. All the usual flags are OK - Paging ETC..

To go back to the point "Pointy haired boss" and Restoring 1.9 - Unfortunately we went through a rebrand - all URLs changed, new security policy, etc...

 

So I thought, "hey let's start afresh". Of course, now teachers are updating their content I surmise that I cannot back up then restore the courses into 1.9 due to the backup format.

RE: Concurrent users - When my team was restoring the courses to 2.2, we had no teachers on deck, and the server scope was not visible to the world.

In reply to Michael Dean

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Dan Marsden -
Mynd av Core developers Mynd av Particularly helpful Moodlers Mynd av Peer reviewers Mynd av Plugin developers Mynd av Plugins guardians Mynd av Testers Mynd av Translators

The quickest solution (if you can convince the Boss) might be to engage a Moodle Partner to come and sort it out for you - there are 2 Australian Moodle Partners .... and one NZ Moodle Partner with an office in Sydney...wonder who that is wink

It does sound like your hardware might be part of the bottleneck - so you should be prepared to hear that it requires more resourcing.

In reply to Dan Marsden

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Michael Dean -

Haha! Yes! All problems really CAN be solved with enough cash! Our little place is a bit strapped, and when I can get to the ITS guys I intend to ask WHY we are stuck on a 32bit OS when the new box I bought last year has about 32 available... I think that perhaps my little piece of hardwre is leveraging a few other VMs...

Without access to the server room, I can't be sure - but I have convinced the staff to keep their heads up, I am going to fix it! Like I said, after being in IT Comms / Networking for the last 15 years (10 as a lecturer) I am pretty sure I know how to build a box and get it firing... Not being IN the ITS team has it's drawbacks though.

Until I can nail the ITS guys down (implementing a new student / staff domain from scratch) are their any tweaks I can make to just alleviate the pain?

In reply to Michael Dean

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Dan Marsden -
Mynd av Core developers Mynd av Particularly helpful Moodlers Mynd av Peer reviewers Mynd av Plugin developers Mynd av Plugins guardians Mynd av Testers Mynd av Translators

what are you running as your db server? - is it on the same server? - sometimes you can improve performance a bit by seperating out the db/web server.

Which accellerator are you using? - are you using the microsoft one (wincache I think it's called)

IIS 6 is a bit old too...

Microsoft has a web application gallery (which includes Moodle) - it installs PHP/IIS/Moodle in a pretty quick/semi-tuned manner. (only supports Mysql at this stage though) - if you have the option of creating a new VM running a newer version of win server I'd suggest using that installer to set the server up - then replace the moodle db/files with the ones on your old server.
http://www.microsoft.com/web/gallery/moodle.aspx

- you could even just use the gallery to install PHP/wincache and do the moodle/db level install yourself.

Even better might be to convince your ITS team to install a linux vm (moodle docs has a lot more info on tuning/installing moodle on a linux box than windows)

But none of this is guarenteed to improve the performance - you might just not have enough hardware available to run Moodle 2.x (which is more resource intensive in some areas) - also your usage of Moodle may have increased compared to last year so your server will have to work even harder due to the increased traffic.

Average of ratings:Useful (1)
In reply to Michael Dean

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Mauno Korpelainen -

Michael,

just a long shot but did you check that your site does not have Theme designer mode enabled in Site Administration > Appearance > Themes > Theme settings ?

If it is enabled moodle won't cache images and javascripts.

Average of ratings:Useful (5)
In reply to Mauno Korpelainen

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Tim Lovett -

Wow. That saved me. I even saw the warning when I was playing with the theme. THANKS!

In reply to Mauno Korpelainen

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Jane Wilde -

This was the solution I was looking for.  You saved my honor (and I didn't have to admit that I caused the problem by enabling smile.

Jane

In reply to Mauno Korpelainen

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir David Kimball -

Mauno, thank you!  My site went from a 45 second load time to just under 5!  Forgot to uncheck the Theme Designer when I was finished making my changes.

I used www.webpagetest.org.

Average of ratings:Useful (1)
In reply to Mauno Korpelainen

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Hamid Takesh -

Mauno Korpelainen:
just a long shot but did you check that your site does not have Theme designer mode enabled in Site Administration > Appearance > Themes > Theme settings ?

Thank you so much! I never thought there will be THAT MUCH of a difference!!!

Pages used to load in 1.6 - 1.8 seconds. Now it's 0.1 - 0.2 seconds.

Thanx again, problem solved for me.

In reply to Mauno Korpelainen

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir sam marshall -
Mynd av Core developers Mynd av Peer reviewers Mynd av Plugin developers

For info: since it seems this mistake is quite common, I have filed MDL-35716 to suggest that a future Moodle version should have a warning on the notifications page if you leave this option on, and also for other similar options that are intended for development/design and shouldn't be used on a live system. (I'm not offering to actually code it though. smile

--sam

Average of ratings:Useful (2)
In reply to Mauno Korpelainen

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Raju Adla -

Hello Mauno!!

Thanks, You saved me.

Thanks,

Raju Adla.

In reply to Mauno Korpelainen

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Chris Taylor -

Yep that sorted me out and I too can't believe (a) I forgot about that and (b) what a difference it makes. Thanks dude  smile

In reply to Michael Dean

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Howard Miller -
Mynd av Core developers Mynd av Documentation writers Mynd av Particularly helpful Moodlers Mynd av Peer reviewers Mynd av Plugin developers
I didn't read right through all the replies but I didn't see anybody asking what you are expecting.

How many users do you have online when it starts to grind to a halt?

I've see Windows based systems of that sort of scale grind to a halt with as few as 20 users.

Obviously you need to get some monitoring software on there and find out what the bottleneck is but, if I was a betting man, I expect you'll find it running out of memory and swapping.
Average of ratings:Useful (1)
In reply to Michael Dean

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Visvanath Ratnaweera -
Mynd av Particularly helpful Moodlers Mynd av Translators
Hi Dean

There is a separate forum for exactly this topic, the "Hardware and Performance" forum, http://moodle.org/mod/forum/view.php?id=596. You'll find a list of initial pointers in the introduction to that forum. Specially the "performance" documentation is a must. Sorry there's a reconstruction going in the documentation wiki, so the essential doc is broken right now. Check
- http://docs.moodle.org/19/en/Performance for 1.9 and
- http://docs.moodle.org/22/en/Performance_recommendations for 2.2.

It looks like you have missed the prudent advice circulating in all the forums here, that of runningthe future 2.x in _parallel_ for some time (see http://moodle.org/mod/forum/discuss.php?d=194572 for a running discussion), I would say at least a semester, check thoroughly before going "live". I know, performance is difficult to measure and many here have paid a price.

If you wish, you can request the moderator of this forum ("General Problems") to move the discussion to "Hardware and Performance". I would welcome that as a co-mod there. You can also consider "Windows-based servers" http://moodle.org/mod/forum/view.php?id=6799, if you need Microsft Windows-specific answers.
In reply to Visvanath Ratnaweera

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Howard Miller -
Mynd av Core developers Mynd av Documentation writers Mynd av Particularly helpful Moodlers Mynd av Peer reviewers Mynd av Plugin developers
Good point - the moderator has moved it wink
In reply to Howard Miller

Re: Moodle 2 is VERY SLOW - Staff are not happy!

eftir Visvanath Ratnaweera -
Mynd av Particularly helpful Moodlers Mynd av Translators
Howard

You must be the "ueber-moderator" in that case!
smile

Whatever, this place seems to be picky. Like for example,
"Please include as much background information as possible about your hardware, the operating system, the web server, the database server, the PHP scripting framework, etc. If your machine is virtualized, also mention the host hardware, the operating system, the virtualization technology used and the resources assigned to the guest OS." (from the introduction)