Site home very slow, 39 seconds

Site home very slow, 39 seconds

by Albert Ramsbottom -
Number of replies: 12

If I click on the dashboard its mill seconds but the site home which loads the categories takes nearly 40 seconds to load

We have about 10 categories, containing around 150 courses

6 x 16GB, quad core webs

3 x 32GB Mysql enterprise, clustered

4 x 16GB Memcache servers

sad


Problem seems only on the site home page, URL below:

https://moodletest.ourmoodle/?redirect=0

And when I inspect it, it appears to be the redirect that is cuasing the issues

Any ideas

Average of ratings: -
In reply to Albert Ramsbottom

Re: Site home very slow, 39 seconds

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

Have you investigated what is going on during those 40 seconds? What is MySQL doing and so on?

Is it still slow if you kick everybody off and it's just one user?

Is this just for the admin (or a limited set of users) or for everyone?

Are there any blocks or other content on the home page that might be causing or contributing to this?

If you are using a non-core theme does it still do it with a core theme?

In reply to Howard Miller

Re: Site home very slow, 39 seconds

by Albert Ramsbottom -

We made some changes to Redis and now it works much better, but a little worrying that we need a caching mechanism for it to work properly


Cheers

In reply to Albert Ramsbottom

Re: Site home very slow, 39 seconds

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

Caching is super critical in Moodle. Getting that wrong is the easiest way to ruin your site performance. 

It's probably not stated forcefully enough in the docs. 

Average of ratings: Useful (1)
In reply to Albert Ramsbottom

Re: Site home very slow, 39 seconds

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

What file system are you using?

In reply to Marcus Green

Re: Site home very slow, 39 seconds

by Albert Ramsbottom -

NFS shared between 6 web servers !!

I know, not a great set up but it was already designed when I turned up


smile

In reply to Albert Ramsbottom

Re: Site home very slow, 39 seconds

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

Nothing wrong with that.


In reply to Howard Miller

Re: Site home very slow, 39 seconds

by Albert Ramsbottom -

Very slow Howard when its the application code base

Cheers

In reply to Albert Ramsbottom

Re: Site home very slow, 39 seconds

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

*definitely* don't do that. That's crazy. 

NFS is fine for the 'moodledata' area (but not for the cache)

In reply to Howard Miller

Re: Site home very slow, 39 seconds

by Albert Ramsbottom -

No, No

We have moodledata on NFS

And the

Moodle application on NFS

which is crap. 


We have 3 x memedcache servers for the cache

Moodledata is fine

Moodle codebase (application), is not


Place doesn't want to rsync the 6 webs and decided very early not to cluster the webs, so I am left with a donkey

In reply to Albert Ramsbottom

Re: Site home very slow, 39 seconds

by Albert Ramsbottom -

"NFS is fine for the 'moodledata' area (but not for the cache)"

What Cache?????


Where should we store the cache, then? Cache is stored in the moodledata folder? no?

In reply to Albert Ramsbottom

Re: Site home very slow, 39 seconds

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

On a load-balanced system you *have* to use an external shared cache. I recommend Redis but you do have other choices. 

If you cache on shared NFS - well, you will regret it wink