-
Notifications
You must be signed in to change notification settings - Fork 5
fix(mysql_server_mariadb): Set production values as default #2300
base: 2.x
Are you sure you want to change the base?
Conversation
|
gregharvey
left a comment
There was a problem hiding this 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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.



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.