forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CPU usage and delay columns to P_S.processlist and P_S.threads
Summary: This change adds PSI APIs to record quantum start/end and delay in the `PFS_thread` object. The CPU scheduler calls these APIs at the appropriate points (see D52988152). Note that the APIs do not take any write locks like statement or session, so this is just the best effort; if the results don't make sense the query should be rerun. The `performance_schema.processlist` and `performance_schema.threads` tables now include two new columns to show the current `CPU_USAGE` and `DELAY_TOTAL` for all running queries. If a connection is idle, the columns show `NULL` values. Differential Revision: D52988122 fbshipit-source-id: de9df4f ------------------------------------------------------------------------------------------------- Bump P_S version for processlist and threads tables changes Summary: The previous change D52988122 missed the version bump. As a result, the data dictionary on prod instances doesn't get updated and new columns do not show up. Differential Revision: D56020631 fbshipit-source-id: 81e7b50 ------------------------------------------------------------------------------------------------- Add pfs checks to quantum tracking APIs Summary: Turns out that through the following config the creation of PFS thread for `THD` object could be disabled, so `nullptr` would be passed to the APIs. ``` [mysqld.1] loose-performance-schema-max-thread_instances=318 loose-performance-schema-max-thread_classes=12 ``` Differential Revision: D53060806 fbshipit-source-id: a47e8f6
- Loading branch information
1 parent
8b42978
commit b4f911b
Showing
31 changed files
with
612 additions
and
101 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"Checking the data dictionary properties ..." | ||
SUBSTRING_INDEX(SUBSTRING(properties, LOCATE('PS_VERSION', properties), 30), ';', 1) | ||
PS_VERSION=80036024 | ||
PS_VERSION=80036025 | ||
"Checking the performance schema database structure ..." |
Oops, something went wrong.