[MDEV-23007] excessive disk write regression Created: 2020-06-24 Updated: 2023-10-05 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.3.22, 10.2.32, 10.3.23, 10.4.13, 10.5.3 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Shane Bishop | Assignee: | Axel Schwenke |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | innodb, performance, regression, replication | ||
| Environment: |
Discovered on Debian 10.3, replicated on Debian 9.12, Ubuntu 20.04, and CentOS 8.2. All systems are Digital Ocean droplets with 2 vCPU (2.3GHz), 2GB RAM, and SSD storage. |
||
| Attachments: |
|
| Description |
|
I originally posted a question at https://dba.stackexchange.com/questions/269503/why-is-disk-io-higher-on-debian-10-mariadb-10-3-with-mysql-replication I also noticed 10.3.22 was using the Barracuda format, whereas 10.1.44 was using Antelope, so I moved the 10.1.44 primary server to Barracuda which did not have a negative impact. Note that I wasn't sure how to rebuild these tables, so they remain as Antelope: SYS_DATAFILES, SYS_FOREIGN, SYS_FOREIGN_COLS, SYS_TABLESPACES. After all that, I wanted to rule out Debian 10 as the culprit, and I also tested various versions of MariaDB and even MySQL 8, so here are the combinations that I've tried: I included hostnames, so you can see them on these charts for comparison (which is live data): Note that db11296 is currently running 10.5.3, but I tested it on all those versions for at least an hour to compare it with the performance of the other active servers. The workload on the db is nothing too crazy, 5-15 updates/second, lots of reads, and the occasional insert/delete. Some of the most common queries are these: |
| Comments |
| Comment by Shane Bishop [ 2020-06-25 ] |
|
I forgot to provide my "stock" config for these nodes: key_buffer_size = 16M server-id = 12 Note, if you look at the charts, you might run into a time when all the servers seem to have "synced up" with roughly the same amount of disk write activity. I noticed this for the first time yesterday. I thought perhaps it was due to some changes I made which were making additional writes of this sort: |
| Comment by Shane Bishop [ 2020-07-07 ] |
|
I finally had time to test Percona (8.0.19), and discovered that it does not suffer from this same issue. Disk IO (writes specifically) is significantly better than MariaDB 10.2+, a bit better than stock MySQL 8, and the same or better than the original slave server running MariaDB 10.1. |
| Comment by Eran Gerenrot (Inactive) [ 2020-09-16 ] |
|
I have the exact same issue. MariaDB 10.2 writes 4 times more to disk than 10.1 |
| Comment by Guillaume Lefranc [ 2020-11-12 ] |
|
Same issue, after upgrade: Digging in system i/o profiles it appears that MariaDB 10.2 is writing to redo logs intensively. |
| Comment by Guillaume Lefranc [ 2020-11-12 ] |
|
Found the cause of the regression: High innodb_io_capacity settings are now interpreted in a different, more aggressive fashion by the innodb page flushing algorithm in InnoDB 5.7, it seems. Thanks Percona for the explanations in this post: https://www.percona.com/blog/2020/05/14/tuning-mysql-innodb-flushing-for-a-write-intensive-workload/ |
| Comment by Shane Bishop [ 2020-12-07 ] |
|
If your innodb_io_capacity setting was carried over from a previous version, that could certainly explain it, as I think Debian 9/MariaDB 10.1 had a default of 2000. |
| Comment by Olivier FILIPE [ 2022-01-21 ] |
|
Hello, |
| Comment by Shane Bishop [ 2022-02-15 ] |
|
Thanks for the suggestion, but I've just moved the entire thing over to a managed database so I don't have to deal with the issues anymore. So unfortunately, I don't have a way to test it anymore. Even if I brought the servers back online, there would be no way to generate the same load they were handling before |