Bug #93500 | Question about Mysql8.0 Innodb's log_writer | ||
---|---|---|---|
Submitted: | 6 Dec 2018 7:48 | Modified: | 7 Dec 2018 13:34 |
Reporter: | Zongzhi Chen (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S5 (Performance) |
Version: | 8.0.13 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | log_writer |
[6 Dec 2018 7:48]
Zongzhi Chen
[6 Dec 2018 14:27]
MySQL Verification Team
Hi, Thank you for your bug report. I have studied deeply your code analysis and I have discovered that you are right. Hence, this is a fully qualified performance bug. Thank you for your contribution.
[6 Dec 2018 19:30]
Pawel Olchawa
This has been already fixed (and done other way around) in 8.0.14 :-) We: 1. Notify log_writer / log_flusher in log_wait_for_write / log_wait_for_flush at the beginning. 2. Then we are spinning (busy waiting, not to give away context). 3. Then we keep notifying log_writer / log_flusher every wait on event if spinning was not enough (including just before the first wait). There is hardly any reason (and we most likely can't afford that) to notify every mtr_commit (every write to log buffer). We notify only when we need redo written / flushed. Regarding 10us: 1. First log thread tries busy waiting for some next work to be done. 2. Afterwards it falls back to waiting on event, and it starts with 10us, but it also multiplies that by 2 every 4 waits (up to maximum 100ms). Note: in 8.0.14 we notify log_writer as soon as we start to wait on redo written (current write_lsn was not enough). Sorry for the confusion. It is very nice to see you interested in the code, and thank you for all the comments! We are working and trying to improve things around :-)
[7 Dec 2018 13:34]
MySQL Verification Team
Hi Pawel, Thank you for informing us that this problem is resolved in 8.0.14. I have not yet had time to download and inspect the code. Since the problem is fixed, this bug is therefore closed.
[31 Jan 2019 12:36]
Erlend Dahl
Fixed in 8.0.14 under the heading of BUG#28616442 FIX TO BUG#28062382 DRAMATICALLY REDUCES THROUGHPUT WHEN THE BINLOG IS ACTIVE