-
Notifications
You must be signed in to change notification settings - Fork 5
fix(mysql_server_mariadb): Set production values as default #2300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
[mysqld] | ||
bind-address = 0.0.0.0 | ||
character_set_server = utf8 | ||
collation_server = utf8_general_ci | ||
bind-address = 127.0.0.1 | ||
slow_query_log = 1 | ||
slow_query_log_file = /var/log/mysql/slow-query.log | ||
slow_query_log_file = /var/log/mysql/mariadb-slow.log | ||
log_slow_admin_statements = 1 | ||
general_log = 0 | ||
log_queries_not_using_indexes = 1 | ||
long_query_time = {{ mysql_server.long_query_time }} | ||
skip-host-cache | ||
skip-name-resolve | ||
|
@@ -16,23 +13,31 @@ read_buffer_size = 8M | |
read_rnd_buffer_size= 4M | ||
sort_buffer_size= 4M | ||
bulk_insert_buffer_size = 16M | ||
max_allowed_packet= 128M | ||
# We need a large size for big tables during backups. | ||
max_allowed_packet = 1G | ||
thread_cache_size = 200 | ||
max_connections = 300 | ||
open_files_limit= 2000 | ||
tmp_table_size= 128M | ||
max_heap_table_size = 128M | ||
query_cache_size= 1G | ||
query_cache_limit = 128M | ||
query_cache_type= 1 | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Happy for these to be |
||
query_cache_type= 0 | ||
join_buffer_size = 512M | ||
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 commentThe 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 mysql_server:
innodb_buffer_pool_size: "{{ ansible_facts.memtotal_mb // 4 }}M" And then in this template:
Gives people more flexibility. |
||
innodb_read_io_threads = 8 | ||
innodb_write_io_threads= 8 | ||
innodb_flush_method= O_DIRECT | ||
innodb_io_capacity = 400 | ||
innodb_file_per_table= 1 | ||
innodb_flush_log_at_trx_commit = 1 | ||
innodb_flush_log_at_trx_commit = 2 | ||
sync_binlog= 100 | ||
innodb_stats_on_metadata = 0 | ||
|
||
[mysqldump] | ||
quick | ||
quote-names | ||
# We need a large size for big tables during backups. | ||
max_allowed_packet = 1G |
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.