Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-2875

Query Response Time Implementation incomplete in Exporter

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Wait for Subtasks
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: future
    • Component/s: MySQLd_Exporter
    • Labels:

      Description

      Response Time Tables in Percona Server has this structure:

      mysql> select * from QUERY_RESPONSE_TIME;
      +----------------+---------+----------------+
      | TIME | COUNT | TOTAL |
      +----------------+---------+----------------+
      | 0.000001 | 2 | 0.000000 |
      | 0.000010 | 1023 | 0.008039 |
      | 0.000100 | 5263668 | 245.144935 |
      | 0.001000 | 2099816 | 547.299884 |
      | 0.010000 | 12104 | 93.620054 |
      | 0.100000 | 379763 | 5833.105666 |
      | 1.000000 | 1 | 0.108861 |
      | 10.000000 | 0 | 0.000000 |
      | 100.000000 | 0 | 0.000000 |
      | 1000.000000 | 0 | 0.000000 |
      | 10000.000000 | 0 | 0.000000 |
      | 100000.000000 | 0 | 0.000000 |
      | 1000000.000000 | 0 | 0.000000 |
      | TOO LONG | 0 | TOO LONG |
      +----------------+---------+----------------+
      14 rows in set (0.00 sec)

       

      As you can see we  track both number of queries which fall in the given bucket as well as their summary response time. 

      Response time is very helpful as you can see in this case it shows what the highest load comes from the different bucket than the one with largest number of queries

      As we look at Exporter we only have the number of queries reported not their total execution time

      # HELP mysql_info_schema_query_response_time_seconds The number of all queries by duration they took to execute. 
      # TYPE mysql_info_schema_query_response_time_seconds histogram
      mysql_info_schema_query_response_time_seconds_bucket\{le="1e-06"} 3 
      mysql_info_schema_query_response_time_seconds_bucket\{le="1e-05"} 2526 
      mysql_info_schema_query_response_time_seconds_bucket\{le="0.0001"} 1.3815814e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="0.001"} 1.9361879e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="0.01"} 1.9393791e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="0.1"} 2.0391655e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="1"} 2.0391659e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="10"} 2.0391659e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="100"} 2.0391659e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="1000"} 2.0391659e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="10000"} 2.0391659e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="100000"} 2.0391659e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="1e+06"} 2.0391659e+07 
      mysql_info_schema_query_response_time_seconds_bucket\{le="+Inf"} 2.0391659e+07 
      mysql_info_schema_query_response_time_seconds_sum 17795.772022999998 
      mysql_info_schema_query_response_time_seconds_count 2.0391659e+07

      As such we can build histogram by number of queries but  not the more helpful histogram by impact queries cause

      Suggestion: Add another histogram which shows query impact rather than counters 

       

       

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dmitriy.kostiuk Dmitriy Kostiuk
                  Reporter:
                  pz Peter Zaitsev
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 1 hour, 25 minutes
                    1h 25m