HI Joram,
Here i mentioned the configuration of our MySQL DB and also the memory and CPU details of the production server.
Mysql parameters -
#server#####:~ # cat /etc/my.cnf
For advice on how to change settings please see
[mysqld]
Remove leading # and set to the amount of RAM for the most important data
cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
Remove the leading "# " to disable binary logging
Binary logging captures changes between backups and is enabled by
default. It’s default setting is log_bin=binlog
disable_log_bin
Remove leading # to set options mainly useful for reporting servers.
The server defaults are faster for transactions and fast SELECTs.
Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
Remove leading # to revert to previous value for default_authentication_plugin,
this will increase compatibility with older clients. For background, see:
default-authentication-plugin=mysql_native_password
#datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
basedir=/data/mysql
datadir=/data/mysql/data
lc_messages_dir=/data/mysql/share
lc_messages=en_US
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysql/mysqld.log
pid-file=/var/run/mysql/mysqld.pid
log-bin=/data/mysql/log/mysql-bin
#log-error=/var/log/mysql/mysqld.log
#pid-file=/var/run/mysql/mysqld.pid
expire_logs_days=30
MySQL log files
Errors Including Startup Errors
log-error=/var/log/mysql/mysqld.log
all queries, This log will grow quickly
#log=/var/log/mysql/mysql.log
all queries, This log will grow quickly
general_log=1
general_log_file=/var/log/mysql/mysql.log
queries that take a long time (in this case over 1 second as specified below)
#log-slow-queries = /var/log/mysql/mysql-slow.log
long_query_time = 1
slow_query_log=1
slow_query_log_file=/var/log/mysql/mysql-slow.log
Purge flushed binary logs over 30 days = 302460*60 seconds
binlog_expire_logs_seconds=2592000
###To enhance mysql performance as per play and test
innodb-buffer-pool-size=21474836480
innodb_buffer_pool_instances=20
innodb_log_file_size=4294967296
sort_buffer_size = 50M
read_rnd_buffer_size = 50M
join_buffer_size = 256M
innodb_log_buffer_size = 167772160
innodb_sort_buffer_size = 10485760
innodb_read_io_threads = 16
innodb_write_io_threads = 16
innodb_status_output = ON
innodb_status_output_locks = ON
innodb_rollback_on_timeout = ON
server details:
Platform : Google x86_64
Total CPU : 32 CPUs Total Memory : 128923 MB
OS Release : SLES 12 SP5 OS kernel : 4.12.14-122.136-default
Let me know if you need any further details.
Regards,
Preeti Shirur