MariaDB: Parameterized performance settings via .env and docker-compose command flags.
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
[server]
|
||||
|
||||
[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
|
||||
long_query_time = 1
|
||||
expire_logs_days = 90
|
||||
max_binlog_size = 512M
|
||||
max_connections = 500
|
||||
wait_timeout = 1800
|
||||
net_read_timeout = 900
|
||||
net_write_timeout = 900
|
||||
@@ -20,18 +19,12 @@ join_buffer_size = 16M
|
||||
read_buffer_size = 4M
|
||||
read_rnd_buffer_size = 8M
|
||||
sort_buffer_size = 16M
|
||||
innodb_buffer_pool_size = 512M
|
||||
innodb_sort_buffer_size = 32M
|
||||
innodb_open_files = 4096
|
||||
|
||||
query_cache_type = ON
|
||||
query_cache_size = 32M
|
||||
query_cache_limit = 4M
|
||||
|
||||
max_heap_table_size = 384M
|
||||
tmp_table_size = 384M
|
||||
table_open_cache = 4000
|
||||
|
||||
[galera]
|
||||
|
||||
[embedded]
|
||||
@@ -46,4 +39,4 @@ server_audit_events = 'CONNECT,TABLE'
|
||||
# skip-name-resolve helps significantly with Docker network overhead
|
||||
skip-name-resolve
|
||||
|
||||
[mariadb-10.11]
|
||||
[mariadb-10.11]
|
||||
@@ -51,6 +51,15 @@ services:
|
||||
restart: always
|
||||
image: mariadb:10.11
|
||||
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:
|
||||
MYSQL_ROOT_PASSWORD: ${AE_DB_PASSWORD}
|
||||
MYSQL_DATABASE: ${AE_DB_NAME}
|
||||
|
||||
Reference in New Issue
Block a user