Hardware and performance

Site home very slow, 39 seconds

 
You either love it or you hate it
Site home very slow, 39 seconds
Particularly helpful Moodlers

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: -
You either love it or you hate it
Re: Site home very slow, 39 seconds
Particularly helpful Moodlers

Sorry about 2000 courses loaded on to site home


Cheers

 
Average of ratings: -
Picture of Howard Miller
Re: Site home very slow, 39 seconds
Core developersDocumentation writersParticularly helpful MoodlersPlugin 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?

 
Average of ratings: -
You either love it or you hate it
Re: Site home very slow, 39 seconds
Particularly helpful Moodlers

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

 
Average of ratings: -
Picture of Howard Miller
Re: Site home very slow, 39 seconds
Core developersDocumentation writersParticularly helpful MoodlersPlugin 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)
Picture of Marcus Green
Re: Site home very slow, 39 seconds
Core developersParticularly helpful MoodlersPlugin developersTesters

What file system are you using?

 
Average of ratings: -
You either love it or you hate it
Re: Site home very slow, 39 seconds
Particularly helpful Moodlers

NFS shared between 6 web servers !!

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


smile

 
Average of ratings: -
Picture of Howard Miller
Re: Site home very slow, 39 seconds
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Nothing wrong with that.


 
Average of ratings: -
You either love it or you hate it
Re: Site home very slow, 39 seconds
Particularly helpful Moodlers

Very slow Howard when its the application code base

Cheers

 
Average of ratings: -
Picture of Howard Miller
Re: Site home very slow, 39 seconds
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

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

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

 
Average of ratings: -
You either love it or you hate it
Re: Site home very slow, 39 seconds
Particularly helpful Moodlers

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

 
Average of ratings: -
You either love it or you hate it
Re: Site home very slow, 39 seconds
Particularly helpful Moodlers

"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?

 
Average of ratings: -
Picture of Howard Miller
Re: Site home very slow, 39 seconds
Core developersDocumentation writersParticularly helpful MoodlersPlugin 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

 
Average of ratings: -