Bug #116716 | Allow Setting Nb Thread for Tablespace Duplicate Check (startup). | ||
---|---|---|---|
Submitted: | 19 Nov 2024 17:06 | Modified: | 3 Dec 2024 18:04 |
Reporter: | Jean-François Gagné | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S4 (Feature request) |
Version: | 9.1.0, 8.4.3, 8.0.40 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Contribution |
[19 Nov 2024 17:06]
Jean-François Gagné
[20 Nov 2024 6:23]
MySQL Verification Team
Hello Jean-François, Thank you for the feature request! regards, Umesh
[3 Dec 2024 15:06]
J-F Aiven Gagné
More about this contribution in https://github.com/jfg956/mysql-server/pull/15 (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: bug#116716.patch (application/octet-stream, text), 4.97 KiB.
[3 Dec 2024 15:08]
MySQL Verification Team
Hello Jean-François, Thank you for your contribution. regards, Umesh
[3 Dec 2024 15:08]
J-F Aiven Gagné
(use-cases about how this contribution is useful will be added soon as a new comment) Some notes about my above contribution extracted from https://github.com/jfg956/mysql-server/pull/15 This PR merges on 9.1.0, and the patch file also applies on 8.4.3 and 8.0.40. For allowing setting the number of threads for InnoDB Tablespace Duplicate Check, this PR introduces a new global variable : innodb_tablespace_duplicate_check_threads. The default value is -1, which means the already implemented heuristic is used for setting the number of threads. A value of 0 to MAX VAL overrides the number of threads of the heuristic. Ideally, in addition to being included in a next Innovation Release, this would be back ported in 8.4 and 8.0. The default value of the global variable introduced by this change is backward compatible with 8.4 and 8.0, so I think this change does not introduce any compatibility problems. And as this change introduces a potential performance improvement making startup faster, I think there is value in back-porting it.
[3 Dec 2024 18:04]
Jean-François Gagné
I blogged about this contribution in below. https://jfg-mysql.blogspot.com/2024/11/innodb-tablespace-duplicate-check-threads.html In above post, I show that: > Duplicate Check thread tuning is useful for small vm connected to high-throughput network disks (these usually have high latency, needing many threads) Indeed, default startup on a AWS m6i.large instance with 16k iops disk takes 3:33 (3 minutes 33 seconds), compared to 2:28 and 2:23 with 8 and 16 threads, which is 65 seconds faster (30%).