How to improve the speed of InnoDB writes per second of MySQL DB

前端 未结 4 586
再見小時候
再見小時候 2020-12-16 07:16

On my server, doing insert records into MySQL DB is very slow. Regarding the Server Status, InnoDB writes per second is around 20.

I am not an expert, just graduated

4条回答
  •  时光说笑
    2020-12-16 07:42

    If using InnoDB engine+local disk, try to benchmark with innodb_flush_method = O_DSYNC. With O_DSYNC our bulk inserts (surrounded by TRANSACTION) was improved.

    Adjust the flush method

    In some versions of GNU/Linux and Unix, flushing files to disk with the Unix fsync() call (which InnoDB uses by default) and similar methods is surprisingly slow. If database write performance is an issue, conduct benchmarks with the innodb_flush_method parameter set to O_DSYNC.

    https://dev.mysql.com/doc/refman/5.5/en/optimizing-innodb-diskio.html

提交回复
热议问题