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

Note that by default MariaDB is configured to work on a desktop system and should because of this not take a lot of resources. To get things to work for a dedicated server, you have to do a few minutes of work.

For this article we assume that you are going to run MariaDB on a dedicated server.

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

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 (128 meg?) so that temporary overflow data is not flushed to disk. The default value is 16 meg.

Lots of connections

A lot of fast connection + small set of queries + disconnect

If you have a lot (> 128) of simultaneous running fast queries, you should consider setting thread_handling to pool_of_threads.

Connecting from a lot of different machines

If you are connecting from a lot of different machines you should increase host_cache_size to the max number of machines (default 128) to cache the resolving of hostnames. If you don't connect from a lot of machines, you can set this to a very low value!