# # These groups are read by MariaDB server. # Use it for options that only the server (but not clients) should see # this is read by the standalone daemon and embedded servers [server] # this is only for the mysqld standalone daemon [mysqld] # # * Basic Settings # user = mysql pid-file = /run/mysqld/mysqld.pid basedir = /usr datadir = /var/lib/mysql tmpdir = /run/mysqld innodb_log_group_home_dir = /var/lib/mysql_log lc-messages-dir = /usr/share/mysql lc-messages = en_US skip-external-locking socket = /var/run/mysqld/mysqld.sock # Broken reverse DNS slows down connections considerably and name resolve is # safe to skip if there are no "host by domain name" access grants skip-name-resolve # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address = 127.0.0.1 # # * Fine Tuning # max_connections = 1100 connect_timeout = 10 wait_timeout = 300 interactive_timeout = 300 net_write_timeout = 90 net_read_timeout = 60 max_allowed_packet = 768M thread_cache_size = 1024 sort_buffer_size = 128M bulk_insert_buffer_size = 32M tmp_table_size = 8G max_heap_table_size = 8G thread_handling = pool-of-threads transaction-isolation = READ-COMMITTED group_concat_max_len = 15360 performance_schema = ON # Found to be faster on large complicated queries a long time ago. Need to test with this turned off on MariaDB >10.6 optimizer_search_depth = 8 # # * MyISAM # # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched. On error, make copy and try a repair. myisam_recover_options = BACKUP key_buffer_size = 2M #open-files-limit = 200 table_open_cache = 6000 table_cache = 3000 table_definition_cache = 2800 myisam_sort_buffer_size = 8M concurrent_insert = 2 read_buffer_size = 4M read_rnd_buffer_size = 4M join_buffer_size = 8M query_cache_limit = 4M #query_cache_size = 128M query_cache_size = 0 query_cache_type = OFF # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. # Recommend only changing this at runtime for short testing periods if needed! #general_log_file = /var/log/mysql/mysql.log #general_log = 1 # When running under systemd, error logging goes via stdout/stderr to journald # and when running legacy init error logging goes to syslog due to # /etc/mysql/conf.d/mariadb.conf.d/50-mysqld_safe.cnf # Enable this if you want to have error logging into a separate file #log_error = /var/log/mysql/error.log # Enable the slow query log to see queries with especially long duration #slow_query_log_file = /var/log/mysql/mariadb-slow.log #long_query_time = 10 #log_slow_verbosity = query_plan,explain #log-queries-not-using-indexes #min_examined_row_limit = 1000 slow_query_log=0 slow_query_log_file = /var/log/mysql/mariadb-slow.log long_query_time = 30 #log_slow_rate_limit = 1000 log_slow_verbosity = query_plan # The following can be used as easy to replay backup logs or for replication. # note: if you are setting up a replication slave, see README.Debian about # other settings you may need to change. #server-id = 1 #log_bin = /var/log/mysql/mysql-bin.log expire_logs_days = 10 #max_binlog_size = 100M # # * SSL/TLS # # For documentation, please read # https://mariadb.com/kb/en/securing-connections-for-client-and-server/ #ssl-ca = /etc/mysql/cacert.pem #ssl-cert = /etc/mysql/server-cert.pem #ssl-key = /etc/mysql/server-key.pem #require-secure-transport = on # # * Character sets # # MySQL/MariaDB default is Latin1, but in Debian we rather default to the full # utf8 4-byte character set. See also client.cnf character-set-server = utf8mb4 collation-server = utf8mb4_general_ci # # * InnoDB # # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many! # Most important is to give InnoDB 80 % of the system RAM for buffer use: # https://mariadb.com/kb/en/innodb-system-variables/#innodb_buffer_pool_size innodb_log_file_size = 24G innodb_buffer_pool_size = 96G innodb_log_buffer_size = 200M innodb_file_per_table = ON innodb_open_files = 1800 # Not sure if we still need this? (NVME Disks) innodb_io_capacity = 30000 innodb_io_capacity_max = 35000 #innodb_flush_method = O_DIRECT # Is now default since 10.6 innodb_flush_log_at_trx_commit = 0 innodb_strict_mode = 1 innodb_compression_level = 1 innodb_adaptive_hash_index = OFF innodb_lock_wait_timeout = 60 innodb_flush_neighbors = 0 innodb_use_atomic_writes = 0 innodb_write_io_threads = 64 innodb_read_io_threads = 64 innodb_lru_scan_depth = 512 innodb_print_all_deadlocks = ON # ZFS innodb_log_write_ahead_size=16384 innodb_doublewrite = 0 innodb_use_native_aio = 0 #innodb_checksum_algorithm=none # this is only for embedded server [embedded] # This group is only read by MariaDB servers, not by MySQL. # If you use the same .cnf file for MySQL and MariaDB, # you can put MariaDB-only options here [mariadb] # This group is only read by MariaDB-10.6 servers. # If you use the same .cnf file for MariaDB of different versions, # use this group for options that older servers don't understand #[mariadb-10.6]