If your concern is about performance and you don't care about losing a small chunck of data(usually 1 second) in case of server crashes, I would change the follow variables:
innodb_buffer_pool_size
- try to use 80% of your total ram (in this case 3.2Gb)innodb_log_file_size
- chose a good value in here to optimize the i/o in your slaveinnodb_flush_log_at_trx_commit
- set it to 2 or 0innodb_doublewrite
- disable innodb doublewriteinnodb_flush_method
- change the flush method to O_DIRECTsync_binlog
- if you have binary log enable on slave, disable sync_binlog- make sure you have sync slave variables disabled
sync_master_info
sync_relay_log
andsync_relay_log_info
A good option is to read this Percona article, it's a general overview to how optimize innodb, it will work for your master and also to your slave.
If you are planning to upgrade to the percona server which implement features from MySQL 5.6, I would recommend that you increase the number of slave sql threads
slave-parallel-workers
No comments:
Post a Comment