ProxySQL stats metrics

142 views
Skip to first unread message

Marcos Morais

unread,
Nov 24, 2017, 11:55:13 AM11/24/17
to proxysql

Hi there,

First of all, I'd like to congratulate and thanks for the ProxySQL. What an awesome job you're doing. And I'm sorry if someone already talked about this, even after spending a couple of hours searching, I didn't find anything about it.

I've some questions about the ProxySQL stats metrics:

1. Is time measuring in microseconds? milliseconds? seconds?
2. What means count_star, sum_time, min_time, max_time?

For example: a query that had  max_time=4606625 ; sum_time=6364472670 ; count_star=1505. What does it mean to me? I mean, how can I parse this values in a human-readable way.

3. The same for the stats_mysql_commands_counters. Using the example below:

MySQL [(none)]> select * from stats_mysql_commands_counters where command like 'select'\G
*************************** 1. row ***************************
      Command: SELECT
Total_Time_us: 6468061236
    Total_cnt: 2813
    cnt_100us: 12
    cnt_500us: 558
      cnt_1ms: 446
      cnt_5ms: 240
     cnt_10ms: 25
     cnt_50ms: 5
    cnt_100ms: 1
    cnt_500ms: 0
       cnt_1s: 0
       cnt_5s: 1525
      cnt_10s: 0
     cnt_INFs: 1
1 row in set (0.00 sec)

I really appreciate some help.

Jonah Benton

unread,
Nov 26, 2017, 10:40:19 PM11/26/17
to Marcos Morais, proxysql
Hi Marcos,

As a recent ProxySql user, here is my understanding of the below-

On Fri, Nov 24, 2017 at 11:55 AM, Marcos Morais <marcos...@gmail.com> wrote:

Hi there,

First of all, I'd like to congratulate and thanks for the ProxySQL. What an awesome job you're doing. And I'm sorry if someone already talked about this, even after spending a couple of hours searching, I didn't find anything about it.

I've some questions about the ProxySQL stats metrics:

1. Is time measuring in microseconds? milliseconds? seconds?

Microseconds
 
2. What means count_star, sum_time, min_time, max_time?


count_star refers to the number of times the query was executed (count_star is meant to evoke SELECT COUNT(*) to count occurrences of some data in a table)
sum_time is the sum total amount of time taken across the count_star executions of the query.
min_time is the smallest amount of time observed to execute the query across the count_star total executions.
 

For example: a query that had  max_time=4606625 ; sum_time=6364472670 ; count_star=1505. What does it mean to me? I mean, how can I parse this values in a human-readable way.

That query was executed 1505 times since ProxySql was started or since stats collection was reset; the maximum time a single execution took in microseconds was 4606625, and the total amount of time all 1505 executions took was 6364472670 microseconds.
 

3. The same for the stats_mysql_commands_counters. Using the example below:

MySQL [(none)]> select * from stats_mysql_commands_counters where command like 'select'\G
*************************** 1. row ***************************
      Command: SELECT
Total_Time_us: 6468061236

The 2813 SELECTs that were executed took a total of 6468061236 microseconds.
 

    Total_cnt: 2813

There have been 2813 completed SELECT commands executed by a backend.
 
    cnt_100us: 12

12 of the 2813 SELECTs completed in fewer than 100 microseconds.
 
    cnt_500us: 558

558 of the 2813 SELECTs completed in between 101 and 500 microseconds (e.g. NOT including the 12 that completed in less than 100 microseconds).
 
      cnt_1ms: 446

447 of the 2813 SELECTs completed between 500 microseconds and 1000 microseconds.
 
      cnt_5ms: 240

240 of the 2813 SELECTs completed between 1000 microseconds (1ms) and 5000 microseconds (5ms).
 
     cnt_10ms: 25

25 of the 2813 SELECTs completed between 5 milliseconds and 10 milliseconds
 
     cnt_50ms: 5

5 of the 2813 SELECTs completed between 10ms and 50ms.
 
    cnt_100ms: 1

1 of the 2813 SELECTs completed between 50ms and 100ms.
 
    cnt_500ms: 0
       cnt_1s: 0
       cnt_5s: 1525

1525 of the 2813 SELECTs took between 1 and 5 seconds to complete.
 
      cnt_10s: 0
     cnt_INFs: 1

1 additional SELECT, not counted in the 2813 above, did not complete before the connection timeout. 

Note 2813 = 12 + 558 + 447 + 240 + 25 + 5 + 1 + 1525. 
 
1 row in set (0.00 sec)

I really appreciate some help.

--
You received this message because you are subscribed to the Google Groups "proxysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marcos Morais

unread,
Nov 27, 2017, 9:53:04 AM11/27/17
to proxysql
Hi Jonah,

Thank you for the attention and clarification.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages