RDS innodb_flush_log_at_trx_commit problem

Posted on

Question :

I use Amazon RDS as mysql db backend for highload project and try to optimize insert performance for innodb tables.
According to information from different sources – good candidate to speed up inserts is innodb_flush_log_at_trx_commit parameter.
My local tests show significant boost when I set it to 2 (or 0), but changing this param on RDS has no effect.
What may be a problem?
I tried all available values and results are the same (30-40 inserts per second into empty table) while local tests show ~9000 inserts per second.
I also tried M3.large General Purpose SSD RDS test instance (0 load) with same result.

Answer :

Complain to RDS.


Plan A: Design code to gather the rows up and do a multi-row INSERT or LOAD DATA.

Plan B: Put BEGIN and COMMIT around small batches of rows. (Suggest 1 second or 100 rows or 1MB, whichever comes first.)

Leave a Reply

Your email address will not be published. Required fields are marked *