1 Using MariaDB With Friendica
beardy-unixer edited this page 2012-10-09 15:23:20 -07:00

Larger Friendica sites experiencing performance issues may experience improvements by installing MariaDB.

MariaDB offers increased performance, and reduction of RAM spikes over MySQL, but does so at the cost of slightly higher base RAM requirements.

As MariaDB is a drop-in replacement for MySQL, all you have to do is install it - there is no need to make any changes to your database.

Installation

To install MariaDB, visit the repositories page and select your distribution. The version of MariaDB you choose should match the existing version (if any) of MySQL you are already using. For example, if you are using MySQL 5.2.x you should also use MariaDB 5.2.x. Finally, select the mirror closest to you.

This will give you some repositories to add, and a link to installation instructions.

For Debian stable, you'll need to edit /etc/apt/sources.list and add something like (these links will not work - make sure you get the real ones from the MariaDB website!):

deb http://ftp.heanet.ie/mirrors/mariadb/repo/5.x/debian squeeze main

deb-src http://ftp.heanet.ie/mirrors/mariadb/repo/5.x/debian squeeze main

Once you've done that:

apt-get update

aptitude install mariadb-server-5.x

And that's it!

Much of MariaDB performance comes from superior caching to MySQL. By default, this takes 128MB RAM. You can change this by setting the value aria_pagecache_buffer_size to something else. This figure can be as low as 1M, but 32M or above is recommended.