diff --git a/abra.sh b/abra.sh index 228472e..bdcaa13 100644 --- a/abra.sh +++ b/abra.sh @@ -1,6 +1,6 @@ export FPM_TUNE_VERSION="v4" export NGINX_CONF_VERSION="v2" -export MY_CNF_VERSION="v1" +export MY_CNF_VERSION="v2" NC_APP_DIR="app:/var/www/html" diff --git a/my-tune.cnf b/my-tune.cnf index b81e888..3b6ca4c 100644 --- a/my-tune.cnf +++ b/my-tune.cnf @@ -1,20 +1,37 @@ +# Mostly lifted from the following configs: +# https://git.coop/webarch/mariadb/-/blob/master/templates/50-server.cnf.j2 # https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/linux_database_configuration.html +# https://mariadb.com/kb/en/library/performance-schema-overview/ + [server] -skip_name_resolve = 1 -innodb_buffer_pool_size = 128M -innodb_buffer_pool_instances = 1 +innodb_buffer_pool_instances = 1 +innodb_buffer_pool_size = 1G innodb_flush_log_at_trx_commit = 2 -innodb_log_buffer_size = 32M -innodb_max_dirty_pages_pct = 90 -query_cache_type = 1 -query_cache_limit = 2M -query_cache_min_res_unit = 2k -query_cache_size = 64M -tmp_table_size= 64M -max_heap_table_size= 64M -slow_query_log = 1 -slow_query_log_file = /var/log/mysql/slow.log -long_query_time = 1 +innodb_log_buffer_size = 32M +innodb_max_dirty_pages_pct = 90 +join_buffer_size = 256K +key_buffer_size = 16M +innodb_log_file_size = 256M +long_query_time = 1 +max_allowed_packet = 64M +max_connections = 100 +max_heap_table_size = 64M +max_user_connections = 0 +myisam_recover_options = BACKUP +open_files_limit = 8000 +query_cache_limit = 2M +query_cache_min_res_unit = 2k +query_cache_size = 64M +query_cache_type = 1 +skip_name_resolve = 1 +slow_query_log = 1 +slow_query_log_file = /var/log/mysql/slow.log +table_cache = 64 +table_open_cache = 2000 +thread_cache_size = 8 +thread_concurrency = 10 +thread_stack = 192K +tmp_table_size = 64M [client] default-character-set = utf8mb4 @@ -27,3 +44,10 @@ binlog_format = ROW innodb_large_prefix=on innodb_file_format=barracuda innodb_file_per_table=1 + +[mariadb] +performance_schema=ON +performance-schema-instrument='stage/%=ON' +performance-schema-consumer-events-stages-current=ON +performance-schema-consumer-events-stages-history=ON +performance-schema-consumer-events-stages-history-long=ON