MariaDB: Parameterized performance settings via .env and docker-compose command flags.
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
[server]
|
[server]
|
||||||
|
|
||||||
[mysqld]
|
[mysqld]
|
||||||
# Optimized for Aether Dev (based on production Linode config)
|
# Global defaults for Aether Dev (Overrides are in docker-compose.yml via .env)
|
||||||
slow_query_log = ON
|
slow_query_log = ON
|
||||||
long_query_time = 1
|
long_query_time = 1
|
||||||
expire_logs_days = 90
|
expire_logs_days = 90
|
||||||
max_binlog_size = 512M
|
max_binlog_size = 512M
|
||||||
max_connections = 500
|
|
||||||
wait_timeout = 1800
|
wait_timeout = 1800
|
||||||
net_read_timeout = 900
|
net_read_timeout = 900
|
||||||
net_write_timeout = 900
|
net_write_timeout = 900
|
||||||
@@ -20,18 +19,12 @@ join_buffer_size = 16M
|
|||||||
read_buffer_size = 4M
|
read_buffer_size = 4M
|
||||||
read_rnd_buffer_size = 8M
|
read_rnd_buffer_size = 8M
|
||||||
sort_buffer_size = 16M
|
sort_buffer_size = 16M
|
||||||
innodb_buffer_pool_size = 512M
|
|
||||||
innodb_sort_buffer_size = 32M
|
innodb_sort_buffer_size = 32M
|
||||||
innodb_open_files = 4096
|
innodb_open_files = 4096
|
||||||
|
|
||||||
query_cache_type = ON
|
query_cache_type = ON
|
||||||
query_cache_size = 32M
|
|
||||||
query_cache_limit = 4M
|
query_cache_limit = 4M
|
||||||
|
|
||||||
max_heap_table_size = 384M
|
|
||||||
tmp_table_size = 384M
|
|
||||||
table_open_cache = 4000
|
|
||||||
|
|
||||||
[galera]
|
[galera]
|
||||||
|
|
||||||
[embedded]
|
[embedded]
|
||||||
|
|||||||
@@ -51,6 +51,15 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
image: mariadb:10.11
|
image: mariadb:10.11
|
||||||
container_name: ae_mariadb_dev
|
container_name: ae_mariadb_dev
|
||||||
|
command: [
|
||||||
|
"mysqld",
|
||||||
|
"--max-connections=${MARIADB_MAX_CONNECTIONS}",
|
||||||
|
"--innodb-buffer-pool-size=${MARIADB_INNODB_BUFFER_POOL_SIZE}",
|
||||||
|
"--query-cache-size=${MARIADB_QUERY_CACHE_SIZE}",
|
||||||
|
"--tmp-table-size=${MARIADB_TMP_TABLE_SIZE}",
|
||||||
|
"--max-heap-table-size=${MARIADB_TMP_TABLE_SIZE}",
|
||||||
|
"--table-open-cache=${MARIADB_TABLE_OPEN_CACHE}"
|
||||||
|
]
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ${AE_DB_PASSWORD}
|
MYSQL_ROOT_PASSWORD: ${AE_DB_PASSWORD}
|
||||||
MYSQL_DATABASE: ${AE_DB_NAME}
|
MYSQL_DATABASE: ${AE_DB_NAME}
|
||||||
|
|||||||
Reference in New Issue
Block a user