Moodle Cache Changes

Re: Moodle Cache Changes

by Jeff White -
Number of replies: 2

Hello Callum, 

I do not use this setting as I rely more on the default caching times of Moodle. It just sounded like a setting you were trying to do with your previous post. I dont think the direction you are going to improve performance is the right way to go. Do the basics with Opcache and using moodle default caching method and try to identify what is the bottleneck for your environment. 

FYI: 10 second load times is abhorrent. Your goal should be under a second in average page load times. 

In reply to Jeff White

Re: Moodle Cache Changes

by Chris Fryer -

Just to reaffirm what Jeff is saying, Moodle is pretty good with its Cache-control headers.  It sets "public" and "private" appropriately, and has good "max-age" directives for things like the theme.  But these settings are really only useful for *returning* users.  First-time visitors, or people who dump their browser cache at shutdown, won't have any of your site assets stored locally.

It's not clear what your architecture is.  Do you have the web server, database and files all on one machine, or have you scaled out?

If your moodledata volume is remote to the web server, you might find (as we do) that you get a lot of performance improvements from having a key/value store like Memcached.

https://docs.moodle.org/33/en/Caching

Turn on "performance info" in the "debugging" section of the admin menu (/admin/settings.php?section=debugging) and switch to a theme that displays it.  This will give you clues.

Above all, make sure you've tuned your database as finely as you can.  If you're using MySQL, the quickest possible win is to ensure you've set InnoDB's Buffer Pool settings (especially innodb_buffer_pool_size and innodb_buffer_pool_instances) appropriately.  Get as much of your DB into memory as you can, so you stay off those disks.

https://dev.mysql.com/doc/refman/5.6/en/innodb-buffer-pool.html

Chris

Average of ratings: Useful (1)
In reply to Chris Fryer

Re: Moodle Cache Changes

by Callum Laverick -

Hi Chris,

I think I have narrowed it down to choice of poor theme/hosting/database setup.

I am now currently in the process of getting new dedicated hosting with the current spec:

  •  Processor: Intel Quad Core Xeon E3-1230 v5 (3.40 Ghz)
  •  Memory: 32GB DDR4 ECC
  •  Storage: 2x250 SSD Samsung 850
  •  OS: Linux-CenOS 7 64bit
  •  Control Panel: cPanel with WHM
  •  Bandwidth: 10TB Data Transfer on a 1Gb/s port

I know a separate server for the Database would improve performance significantly however currently working with a small budget so this is the best possible solution. I will be placing the database on a separate SSD and this will help a little with performance. 

I am also using a SQL database and your tip of 'InnoDB's Buffer Pool settings (especially innodb_buffer_pool_size and innodb_buffer_pool_instances) appropriately' I will be looking into this once the new host has been set up and configured.

Will let you know how it all goes, but thank you for your help.

Cheers

Callum