Zarafa server tuning

From Zarafa wiki

Revision as of 05:56, 3 January 2013 by Paulb (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

About Zarafa server caches

For performace reasons, it is strongly recommended to set the cache settings of the Zarafa server appropriate for your setup/server. Each time a request on an item can be found in the cache (cache hits), this avoids calls to other processes and disks/storage. Setting sensible cache settings certainly increases the performance.

This page contains some information about the settings and an example of a server dedicated for a complete Zarafa suite. This page only covers cache settings for the Zarafa server.

For more information about MySQL tuning, see MySQL tuning. If using the WebApp/Webaccess/Z-push in larger setups it is also advisable to tune your web server (Apache) as well, see Apache tuning.

In a server purely running Zarafa, it is advisable to set caches to use around 80% (in total -- including MySQL) of the RAM available in your server and can be considered to be a rule-of-thumb. The other 20% should be free for system processes, other processes (like your MTA) and the web server. Whenever you set the values too high this can result in the use of swap on your server. Swapping should be avoided, but we do want to make use of the RAM available. Therefore these settings should be a healthy balance between the risk of swapping and efficient caching in memory.

One could use the following example values for the server in the dedicated server situation described above.

  • cell cache: around 25% of total RAM size
  • object cache: 16-64 MB
  • indexed object cache: 16-128 MB

These cache settings need to be configured in the /etc/zarafa/server.cfg and details about these cache settings are described in the sections below.

The cache sizes set are a maximum and the actual use of it will grow along the server has had more request over time. Whenever you restart the server, these caches are purged and as a result performance will be lower until the caches are being filled up. To re-read configuration files, but not purge caches it is possible to reload the zarafa-server, instead of restarting it.

Cell cache (cache_cell_size)

Size in bytes of the cell cache. This is the main cache used in Zarafa. It caches all data that comes into view in tables (e.g. the view of your inbox, or any other folder). In an ideal situation, all cells would be cached, so that the database does not need to be queried for data when browsing through folders, but this would require around 1.5K per message item (email, appointment task, etc) in the entire server. If you can afford it, set this value as high as possible, up to 50% of your total RAM capacity.

Object cache (cache_object_size)

This caches objects and their respective hierarchy of folders. You can calculate the size with a simple equation:

<Concurrent users> * <max items in a folder> * 24

Default value is 5242880 (5 MB)

Indexed object cache (cache_indexedobject_size)

This cache contains unique id's of objects.

Cache statistics

To get the cache statistics from the zarafa-server process, you can send the USR1 signal to the server process.

 zarafa-stats --system

This will report the cache statistics and other server statistics in a long list. To have the cache statistics in a more human readable overview, how a look on this script.

Personal tools