template innodb_buffer_pool_size with instance memory size

Description

The advice to use 75% of RAM for InnoDB buffer pool size is not applicable to all databases.

Other cloud solutions, like AWS allows to specify instance memory size as a template parameter in the configuration: {DBInstanceClassMemory*3/4}
https://aws.amazon.com/ru/blogs/database/best-practices-for-configuring-parameters-for-amazon-rds-for-mysql-part-1-parameters-related-to-performance/#:~:text=for%20configuring%20each.-,innodb_buffer_pool_size,-This%20parameter%20decides

Currently the operator can only use 75% by default and a specific value if it's defined in mysql configuration.

Environment

None

AFFECTED CS IDs

CS0026619

Smart Checklist

Activity

natalia.marukovich November 17, 2022 at 11:04 AM
Edited

We discussed it with and . In this release we only implement the logic for all vars:
If limits are set we apply auto-tuning.
If no limits are set no autotuning.

Slava Sarzhan October 27, 2022 at 2:04 PM

Hi,

It was added for PXC operator too.

Nickolay Ihalainen May 10, 2022 at 3:17 PM

modern mysql has some sort of auto-tuning, based on max_connections

General auto-tuning is based on RAM amount:
https://dev.mysql.com/doc/refman/8.0/en/innodb-dedicated-server.html

So we can allow to set these parameters templated with RAM amount as well:
innodb_log_file_size
max_connections

So user can put a formula based on number of CPU/RAM amount for these parameters.
For any parameter except for Innodb buffer pool size the feature is not expected by user, so it should be properly documented with examples & a blog post

Sergey Pronin May 6, 2022 at 7:04 AM

 I wonder if there is any other parameter users would want to set in a similar way. Do you know of any? 

I doubt it is just innodb_buffer_pool_size

Done

Details

Assignee

Reporter

Needs QA

Yes

Needs Doc

Yes

Fix versions

Priority

Smart Checklist

Created May 3, 2022 at 2:49 PM
Updated March 5, 2024 at 5:38 PM
Resolved December 19, 2022 at 10:50 AM