ExtensionCrawler/database/config/my.cnf

62 lines
1.6 KiB
INI

[client]
port = 3306
socket = /run/mysqld/mysqld.sock
[mysqld]
port = 3306
socket = /run/mysqld/mysqld.sock
wait_timeout=1800
max_connections=1000
explicit_defaults_for_timestamp=1
default_time_zone='+00:00'
server-id = 1
expire_logs_days=8
log-basename=master1-bin
# Ideally, the MariaDB datadir resides on a HDD, as there will be a lot of sequential IO.
# After creating a database, it is best moved to a SSD, as there will be a lot of
# random IO. This can be done by simply moving the directory (do NOT move individual table
# files!), e.g.: cd /hdd/mysql; mv extensions /ssd/databases/; ln -s /ssd/databases/extensions
datadir=/hdd/mysql
# When adding indices, MariaDB uses a lot of space in /tmp. If that space is not enough, the
# used tmpdir can be moved:
innodb_tmpdir=/ssd/innodb_tmp
# The pool size is said to be around 75% of the available RAM on db-only hosts. However, current
# versions of MariaDB seem to have serious memory leaks when doing a lot of concurrent writes.
# Therefore, expect MariaDB to use a lot more memory, create sufficient swap to prevent killing,
# and restart MariaDB when the usage grows too high.
innodb_buffer_pool_size = 18G
# General performance tweaks
innodb_read_io_threads=8
innodb_write_io_threads=8
innodb_sort_buffer_size=67108864
innodb_log_file_size=256M
innodb_log_buffer_size=256M
# Performance tweaks for inserts
#innodb_flush_log_at_trx_commit=0
#innodb_change_buffer_max_size=50
#innodb_flush_method=O_DIRECT
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout