lp://qastaging/~sergei.glushchenko/percona-server/scalability-metrics
- Get this branch:
- bzr branch lp://qastaging/~sergei.glushchenko/percona-server/scalability-metrics
Branch merges
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_ ctl
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
Time intervals are calculated with mutex held. Pressure on this mutex
however is nearly not as much as pressure on LOCK_plugin used by MySQL.
Timestamps are gathered on Linux by using clock_gettime(CLOCK_MONOTONIC , )
which should use TSC CPU register to receive time and also should be
fully executed in user-space via VDSO. Since OS X lacks clock_gettime,
mach_absolute_time was used on this platform. QueryPerformanceCounter
can be used on Windows, but it is not implemented since author donesn't
have access to Windows machine.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp://qastaging/percona-server/5.6