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
sean@cacti:/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
sean@cacti:/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
So, in actuality, you’re just sharing your configuration…no advice on how you determined the values you selected?
Hey!
Thanks for the comment I should really update this post
The recommendations along with explanations are listed at install time for cacti
Also for later when the systems grows you can refer back to then in the tech support page of cacti
Let me know if you need any more clarity
Thanks!