Skip to content

Instantly share code, notes, and snippets.

@mshafiee
Created December 29, 2018 16:12
Show Gist options
  • Save mshafiee/3e5c7295a777a8aa565541ca5904b9be to your computer and use it in GitHub Desktop.
Save mshafiee/3e5c7295a777a8aa565541ca5904b9be to your computer and use it in GitHub Desktop.
# Template my.cnf for PXC
# Edit to your requirements.
[mysqld]
server-id=1
datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
log-bin
log_slave_updates
expire_logs_days=7
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
innodb_buffer_pool_size = 26G # (adjust value here, 50%-70% of total RAM)
innodb_log_file_size = 2G
innodb_file_per_table=ON
innodb_flush_log_at_trx_commit = 1 # may change to 2 or 0
innodb_flush_method = O_DIRECT
innodb_io_capacity = 2000
innodb_io_capacity_max = 5000 #SSD=6000
max_connections=10000
query_cache_size=0
query_cache_type=0
query_cache_limit = 1M
tmp_table_size=512M
max_heap_table_size= 512M
thread_cache_size = 10240
table_open_cache = 10240
innodb_buffer_pool_instances=26
join_buffer_size = 1G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment