Metrics for scalability measurement

Registered by Vadim Tkachenko

Based on post http://www.xaprb.com/blog/2011/10/06/fundamental-performance-and-scalability-instrumentation/
We need to measure:

- Time elapsed, in high resolution (preferably microseconds; milliseconds is okay; one-second is mostly useless). When I ask for this counter, it simply tells me either the time of day, or the server’s uptime, or something like that. It can be used to determine the boundaries of an observation interval, defined by two measurements. It needs to be consistent with the other metrics that I’ll explain next.

- The number of queries (statements) that have completed.

- The current number of queries being executed.

- The total execution time of all queries, including the in-progress time of currently executing queries, in high resolution. That is, if two queries executed with 1 second of response time each, the result is 2 seconds, no matter whether the queries executed concurrently or serially. If one query started executing .5 seconds ago and is still executing, it should contribute .5 second to the counter.

- The server’s total busy time, in high resolution. This is different from the previous point in that it only shows the portion of the observation interval during which queries were executing, regardless of whether they were concurrent or not. If two queries with 1-second response time executed serially, the counter is 2. If they executed concurrently, the counter is something less than 2, because the overlapping time isn’t double-counted.

This can be done in 5.5 using audit plugin

Blueprint information

Status:
Complete
Approver:
Vadim Tkachenko
Priority:
High
Drafter:
None
Direction:
Approved
Assignee:
Sergei Glushchenko
Definition:
Approved
Series goal:
Accepted for 5.5
Implementation:
Implemented
Milestone target:
milestone icon 5.5.37-35.0
Started by
Alexey Kopytov
Completed by
Laurynas Biveinis

Whiteboard

This is an audit plugin which provides following status variables
    once loaded and enabled:
    - scalability_metrics_elapsedtime - total time elapsed since starting point
    - scalability_metrics_queries - number of completed queries since starting point
    - scalability_metrics_concurrency - number of queries currently executed
    - scalability_metrics_totaltime - total execution time of all queries
    - scalability_metrics_busytime - server's total busy time
    time is counted in microseconds.
    There is also the global control variable named scalability_metrics_control
    with possible values ON, OFF, RESET.
    Setting the value to ON enables counting of metrics. Setting it to OFF disables
    counting. By setting the value to RESET one can reset counters (status
    variables) while continuing to count metrics.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.