Which InnoDB parameters should I tune if disk I/O is slow?
Please give your suggestions.
I have another question regarding innodb_log_file :- What happen if innodb_log_file become full ? so what is mysql next action on this situation ?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityThat depends on why your disk I/O is slow and how many safeties you are willing to disable. Some examples:
sync_binlog=0
# if you use binlogs - you could lose up to typically 5 seconds of transactions that were written to the binlog
innodb_doublewrite=0
# you will end up with corrupted data if a page written to the transaction log is torn due to a crash or power failure
innodb_flush_logs_at_trx_commit=0
# you will lose up to typically 5 seconds of transactions that were written to InnoDB.
innodb_io_capacity
and innodb_io_capacity_max
- make sure these are set appropriately for your disk speed. Defaults are 200 and 2000 respectively, which is probably too high for regular SATA HDDs and certainly too low for SSDs, especially high end NVMe SSDs.
SHOW CREATE TABLE foo\G