[MDEV-23720] Change innodb_log_optimize_ddl=OFF by default Created: 2020-09-11 Updated: 2021-02-05 Resolved: 2020-10-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup, Storage Engine - InnoDB |
| Fix Version/s: | 10.2.35, 10.3.26, 10.4.16 |
| Type: | Task | Priority: | Blocker |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | deprecated_feature, not-10.5, performance | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Description |
|
MariaDB 10.2.2 inherited from MySQL 5.7 a perceived optimization of ALTER TABLE, which skips the writing of redo log records. In As noted in
Since the time the original benchmarks for My primary motivation for changing the parameter is not performance but correctness, and the avoidance of bugs like
|
| Comments |
| Comment by Marko Mäkelä [ 2020-09-17 ] | ||||||||||||||||||||
|
On popular demand, I repeated the exercise with 4 million rows and on NVMe storage instead of RAM disk, this time on 10.2 224c950462a22e09f4e2e37d19218c9129bccba6. The size of the table is multiple gigabytes already before creating the indexes, and 13GiB after creating the indexes.
In this case (on real storage instead of RAM disk), we are seeing a significant performance improvement in both cases when disabling the harmful setting. The FLUSH TABLES FOR EXPORT step is not strictly necessary. It is only there to make the comparison a little more fair. The invocation was slightly different, to keep the data in the buffer pool:
| ||||||||||||||||||||
| Comment by Ralf Gebhardt [ 2020-09-17 ] | ||||||||||||||||||||
|
Changing the default in GA releases requires more benchmarking to avoid regressions. Benchmarks need to be done after fixing | ||||||||||||||||||||
| Comment by Elena Stepanova [ 2020-09-23 ] | ||||||||||||||||||||
|
Simultaneously with disabling innodb_log_optimize_ddl in 10.2+, I suggest to "backport" its deprecation from 10.5 to 10.2 – make it deprecated in 10.2+ as well. It provides some logic and context for disabling it in post-GA releases, and more importantly it will warn users who set it on explicitly in their configuration. | ||||||||||||||||||||
| Comment by Marko Mäkelä [ 2020-10-25 ] | ||||||||||||||||||||
|
The parameter innodb_log_optimize_ddl will be OFF by default and documented as deprecated in information_schema.system_variables. I did not add a deprecation warning if the parameter is set on startup or by SET GLOBAL. |