MySQL replication: most important config parameters for performance on slave server?

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 slave
  • innodb_flush_log_at_trx_commit - set it to 2 or 0
  • innodb_doublewrite - disable innodb doublewrite
  • innodb_flush_method - change the flush method to O_DIRECT
  • sync_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 and sync_relay_log_info

A good option is to read this 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