[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/docs/ -> PERFORMANCE (source)

   1  =========================
   2   Horde Performance Guide
   3  =========================
   4  
   5  :Last update:   $Date: 2006/05/31 19:14:14 $
   6  :Revision:      $Revision: 1.9.10.13 $
   7  :Contact:       horde@lists.horde.org
   8  
   9  .. contents:: Contents
  10  
  11  
  12  Some tips on performance tuning systems for Horde.  This does not cover
  13  hardware tuning or even low level system (network, filesystem, etc) tuning.
  14  
  15  Don't apply the following tuning hints blindly.  Test your applications before
  16  and after the changes under the conditions that are important for you.  For
  17  some people it's more important to make them as fast as possible for a small
  18  user base, others require the applications to scale well under a high load.
  19  Some of these hints might even make the applications slower under certain
  20  conditions or using a certain hardware.
  21  
  22  
  23  Linux Tuning
  24  ============
  25  
  26  * Recompile RPMS for your architecture (e.g. i586, i686, athlon, etc).
  27    This applies most to your Apache, PHP, IMAP, and POP3 packages.
  28  
  29  
  30  Apache/PHP tuning
  31  =================
  32  
  33  * Consider a PHP accelerator program.  See for example `The Zend Performance
  34    Suite`_, The `ionCube PHP Accelerator`_, `Turck MMCache for PHP`_, or
  35    eAccelerator_.  These accelerators speed up access by caching the compiled
  36    PHP code, eliminating the need to recompile the code for every single page
  37    load.  **This is probably the easiest way to improve the performance of
  38    Horde**.  If using Turck MMCache, **PLEASE** read `Turck MMCache
  39    Troubleshooting`_.
  40  
  41  * Compile PHP with the ``--enable-inline-optimization`` option to generate the
  42    fastest possible PHP executable.
  43  
  44  * Use of the mcrypt PHP extension should significantly increase performance
  45    while also increasing security.
  46  
  47  * Enable PHP output compression (either in ``php.ini`` or
  48    ``horde/config/conf.php``).
  49  
  50  * Disable the memory limit in ``php.ini``.
  51  
  52  * Keep the include path defined in ``php.ini`` as short as possible, with the
  53    most frequently used library paths first.  You don't need to include the
  54    local directory ``.`` because Horde always uses full paths instead of
  55    relative paths.
  56  
  57  * Use an optimized ``php.ini``, start from ``php.ini-recommended`` of your PHP
  58    dsitribution.
  59  
  60  * Don't run PHP session garbage collection too often if using a slow storage
  61    medium (like SQL). (See ``session.gc_probability`` in ``php.ini``)
  62  
  63  * If you have a large number of sessions, consider storing them in hashed
  64    directory levels. (See ``session.save_path`` at http://www.php.net/session)
  65  
  66  * Consider using a faster storage medium for sessions, such as a tmpfs or
  67    other memory based file system.  If you are sure your apache setup is rock
  68    solid and you don't restart it there is a mm session driver.  However, be
  69    aware that certain Horde applications (like IMP) make heavy use of caching
  70    data in sessions so memory based solutions may be exhausted quickly,
  71    particularly if there will be more than a single user.
  72  
  73  * Only load as many Apache and PHP extensions as needed (to reduce memory
  74    usage).
  75  
  76  * Use statically compiled Apache modules, including the PHP module.
  77  
  78  * Use compiler optimizations (--prefer-non-pic, -O3, -march -mcpu, -msse,
  79    -mmmx, -mfpmath=sse, etc.)
  80  
  81  * If using SSL with a large site, consider a hardware SSL accelerator.
  82  
  83  * Use shared memory for the Apache SSL cache if possible.
  84  
  85  * To improve caching of static content if accessing Apache SSL with Internet
  86    Explorer, try setting longer expiration periods::
  87  
  88      ExpiresActive On
  89      ExpiresByType image/png "now plus 1 month"
  90      ExpiresByType image/gif "now plus 1 month"
  91      ExpiresByType text/javascript "now plus 1 month"
  92      ExpiresByType application/x-javascript "now plus 1 month"
  93      ExpiresByType text/css "now plus 1 month"
  94  
  95    .. Note:: You must compile the ``mod_expires`` extension into Apache in
  96              order to use these directives.
  97  
  98    .. Warning:: This might cause problems if you upgrade Horde and the users'
  99                 browsers still use the old file versions.
 100  
 101  * Disable DNS lookups in your Apache logging, or use a caching DNS server on
 102    the web server host.
 103  
 104  * Enable Apache keepalives.
 105  
 106  .. _`The Zend Performance Suite`: http://www.zend.com/horde.php
 107  .. _`ionCube PHP Accelerator`: http://www.php-accelerator.co.uk
 108  .. _`Turck MMCache for PHP`: http://turck-mmcache.sourceforge.net
 109  .. _eAccelerator: http://eaccelerator.net
 110  .. _`Turck MMCache Troubleshooting`: http://wiki.horde.org/TurckMMCacheTroubleshooting
 111  
 112  
 113  Sending Mail
 114  ============
 115  
 116  * Generally using a local sendmail command to send mail will result in better
 117    peformance than using a SMTP connection.
 118  
 119  * Some MTA servers may be faster or more efficient than others.  Consider
 120    switching to a faster format if needed.
 121  
 122  
 123  IMAP tuning
 124  ===========
 125  
 126  * Consider an IMAP proxy for more persistent connections.  Some IMAP proxies
 127    are up-imapproxy_ and Perdition_.  To make sense, the proxy
 128    should be installed on the server running Horde, and this server needs
 129    enough CPU power to handle the additional load.
 130  
 131  * Some IMAP servers (or IMAP mailbox store formats) perform better than
 132    others.  Consider switching to a faster format if needed.
 133  
 134  * Follow the IMAP servers' performance hints:
 135  
 136    - Cyrus: http://asg.web.cmu.edu/cyrus/download/imapd/install-perf.html
 137  
 138  .. _up-imapproxy: http://www.imapproxy.org/
 139  .. _Perdition: http://www.vergenet.net/linux/perdition/
 140  
 141  
 142  Postgresql tuning
 143  =================
 144  
 145  * Do a vacuum command periodically to tune your database
 146  
 147  * Increase ``shared_buffers`` and ``sort_mem`` memory settings.
 148  
 149  * If web server and database is on the same unix host, use unix sockets
 150    instead of network connections for database access.
 151  
 152  
 153  MySQL tuning
 154  ============
 155  
 156  * If web server and database is on the same unix host, use unix sockets
 157    instead of network connections for database access.
 158  
 159  * Enable mysql query cache if you have sufficient RAM.  Edit your ``my.cnf``
 160    file and add the following to the ``[mysqld]`` section (change the memory
 161    size to meet your needs)::
 162  
 163      set-variable = query_cache_size=128M
 164  
 165  
 166  Horde tuning
 167  ============
 168  
 169  * You can configure Horde to serve all images and style sheets from a
 170    different server. This could be a very lightweight server without all the
 171    overhead for processing PHP files, like lighttpd. You need to set the
 172    ``themesuri`` parameter in ``config/registry.php`` for all applications and
 173    copy all ``themes`` directories in the same directory layout to the other
 174    server.
 175  
 176  .. _lighttpd: http://www.lighttpd.net/
 177  
 178  
 179  Application tuning
 180  ==================
 181  
 182  * Some applications contain advanced features that might have a certain impact
 183    on the performance.  These features can usually be turned off in the
 184    application's configuration and are explicitly described as being a
 185    performance hit in the configuration web frontend.


Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7