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

Show:

dmitriy.kostiuk October 3, 2022 at 7:59 AM

our docs have much simpler MySQL configuration examples (just one-line setting max_connections). So this is currently present in deploy/cr.yaml only

Sergey Pronin July 25, 2022 at 11:21 AM

We can calculate 3 parameters based on RAM:

  • innodb_log_file_size

  • max_connections

  • innodb_buffer_pool_size

Template will be set like this in config: {containerMemoryLimit * 3/4}

 

Without container memory limit - we are going to use host RAM size.

Done

Details

Assignee

Reporter

Needs QA

Yes

Needs Doc

Yes

Fix versions

Priority

Smart Checklist

Created July 1, 2022 at 2:08 PM
Updated February 29, 2024 at 8:12 PM
Resolved January 30, 2023 at 10:05 AM