Zarafa is groupware application that is mainly used for email storage and teamwork on the server side. WebAccess and Webapp are its own mail clients and to communicate with client side zarafa server uses the SOAP technology. By using the client side plug-in, it gets easy integration with Outlook email client that makes it the best alternative for Exchange. In order to establish a secure connection between Outlook and Zarafa server, TLS/SSL or an HTTPS proxy is used.
Zarafa application save all its data in a MySQL database, that is widely used Relational Database Management System. Ibdata files are MySQL database that keeps the metadata of InnoDB tables, undo logs, change buffer or doublewrite buffer whereas the .frm files stores the complete data of the database tables and it’s related information. If somehow this .frm files data gets corrupted then the Zarafa server data also gets inaccessible.
Tuning MySQL Database Performance in Zarafa:
For better performance of zarafa server you need to set the cache settings first. If request has been already made for any item that is present in the cache then the request can be fulfilled easily and there will be no need of calling other processes. If the requested item is not in the cache then each time when the request is made the disk resources are actually being consumed and other process are called which result in the degradation of Zarafa server configuration. So overall, it means by managing the RAM efficiently for caching purpose, you can easily tune zarafa’s MySQL Database Performance and the complete of the server system performance too.
Zarafa cache configuration(.cfg) file:
For zarafa server 80% of RAM used for cache is necessary to allocate and for handling the more server loads the cache size must be fixed high as much as possible. Whenever the zarafa server is restarted the caches are purge in which the entire related configuration data files is cleared and for that the cache will require sometime to make the data, meanwhile the performance will be lowered. Instead of restart, reload the server as this will re-read the configuration files and makes the performance higher.
You can also set the cache settings in /etc/zarafa/server.cfg file. The values assigned to the Object cache (cache_object_size), cell cache (cache_cell_size), and indexed object cache (cache_indexedobject_size) must be set accordingly so that the swapping on server can be minimize and memory can be used efficiently for caching.
How to Optimize the MySQL configuration?
You can tune up your MySQL database configuration both for new installation of zarafa or also for the existing one.
To optimize the MySQL configuration before installation:
To optimize the MySQL configuration before installation you need to set the related values in the MySQL configuration file that is saved with a .cnf extension at the location: /etc/my.cnf or /etc/mysql/my.cnf
innodb_buffer_pool that stores the cache data and table indexes. innodb_log_file keep transaction log data information and innodb_log_buffer is needed to write the log files in the disk space and carry out the transaction. Whereas the, innodb_file_per_table allows you to reallocate and reclaim the disk space when you are using ibdata1 database file). It will create two files for each table and that are frm and ibd.
You can assign the value of innodb_buffer_pool, innodb_log_file_size, innodb_log_buffer_size, innodb_file_per_table by keeping one thing in mind that the system’s doesn’t turn out of the memory and most important efficient caching and disk swapping needs to be in balanced form.
Here are the approximate values for the above fields:
- innodb_log_file_size: 25% of the innodb_buffer_pool_size
- innodb_file_per_table: This value should be set accordingly so that the files per table (frm and ibd) can be handled and the disk space can be pre allocated if required.
- innodb_buffer_pool size: Around 50% of the machine physical memory size.
- innodb_log_buffer_size: 32Mb
Optimize the MySQL configuration for an existing Zarafa environment:
Follow the following steps to optimize the MySQL configuration for an existing Zarafa environment:
- Make a complete backup of your Zarafa database.
- Close all the running zarafa processes.
- Check that all the MySQL database transaction logs have been cleared or not.
- Stop the MySQL server and close it down. Then check for the MySQL database logs to ensure a clean server shutdown.
- Now go to the configuration file located at /etc/my.cnf and setup the innodb settings.
- After that change the location of the old ib_logfiles by shifting them from the mysql datadir to /tmp
- Start MySQL and start new database settings.
- By customizing the values in configuration files, you can change the innodb_log_file_size. After doing changes make sure that it is implemented well.
- In the MySQL logs you will get the complete list of all the errors along with their details. So see the logs for finding and fixing the errors that might have been occurred during the process.
- Now start the zarafa server and other processes.
To achieve maximum performance, you need to configure the cache data sizes values. But if the server load is high then using a multi server setup is the best option to split its load over different servers and this will surely help to increase your performance.