lp:~sergei.glushchenko/percona-server/5.5-ps-blueprint-scalability-metrics
- Get this branch:
- bzr branch lp:~sergei.glushchenko/percona-server/5.5-ps-blueprint-scalability-metrics
Branch merges
- Alexey Kopytov (community): Approve
-
Diff: 688 lines (+639/-0)8 files modifiedmysql-test/include/have_scalability_metrics_plugin.inc (+21/-0)
mysql-test/include/plugin.defs (+1/-0)
mysql-test/r/scalability_metrics.result (+65/-0)
mysql-test/t/scalability_metrics-master.opt (+1/-0)
mysql-test/t/scalability_metrics.test (+81/-0)
plugin/scalability_metrics/CMakeLists.txt (+17/-0)
plugin/scalability_metrics/scalability_metrics.c (+451/-0)
sql/item_func.cc (+2/-0)
Related bugs
Related blueprints
Branch information
- Owner:
- Sergei Glushchenko
- Status:
- Development
Recent revisions
- 461. By Sergei Glushchenko
-
Plugin for scalability metrics.
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.Notes on implementation.
Three types of notifications are used to count these metrics (all three are of
MYSQL_AUDIT_GENERAL_ CLASS class).
MYSQL_AUDIT_GENERAL_ LOG with command 'Query' and 'Execute' is considered a
query start event
MYSQL_AUDIT_GENERAL_ RESULT and MYSQL_AUDIT_ GENERAL_ ERROR are considered a
query end event
Statistics calculated for each THD and stored in data structure
associated with THD. The only synchronization point is the atomic
variable used to track number of currently running queries. It is
used for the purpose of calculating server busy time. Once
variable becomes non-zero we start tracking busy time, once it
becomes zero, we stop doing it.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:percona-server/5.6