Page 1 of 1

mariadb.conf tweak for 16 GB RAM

Posted: Sun Dec 27, 2020 3:42 am
by webxtek
Hi everyone,

I'm running a hetzner cloud with 4 vcpus and 8gb ram, planing to move to 16gb ram, anyway is there any special tweaks i could give to optimize more the server?

Thanks everyone :D

Re: Optimize DB

Posted: Mon Dec 28, 2020 9:23 am
by myVesta
my tweak of mariadb.conf for 16GB

Code: Select all

key_buffer_size = 512M
max_allowed_packet = 32M
# table_open_cache = 256
sort_buffer_size = 4M
net_buffer_length = 16K
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 128M
# thread_cache_size = 8
# query_cache_size= 16M
# thread_concurrency = 8

#innodb_use_native_aio = 0
innodb_file_per_table

max_connections=200
max_user_connections=50
# wait_timeout=30
interactive_timeout=50
long_query_time=5

table_open_cache = 20480
thread_cache_size = 384
query_cache_size = 50M
# thread_concurrency = 16
wait_timeout = 180
join_buffer_size = 16M
query_cache_type = 1
tmp_table_size = 512M
innodb_buffer_pool_size=2G