Note: This documentation is for Moodle 2.7. For up-to-date documentation see Performance settings.

Performance settings: Difference between revisions

From MoodleDocs
(Removing old info, like zip paths, and resource_filterexternalpages)
mNo edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 2: Line 2:
==Performance settings==
==Performance settings==


Various performance settings can be changed by an administrator in ''Settings > Site administration > Server > Performance''.
Various performance settings can be changed by an administrator in ''Administration > Site administration > Server > Performance''.
{{New features}}
The setting "Maximum time limit"  lets you restrict  the maximum PHP execution time that Moodle will allow without any output being displayed. If you have a front-end server with its own time limit, set this value lower to receive PHP errors in logs.


==Other site administration settings which may affect performance==
==Other site administration settings which may affect performance==


* Enable the '''language cache'''.
* Enable the '''language cache'''.
* Large log files can cause overall performance to degrade over time. If you observe that the site has gradually got slower loading pages in the browser, '''reduce your Log life time''' setting in ''Settings > Site administration > Server > Cleanup''
* Large log files can cause overall performance to degrade over time. If you observe that the site has gradually got slower loading pages in the browser, '''reduce your Log life time''' setting in ''Administration > Site administration > Server > Cleanup''
* Note that using '''secure web connections''' ('''https''' rather than '''http''') carries a higher processing burden, both for the webserver and the client - particularly because cacheing cannot be used as effectively, so the number of file requests is likely to increase dramatically. For this reason using https for all Moodle pages is not recommended. You can enable https just for the login screen, simply from Moodle's config page.
* Note that using '''secure web connections''' ('''https''' rather than '''http''') carries a higher processing burden, both for the webserver and the client - particularly because cacheing cannot be used as effectively, so the number of file requests is likely to increase dramatically. For this reason using https for all Moodle pages is not recommended. You can enable https just for the login screen, simply from Moodle's config page.
* Check your '''filters'''. Having too many filters active can have serious effects on server load, especially on lower-end systems. The number of active filters has a direct effect on the perceived latency of your site; that is the time taken for each page impression.  
* Check your filters. Having too many filters active can have serious effects on server load, especially on lower-end systems. The number of active filters has a direct effect on the perceived latency of your site; that is the time taken for each page impression. Check if any of the filters can be disabled. For example, if your site does not need to be able to display mathematical equations you can disable the [[MathJax filter]].
 
* Enable the '''text cache''' but do not "Filter all strings" unless you have a specific need. If in doubt profile the performance, and see how your changes affect the processing time.
* Enable the '''text cache''' but do not "Filter all strings" unless you have a specific need. If in doubt profile the performance, and see how your changes affect the processing time.
* Check your '''anti-virus''' measures on the server.  Although they are useful for preventing security holes being exploited, some "On-Demand" scanners can affect performance by scanning page content (word, ppt files etc).
* Check your '''anti-virus''' measures on the server.  Although they are useful for preventing security holes being exploited, some "On-Demand" scanners can affect performance by scanning page content (word, ppt files etc).
Line 24: Line 27:
define('CONTEXT_CACHE_MAX_SIZE', 7500);
define('CONTEXT_CACHE_MAX_SIZE', 7500);
</code>
</code>
==See also==
* [https://moodle.org/mod/forum/discuss.php?d=225617 setting innodb buffer pool from 100mb to 3gb] resulted in outstanding performance.


[[de:Geschwindigkeitseinstellungen]]
[[de:Geschwindigkeitseinstellungen]]
[[es:Configuraciones para desempeño]]
[[es:Configuraciones para desempeño]]

Latest revision as of 07:47, 29 August 2014

Performance settings

Various performance settings can be changed by an administrator in Administration > Site administration > Server > Performance. New feature
in Moodle 2.7!

The setting "Maximum time limit" lets you restrict the maximum PHP execution time that Moodle will allow without any output being displayed. If you have a front-end server with its own time limit, set this value lower to receive PHP errors in logs.

Other site administration settings which may affect performance

  • Enable the language cache.
  • Large log files can cause overall performance to degrade over time. If you observe that the site has gradually got slower loading pages in the browser, reduce your Log life time setting in Administration > Site administration > Server > Cleanup
  • Note that using secure web connections (https rather than http) carries a higher processing burden, both for the webserver and the client - particularly because cacheing cannot be used as effectively, so the number of file requests is likely to increase dramatically. For this reason using https for all Moodle pages is not recommended. You can enable https just for the login screen, simply from Moodle's config page.
  • Check your filters. Having too many filters active can have serious effects on server load, especially on lower-end systems. The number of active filters has a direct effect on the perceived latency of your site; that is the time taken for each page impression. Check if any of the filters can be disabled. For example, if your site does not need to be able to display mathematical equations you can disable the MathJax filter.
  • Enable the text cache but do not "Filter all strings" unless you have a specific need. If in doubt profile the performance, and see how your changes affect the processing time.
  • Check your anti-virus measures on the server. Although they are useful for preventing security holes being exploited, some "On-Demand" scanners can affect performance by scanning page content (word, ppt files etc).
  • Check your forum settings. To improve performance set forum_trackreadposts = No and forum_usermarksread = Yes (this will impact on the convenience of your users' forum experience). Also consider setting the time of the day when old posts are cleared from the read table (forum_cleanreadtime) to when your site is less busy.
  • Don't use database sessions unless you really need them. On-disc sessions tend to be much faster.

config.php settings which may affect performance

Increasing the value of CONTEXT_CACHE_MAX_SIZE may reduce the number of database queries for certain pages. It will also increase memory usage, so be careful.

// Moodle 2.3: Increasing this from the default saved about > 1000 db queries on the course/index.php page for // a Moodle having 1250 course categories. // This value is specified in lib/accesslib.php, but it's OK to add a define for it in config.php: define('CONTEXT_CACHE_MAX_SIZE', 7500);

See also