Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Conversation

klausi
Copy link
Contributor

@klausi klausi commented Feb 11, 2025

Problem: the MariaDB role is not tuned for production. Here are the values we tweaked.

Let me know if this is something you would like to merge, then I can also make a PR for the devel branch.

Copy link

Copy link
Member

@gregharvey gregharvey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, if we could have a few more of the server settings configurable as Ansible variables that would make the role more flexible. If you like I can add you to the project and you can push your feature branch, and then I can make these changes for you? 🙂

state: restarted
enabled: true

- name: Update MySQL root password.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need lines 33 to 41 for our ce-dev product that the database container. This might change in the future, but for now these lines should be left in. is_local: false is the default, so they will not have any effect on production systems.

tmp_table_size= 1G
max_heap_table_size = 1G
# Query cache is disabled for performance reasons for now.
query_cache_size= 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy for these to be 0 by default, but they should be in defaults so people can change them if they would like to. The comment should move to defaults/main.yml against the variable too.

sql_mode = NO_ENGINE_SUBSTITUTION
innodb_buffer_pool_size= 512M
# Use a quarter of the total RAM for the buffer pool.
innodb_buffer_pool_size = {{ ansible_facts.memtotal_mb // 4 }}M
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above, this should probably be a variable. You could have this in defaults/main.yml:

mysql_server:
  innodb_buffer_pool_size: "{{ ansible_facts.memtotal_mb // 4 }}M"

And then in this template:

innodb_buffer_pool_size = {{ mysql_server.innodb_buffer_pool_size }}

Gives people more flexibility.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants