Adding host based summary tables #3

Closed
wants to merge 29 commits into
from

Projects

None yet

2 participants

@aadant
Contributor
aadant commented Mar 18, 2014

Based on existing user tables, adding host based tables.

aadant added some commits Mar 18, 2014
@aadant aadant Create host_summary_by_statement_type.sql
Mapped from user_summary_by_statement_type.sql
8a4c06c
@aadant aadant Create host_summary_by_statement_latency.sql
Mapped from user_summary_by_statement_latency.sql
134734c
@aadant aadant Update host_summary_by_statement_type.sql
Fixed the remaining users.
9a87e3b
@aadant aadant Update host_summary_by_statement_latency.sql
Fixed remaining user
faf0d0e
@aadant aadant Create host_summary_by_stages.sql
From user_summary_by_stages.sql
8b6df23
@aadant aadant Create host_summary_by_file_io_type.sql
inspired from user_summary_by_file_io_type.sql
90619b2
@aadant aadant Create host_summary_by_file_io.sql
based on user_summary_by_file_io.sql
88bf4c0
@aadant aadant Create host_summary_57.sql
First draft : memory_by_host_by_current_bytes must be created as well.
acea58b
@aadant aadant Create memory_by_host.sql 95b021e
@aadant aadant Update host_summary_57.sql
fixed memory views
7901928
@aadant aadant Create host_summary.sql 71decb8
@aadant aadant Update sys_56.sql ca8df39
@aadant aadant Update sys_57.sql f0738c2
@aadant aadant Update host_summary.sql
Fixed an ambiguous column.
1ed453b
@aadant aadant Update host_summary_57.sql b3cc979
@aadant aadant Update README.md d8f08e1
@aadant aadant Update README.md e5f75ce
@aadant aadant Update host_summary_57.sql 882168d
@aadant aadant Update host_summary.sql a39c5ac
@aadant aadant Update host_summary_by_file_io_type.sql ec89642
@aadant aadant Update README.md
updates the manual with host_* tables.
Would be nice to have a TOC (with links).
0ad6dbd
@aadant aadant Update README.md 7240eee
@aadant aadant Create waits_by_host_by_latency.sql b5f81d1
@aadant aadant Update sys_56.sql
adding SOURCE ./views/p_s/waits_by_user_by_latency.sql
1a2832b
@aadant aadant Update sys_57.sql
adding SOURCE ./views/p_s/waits_by_host_by_latency.sql
644f33a
@aadant aadant Update README.md eeec47b
@aadant aadant closed this Mar 19, 2014
@aadant aadant reopened this Mar 19, 2014
@MarkLeith MarkLeith commented on the diff Mar 19, 2014
README.md
@@ -735,41 +753,6 @@ mysql> select * from user_summary;
+------+------------+-------------------+-----------------------+-------------+----------+-----------------+---------------------+-------------------+--------------+
```
-#### user_summary_by_file_io_type / x$user_summary_by_file_io_type
@MarkLeith
MarkLeith Mar 19, 2014 Member

Why was this (and following lines) removed?

@aadant
aadant Mar 19, 2014 Contributor

This item was duplicated, so I removed one.

@MarkLeith MarkLeith commented on an outdated diff Mar 19, 2014
@@ -79,9 +79,18 @@ SOURCE ./views/p_s/user_summary_by_statement_latency.sql
SOURCE ./views/p_s/user_summary_by_stages.sql
SOURCE ./views/p_s/user_summary.sql
+SOURCE ./views/p_s/host_summary_by_file_io_type.sql
+SOURCE ./views/p_s/host_summary_by_file_io.sql
+SOURCE ./views/p_s/host_summary_by_statement_type.sql
+SOURCE ./views/p_s/host_summary_by_statement_latency.sql
+SOURCE ./views/p_s/host_summary_by_stages.sql
+SOURCE ./views/p_s/host_summary.sql
+
+
@MarkLeith
MarkLeith Mar 19, 2014 Member

Remove extra line (petty petty, but whatever). :)

@MarkLeith MarkLeith and 1 other commented on an outdated diff Mar 19, 2014
@@ -263,6 +263,24 @@ mysql> select * from memory_by_user_by_current_bytes WHERE user IS NOT NULL;
+------+--------------------+-------------------+-------------------+-------------------+-----------------+
```
+#### memory_by_host_by_current_bytes / x$memory_by_host_by_current_bytes
+
+##### Description
+
+Summarizes memory use by host using the 5.7 Performance Schema instrumentation.
+
+##### Example
+
+```SQL
+mysql> select from memory_by_host_by_current_bytes WHERE host IS NOT NULL;
@MarkLeith
MarkLeith Mar 19, 2014 Member

This seems wrong, should it not be "select * from ..." in the example?

@aadant
aadant Mar 19, 2014 Contributor

Yes, I cut and pasted, removing all * ... my mistake

@MarkLeith MarkLeith and 1 other commented on an outdated diff Mar 19, 2014
+ mysql> select from host_summary_by_file_io;
+ +------------+-------+------------+
+ | host | ios | io_latency |
+ +------------+-------+------------+
+ | hal1 | 26457 | 21.58 s |
+ | hal2 | 1189 | 394.21 ms |
+ +------------+-------+------------+
+```
+
+#### host_summary_by_file_io_type / x$host_summary_by_file_io_type
+
+##### Description
+
+Summarizes file IO by event type per host.
+
+
@MarkLeith
MarkLeith Mar 19, 2014 Member

Remove extra line

@aadant
aadant Mar 19, 2014 Contributor

ok done

@MarkLeith MarkLeith commented on an outdated diff Mar 19, 2014
+ | hal1 | 26457 | 21.58 s |
+ | hal2 | 1189 | 394.21 ms |
+ +------------+-------+------------+
+```
+
+#### host_summary_by_file_io_type / x$host_summary_by_file_io_type
+
+##### Description
+
+Summarizes file IO by event type per host.
+
+
+##### Example
+
+```SQL
+ mysql> select from host_summary_by_file_io_type;
@MarkLeith
MarkLeith Mar 19, 2014 Member

Same here, no "*"?

@MarkLeith MarkLeith commented on an outdated diff Mar 19, 2014
+ | hal2 | wait/io/file/sql/dbopt | 20 | 1.07 ms | 153.07 us |
+ | hal2 | wait/io/file/sql/misc | 4 | 59.71 us | 33.75 us |
+ | hal2 | wait/io/file/archive/data | 1 | 13.91 us | 13.91 us |
+ +------------+--------------------------------------+-------+-----------+-------------+
+ ```
+
+#### host_summary_by_stages / x$host_summary_by_stages
+
+##### Description
+
+Summarizes stages by host, ordered by host and total latency per stage.
+
+##### Example
+
+```SQL
+ mysql> select from host_summary_by_stages;
@MarkLeith
MarkLeith Mar 19, 2014 Member

And here..

@MarkLeith MarkLeith commented on an outdated diff Mar 19, 2014
+ | hal | stage/sql/Sorting result | 5 | 8.33 us | 1.67 us |
+ | hal | stage/sql/executing | 5 | 5.37 us | 1.07 us |
+ | hal | stage/sql/cleaning up | 5 | 4.60 us | 919.00 ns |
+ +------+--------------------------------+-------+-----------+-----------+
+```
+
+#### host_summary_by_statement_latency / x$host_summary_by_statement_latency
+
+##### Description
+
+Summarizes overall statement statistics by host.
+
+##### Example
+
+```SQL
+mysql> select from host_summary_by_statement_latency;
@MarkLeith
MarkLeith Mar 19, 2014 Member

And here..

@MarkLeith MarkLeith commented on an outdated diff Mar 19, 2014
+ | host | total | total_latency | max_latency | lock_latency | rows_sent | rows_examined | rows_affected | full_scans |
+ +------+-------+---------------+-------------+--------------+-----------+---------------+---------------+------------+
+ | hal | 3381 | 00:02:09.13 | 1.48 s | 1.07 s | 1151 | 93947 | 150 | 91 |
+ +------+-------+---------------+-------------+--------------+-----------+---------------+---------------+------------+
+```
+
+#### host_summary_by_statement_type / x$host_summary_by_statement_type
+
+##### Description
+
+Summarizes the types of statements executed by each host.
+
+##### Example
+
+```SQL
+ mysql> select from host_summary_by_statement_type;
@MarkLeith
MarkLeith Mar 19, 2014 Member

There's a theme here..

@MarkLeith MarkLeith commented on an outdated diff Mar 19, 2014
@@ -991,6 +1117,38 @@ mysql> select * from waits_by_user_by_latency;
+------+-----------------------------------------------------+--------+---------------+-------------+-------------+
```
+#### waits_by_host_by_latency / x$waits_by_host_by_latency
+
+##### Description
+
+Lists the top wait events by their total latency, ignoring idle (this may be very large) per host.
+
+##### Example
+
+```SQL
+ mysql> select from waits_by_host_by_latency;
@MarkLeith MarkLeith and 1 other commented on an outdated diff Mar 19, 2014
+ | hal1 | wait/io/file/myisam/dfile | 26776 | 746.70 ms | 27.89 us | 308.79 ms |
+ | hal1 | wait/io/file/myisam/kfile | 7126 | 462.66 ms | 64.93 us | 88.76 ms |
+ | hal1 | wait/io/file/sql/dbopt | 179 | 137.58 ms | 768.59 us | 15.46 ms |
+ | hal1 | wait/io/file/csv/metadata | 8 | 86.60 ms | 10.82 ms | 50.32 ms |
+ | hal1 | wait/synch/mutex/mysys/IO_CACHE::append_buffer_lock | 798080 | 66.46 ms | 82.94 ns | 161.03 us |
+ | hal1 | wait/io/file/sql/binlog | 19 | 49.11 ms | 2.58 ms | 9.40 ms |
+ | hal1 | wait/io/file/sql/misc | 26 | 22.38 ms | 860.80 us | 15.30 ms |
+ | hal1 | wait/io/file/csv/data | 4 | 297.46 us | 74.37 us | 111.93 us |
+ | hal1 | wait/synch/rwlock/sql/MDL_lock::rwlock | 944 | 287.86 us | 304.62 ns | 874.64 ns |
+ | hal1 | wait/io/file/archive/data | 4 | 82.71 us | 20.68 us | 40.74 us |
+ | hal1 | wait/synch/mutex/myisam/MYISAM_SHARE::intern_lock | 60 | 12.21 us | 203.20 ns | 512.72 ns |
+ | hal1 | wait/synch/mutex/innodb/trx_mutex | 81 | 5.93 us | 73.14 ns | 252.59 ns |
+ +------+-----------------------------------------------------+--------+---------------+-------------+-------------+
+```
+
+
@MarkLeith
MarkLeith Mar 19, 2014 Member

Kill this extra line too

@aadant
aadant Mar 19, 2014 Contributor

ok fixed now

@MarkLeith
Member

This seems to be based off of the master branch, could you re-base this request off the development branch please, with the above problems fixed (all very minor clean up things).

You may need to close this request and open a new one, to base it off the development branch.

aadant added some commits Mar 19, 2014
@aadant aadant Update sys_56.sql
removing the extra carriage return
133661d
@aadant aadant Update README.md
Fixed all select *
b784684
@aadant aadant Update README.md
removing extra lines
7ce9396
@aadant aadant closed this Mar 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment