From 16f0d5d9ffe026ca92c4040013ad5ba1f8fbf256 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 10 Oct 2016 16:00:15 +0200 Subject: [PATCH] Adding * Event Wait by read bytes * Event Wait by write bytes --- INTERNALS.md | 4 +++- mysqltuner.pl | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/INTERNALS.md b/INTERNALS.md index cc9feb2..ad9b1f3 100644 --- a/INTERNALS.md +++ b/INTERNALS.md @@ -320,4 +320,6 @@ * File by IO written bytes * File per IO total latency * File per IO read latency -* File per IO write latency \ No newline at end of file +* File per IO write latency +* Event Wait by read bytes +* Event Wait by write bytes \ No newline at end of file diff --git a/mysqltuner.pl b/mysqltuner.pl index 3606f8d..5978dd4 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -3594,17 +3594,26 @@ sub mysqsl_pfs { } infoprint "No information found or indicators desactivated." if ($nbL == 1); -################################################################################## -#io_global_by_wait_by_bytes -# Latest file IO by latency - subheaderprint "Performance schema: Latest FILE IO by latency"; + # Event Wait by read bytes + subheaderprint "Performance schema: Event Wait by read bytes"; $nbL=1; - for my $lQuery(select_array ('select thread, file, latency, operation from latest_file_io ORDER BY latency LIMIT 10;')) { + for my $lQuery(select_array ("use sys;(select event_name, total_read from io_global_by_wait_by_bytes where total_read like '%MiB' order by total_read DESC) UNION (select event_name, total_read from io_global_by_wait_by_bytes where total_read like '%KiB' order by total_read DESC LIMIT 15);")) { infoprint " +-- $nbL: $lQuery"; $nbL++; } infoprint "No information found or indicators desactivated." if ($nbL == 1); + # Event Wait by write bytes + subheaderprint "Performance schema: Event Wait written bytes"; + $nbL=1; + for my $lQuery(select_array ("use sys;(select event_name, total_written from io_global_by_wait_by_bytes where total_written like '%MiB' order by total_written DESC) UNION (select event_name, total_written from io_global_by_wait_by_bytes where total_written like '%KiB' order by total_written DESC LIMIT 15);")) { + infoprint " +-- $nbL: $lQuery"; + $nbL++; + } + infoprint "No information found or indicators desactivated." if ($nbL == 1); + +################################################################################## + #io_global_by_wait_by_latency # Latest file IO by latency subheaderprint "Performance schema: Latest FILE IO by latency";