About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
administration:performance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
administration:performance [2018/06/05 19:08] – [Offloading MARC Records] demiankatzadministration:performance [2019/03/20 11:55] – [PHP Tuning] demiankatz
Line 130: Line 130:
 ====== PHP Tuning ====== ====== PHP Tuning ======
  
-On PHP 5.4, installing a PHP cache like [[http://pecl.php.net/package/APC|APC]] can significantly improve performance by reducing the amount of time spent by PHP parsing and compiling code. PHP 5.6 comes with build-In OpCache, which is slightly faster than APC. When upgrading, remember to disable the Apache APC module. OpCache should be configured to 64 MB.  +On PHP 5.4, installing a PHP cache like [[http://pecl.php.net/package/APC|APC]] can significantly improve performance by reducing the amount of time spent by PHP parsing and compiling code. PHP 5.6 comes with build-In OpCache, which is slightly faster than APC. When upgrading, remember to disable the Apache APC module. OpCache should be configured to 64 MB.
- +
-If you created a custom module, remember to create an autoloader_classmap.php by calling  +
-<code php> +
-../../vendor/zendframework/zendframework/bin/classmap_generator.php -w +
-</code> +
-from module directory.  +
 ===== Asset Pipeline ===== ===== Asset Pipeline =====
  
Line 157: Line 150:
  
 When using database sessions, deleting expired sessions may be a surprisingly heavy process. On a busy site it may be beneficial to turn off PHP's session garbage collection (set session.gc_probability to 0 in php.ini) and run VuFind's expire_sessions utility regularly. This makes sure that garbage collection is done outside Apache that serves user requests and with a method that makes it possible to handle session deletion in a large table.  When using database sessions, deleting expired sessions may be a surprisingly heavy process. On a busy site it may be beneficial to turn off PHP's session garbage collection (set session.gc_probability to 0 in php.ini) and run VuFind's expire_sessions utility regularly. This makes sure that garbage collection is done outside Apache that serves user requests and with a method that makes it possible to handle session deletion in a large table. 
-===== Troubleshooting ===== 
  
-There have been some reports of VuFind errors when running APC.  Excerpt from the vufind-tech mailing list (courtesy of Graham Seaman):+====== Apache Tuning ======
  
-// +===== GZIP Compression =====
-Inserting the line in index.php +
-//+
  
-<code php> +For a productive environment, you should always enable GZIP compression using [[https://httpd.apache.org/docs/2.4/mod/mod_deflate.html|mod_deflate]]. This reduces a amount of data transferred by 70% for text based files like html, js, ... To do so, 
-register_shutdown_function('session_write_close'); +
-</code> +
- +
-// +
-immediately before requiring the session handler, seems to fix the problem with APC. Since this is the result of trawling the web and not of any deep understanding on my part, I can't guarantee this won't have sideffects (I'll report back if I find any), or that it will always work. +
-// +
- +
-Note: As of VuFind 1.4, the default VuFind code will register the shutdown function, so this modification should no longer be necessary. +
- +
-====== Apache Tuning ====== +
-For a productive environment, you should always enable GZIP compression. This reduces a amount of data transferred by 70% for text based files like html, js, ... To do so, +
  
 <code bash> <code bash>
Line 186: Line 165:
 </code> </code>
  
-One thing you should also do is minifying JS and CSS files. This removes whitespaces and line breaks. It can by done by your IDE. Netbeans for example has a plugin Js CSS Minify Compress. The minified files must be configured in theme.config.php and in some cases in the theme files. Just search for ".js" and replace with ".min.js". If you use LESS to create your CSS files, there is an option --clean-css which optimizes your CSS, too. +Note that the "application/json" type is not usually compressed by default, but turning on GZIP compression for this can significantly approve performance, especially if you use [[indexing:hierarchies_and_collections|hierarchies and collections]]. 
 + 
 +===== Minification ===== 
 + 
 +One thing you should also do is minifying JS and CSS files. This removes whitespaces and line breaks. It can by done by your IDE. Netbeans for example has a plugin Js CSS Minify Compress. The minified files must be configured in theme.config.php and in some cases in the theme files. Just search for ".js" and replace with ".min.js". If you use LESS to create your CSS files, there is an option --clean-css which optimizes your CSS, too
 + 
 +:!: Manual minification should not be necessary if you turn on VuFind's built-in asset pipeline (see above).
 ====== Solr Tuning ====== ====== Solr Tuning ======
  
administration/performance.txt · Last modified: 2022/05/06 12:52 by demiankatz