PMM-12392 Collect processlist from performance_schema on newer MySQL#359
Merged
4nte merged 14 commits intoMay 14, 2026
Merged
Conversation
On MySQL 8.0.22+ and 5.7.39+, query performance_schema.processlist instead of information_schema.processlist to avoid the global thread-list mutex taken by the information_schema variant. Older MySQL, MariaDB, and other flavors keep using information_schema.
Member
|
@4nte I guess you implemented the additional check but didn't update the description. |
ademidoff
reviewed
Apr 23, 2026
Query @@performance_schema at instance init and only query from performance_schema.processlist when it's actually enabled. Falls back to information_schema.processlist otherwise. Hoist semver.MustParse calls to package-level vars so they're parsed once instead of on every scrape
maxkondr
reviewed
Apr 24, 2026
postgres_exporter was extracted instead of mysqld_exporter
The --exporter.global-conn-pool flag was dropped in PMM-12153
…URCE_NAME Replace the legacy DATA_SOURCE_NAME env var with --mysqld.address, --mysqld.username and the MYSQLD_EXPORTER_PASSWORD env var, matching how the exporter is configured in production. Also pin --config.my-cnf to /dev/null so the test ignores the developer's ~/.my.cnf and stays deterministic regardless of the local environment.
ademidoff
reviewed
Apr 27, 2026
Co-authored-by: Alex Demidoff <alexander.demidoff@percona.com>
JiriCtvrtka
reviewed
Apr 27, 2026
JiriCtvrtka
reviewed
Apr 27, 2026
| *pProcesslistMinTime, | ||
| ) | ||
| // Prefer querying performance_schema.processlist instead of information_schema.processlist to avoid negative perf consequences | ||
| // Supported by MySQL >=5.7.39 and >=8.0.22 |
There was a problem hiding this comment.
Suggested change
| // Supported by MySQL >=5.7.39 and >=8.0.22 | |
| // Supported by Percona Server >=5.7.39 and MySQL >=8.0.22 |
Author
There was a problem hiding this comment.
Supported by Percona Server >=5.7.39 and MySQL >=8.0.22
To me, this reads like MySQL is supported from 8.0.22, but not from 5.7.39.
Since Percona server and MySQL are both aligned version-for-version in regards to P_S.processlist support, perhaps this reads better:
Supported by Percona Server/MySQL >=5.7.39 and >=8.0.22
JiriCtvrtka
reviewed
Apr 27, 2026
maxkondr
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: PMM-12392
Feature build
abbrevations:
I_S - information_schema
P_S - peformance_schema
On MySQL 8.0.22+ and 5.7.39+, we want to query
performance_schema.processlist instead of information_schema.processlist to avoid the global thread-list mutex taken by the information_schema variant. Older MySQL, MariaDB, and other flavors keep using information_schema.
Additionally, we check/probe if performance_schema is really enabled on the host database - if it's not, we fallback to information_schema.
5.7.38 vs 5.7.39 benchmark on stock (PMM 3.7.0) vs patch (PMM-12392)
5.7.39 is performing better, this matches our expectations since 5.7.39+ benefits from using P_S instad of I_S, while 5.7.38 is stuck with I_S.
MySQL 5.7.39 release notes
Got the
percona/testssuite running again: