I use Maria DB. Where can I set the innodb_buffer_pool_size parameter.
I looked in /etc/mysql/mariadb.conf.d/50-server.cnf and
/etc/mysql/my.cnf, but I can’t find the parameter there.
But anywhere the parameter must be set, because I get a result, if I use:
show variables like ‘innodb_buffer_pool%’;
2
Answers
You can set the
innodb_buffer_pool_size
dynamically from the command line.Replace XX with value to suit your database needs. To verify that the variable has been changed:
To continue your search for where it is maybe look in your system logs (usually in /var/log/mysql or similar) for entries indicating MariaDB was started with the
innodb_buffer_pool_size
option.I hope this helps. For more info on tuning InnoDB checkout this article.
If no entry exist in the "my.cnf" configuration file, the default value will be used, as i know.
See: InnoDB System Variables
The above suggestion with SET GLOBAL will work, until the server is restarted.
To set the value permanently, set the variable in your my.cnf config file. Don’t forget to restart the server after that.
Check the value, by using the system variable in a select command:
The value is represented in bytes. For "human readable", use instead
In this example, you see, my server is running with a buffer pool size of 4GB
The represented value in the variable will be depended on your settings, of course. Take a look on the above link. There are plenty recommendation for optimize this (and other) values.
Edit: to set the value in the configuration file, add this entry in the my.cnf file:
innodb_buffer_pool_size=[PUT_YOUR_VALUE_HERE]:
will use a buffer_pool_size of 4294967296 bytes.