Quick post on how to tune your MariaDB installation for Cacti
The Cacti installation outlines some recommendations for best performance while using Mysql or MariaDB
Tuning your DB for your cacti installation can give you a significant boost in performance especially as your installation grows.
In this example, I am using MariaDB with the following settings on a 4 X CPU and 4GB Memory VM
go over to the following directory
cd /etc/mysql/mariadb.conf.d/
we will be making a copy of the following file
cp 50-server.cnf 50-server.cnf.bak
This is the main configuration file for MariaDB
use your favorite text editor to edit 50-server.cnf
in this case, I am using nano

Add the following directives to the bottom of this file
innodb_flush_log_at_timeout = 4
innodb_read_io_threads = 34
innodb_write_io_threads = 17
max_heap_table_size = 70M
tmp_table_size = 70M
join_buffer_size = 130M
innodb_buffer_pool_size = 250M
your config file should now look like this at the bottom
[email protected]:/etc/mysql/mariadb.conf.d$ tail 50-server.cnf
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.0]
innodb_flush_log_at_timeout = 4
innodb_read_io_threads = 34
innodb_write_io_threads = 17
max_heap_table_size = 70M
tmp_table_size = 70M
join_buffer_size = 130M
innodb_buffer_pool_size = 250M
[email protected]:/etc/mysql/mariadb.conf.d$
Save the file and restart the MariaDB service
sudo systemctl restart mysql
You have now added the recommended settings for cacti if you experience any errors check the syntax if all else fails revert the backup