Changes for page Performance
Last modified by Thomas Mortagne on 2023/10/10
From version 13.1
edited by Vincent Massol
on 2008/01/18
on 2008/01/18
Change comment:
There is no comment for this version
To version 14.1
edited by Vincent Massol
on 2008/03/05
on 2008/03/05
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -7,6 +7,84 @@ 7 7 8 8 Here are some tips to increase XWiki's performances. 9 9 10 +1.1 Gzip compression and caching of static pages 11 + 12 +We're working on making these features part of the XWiki core (see [XWIKI-2022>http://jira.xwiki.org/jira/browse/XWIKI-2022]). While waiting for this to be natively implemented, the recommended solution is to set up an Apache Web Server in front of your servlet container and install/configure the following modules: 13 +* [mod-deflate>http://httpd.apache.org/docs/2.0/mod/mod_deflate.html] 14 +* [mod-expire>http://httpd.apache.org/docs/2.0/mod/mod_expires.html] 15 +* [mod-proxy-ajp>http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html] (note that this depends on [mod-proxy>http://httpd.apache.org/docs/2.2/mod/mod_proxy.html] that you also need to install) 16 + 17 +Modify your Apache configuration file to load the different modules: 18 + 19 +{code:none} 20 +LoadModule expires_module /usr/lib/apache2/modules/mod_expires.so 21 +LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so 22 +LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so 23 +# Depends: proxy 24 +LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so 25 +{code} 26 + 27 +And configure your different modules as described below. 28 + 29 +1.1.1 Mod Deflate Configuration 30 + 31 +{code:none} 32 +vwwwpro-1:~# cat /etc/apache2/conf.d/deflate 33 +<Location /> 34 + # Insert filter 35 + SetOutputFilter DEFLATE 36 + 37 + # Netscape 4.x has some problems... 38 + BrowserMatch ^Mozilla/4 gzip-only-text/html 39 + 40 + # Netscape 4.06-4.08 have some more problems 41 + BrowserMatch ^Mozilla/4\.0[678] no-gzip 42 + 43 + # MSIE masquerades as Netscape, but it is fine 44 + # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 45 + 46 + # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 47 + # the above regex won't work. You can use the following 48 + # workaround to get the desired effect: 49 + BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html 50 + 51 + # Don't compress images 52 + SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary 53 + 54 + # Make sure proxies don't deliver the wrong content 55 + #Header append Vary User-Agent env=!dont-vary 56 +</Location> 57 +{code} 58 + 59 +1.1.1 Mod Expire Configuration 60 + 61 +{code:none} 62 +vwwwpro-1:~# cat /etc/apache2/conf.d/expires 63 +<Location /xwiki/skins/> 64 + ExpiresActive on 65 + ExpiresDefault "access plus 1 day" 66 +</Location> 67 + 68 +<Location /xwiki/bin/skin/> 69 + ExpiresActive on 70 + ExpiresDefault "access plus 1 day" 71 +</Location> 72 +{code} 73 + 74 +1.1.1 Mod Proxy AJP Configuration 75 + 76 +{code:none} 77 + ProxyRequests Off 78 + <Proxy *> 79 + Order deny,allow 80 + Allow from all 81 + </Proxy> 82 + ProxyPreserveHost On 83 + ProxyPass /xwiki ajp://192.168.1.181:8009/xwiki 84 +{code} 85 + 86 +where <tt>ajp://192.168.1.181:8009/xwiki</tt> is the internal address of your Servlet container where XWiki is running. 87 + 10 10 1.1 Memory 11 11 12 12 You need to configure your Servlet container so that XWiki has enough memory. You'll need to tune the value to your need. You should check the logs and see if there are any out of memory errors. A good default value is 384MB (-Xmx384m).