Configuring MariaDB for optimial performance

You are viewing an old version of this article. View the current version here.

This article is to help you configure MariaDB for optimal performance.

For this article we assume that you are running MariaDB on it's own dedicated server.

Note that this article is not yet complete. Please update this if you have more ideas!

my.cnf files

MariaDB is normally configured by editing the my.cnf file.

The following my.cnf example files are included with MariaDB. Examine them to see more complete examples of some of the many ways to configure MariaDB and use the one that fits you best as a base.

  • my-small.cnf
  • my-medium.cnf
  • my-large.cnf
  • my-huge.cnf

InnoDB & XtraDB storage engine

InnoDB or XtraDB is by normally the default storage engine with MariaDB.

  • You should set innodb_buffer_pool_size to about 80% of your memory. The goal is to ensure that 80 % of your working set is in memory!

Aria Storage engine

  • MariaDB uses by default the Aria storage engine for internal temporary files, instead of MyISAM as MySQL does. If you have a lot of temporary files, you should add and set aria-pagecache-buffer-size to a reasonable large value (128M?) so that temporary overflow data is not flushed to disk.

MyISAM

  • If you don't use MyISAM tables explicitly, you can set key-buffer-size to a very low value, like 64K.

See also

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.