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.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
administration:performance [2016/04/05 05:58] – [PHP Tuning] powerriegel | administration:performance [2019/03/20 11:55] – [PHP Tuning] demiankatz | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== JAVA_OPTIONS ===== | ===== JAVA_OPTIONS ===== | ||
+ | |||
+ | :!: This section refers to VuFind 2.x and earlier, which include Solr 4 or earlier. Starting with VuFind 3.0, Solr 5 is bundled with VuFind, and it uses a different startup routine. To adjust the heap memory size in these versions, simply change the SOLR_HEAP environment variable. | ||
If you are using the included distribution of Jetty, the tuning options are set in the JAVA_OPTIONS environmental variable. You can either set this for the user running the instance of Jetty (recommended) or in / | If you are using the included distribution of Jetty, the tuning options are set in the JAVA_OPTIONS environmental variable. You can either set this for the user running the instance of Jetty (recommended) or in / | ||
Line 38: | Line 40: | ||
Could not create the Java virtual machine." | Could not create the Java virtual machine." | ||
+ | Please note that simply increasing the heap size to a very large one is not recommended, | ||
+ | [[https:// | ||
+ | for more information). | ||
+ | ==== Garbage Collection ==== | ||
+ | :!: Starting with VuFind 3.0, VuFind includes Solr 5, which does some garbage collection auto-tuning by default; the suggestions below may be less important for these newer releases, and you should probably not tinker with settings unless you have a known problem you are trying to solve. | ||
- | |||
- | ==== Garbage Collection ==== | ||
Garbage collection is how aggressive the JVM is with clearing out unneeded objects. For the purposes of Vufind, parallel garbage collection should work nicely, but read Sun's [[http:// | Garbage collection is how aggressive the JVM is with clearing out unneeded objects. For the purposes of Vufind, parallel garbage collection should work nicely, but read Sun's [[http:// | ||
Line 64: | Line 69: | ||
</ | </ | ||
- | Once you have a log file, you can use the [[http://www.tagtraum.com/gcviewer.html|gcviewer]] or [[http:// | + | Once you have a log file, you can use the [[https://github.com/chewiebug/ |
Line 125: | Line 130: | ||
====== PHP Tuning ====== | ====== PHP Tuning ====== | ||
- | On PHP 5.4, installing a PHP cache like [[http:// | + | On PHP 5.4, installing a PHP cache like [[http:// |
+ | ===== Asset Pipeline ===== | ||
- | If you created a custom module, remember | + | Starting with VuFind 3.1, there is an optional "asset pipeline" |
- | [code php] | + | |
- | ../ | + | |
- | [/code] | + | |
- | from module directory. | + | |
+ | ===== Theme Compiler ===== | ||
+ | Starting with VuFind 4.1, there is a [[administration: | ||
- | ===== Troubleshooting ===== | + | To use a compiled theme, follow these steps: |
- | There have been some reports of VuFind errors when running APC. | + | 1. Run "php $VUFIND_HOME/ |
- | // | + | 2. Update your [[configuration: |
- | Inserting the line in index.php | + | |
- | // | + | |
- | < | + | Note: NEVER EDIT THE COMPILED THEME. Instead, edit the source theme and recompile it when you need to make changes. You must use the --force switch of the compiler if you need to overwrite your compiled theme with a new version. |
- | register_shutdown_function(' | + | |
+ | ===== Session Handling ===== | ||
+ | |||
+ | 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' | ||
+ | |||
+ | ====== Apache Tuning ====== | ||
+ | |||
+ | ===== GZIP Compression ===== | ||
+ | |||
+ | For a productive environment, | ||
+ | |||
+ | < | ||
+ | sudo a2enmod deflate | ||
</ | </ | ||
+ | You should now notice a shrinked transmitted file size in Firefox Developer Tools. You can configure which files are compressed in | ||
+ | <code bash> | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Note that the " | ||
- | // | + | ===== Minification ===== |
- | 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. | + | 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 " |
+ | :!: Manual minification should not be necessary if you turn on VuFind' | ||
====== Solr Tuning ====== | ====== Solr Tuning ====== | ||
Line 221: | Line 240: | ||
See the [[configuration: | See the [[configuration: | ||
+ | ===== Limits ===== | ||
+ | |||
+ | Certain operating system limits can impact Solr performance, | ||
===== Further Reading ===== | ===== Further Reading ===== | ||
* [[administration: | * [[administration: | ||
+ | * [[administration: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// |
administration/performance.txt · Last modified: 2022/05/06 12:52 by demiankatz