mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
Write a kind of spec for my performance monitoring work. Peer review is welcome
This commit is contained in:
parent
231c79da40
commit
8303a2d860
51
doc/README.performance_monitoring
Normal file
51
doc/README.performance_monitoring
Normal file
@ -0,0 +1,51 @@
|
||||
Performance analysis with Firebird.
|
||||
Document version 0.1
|
||||
Created by Nickolay Samofatov
|
||||
|
||||
Performance monitoring framework is consisted of 2 parts:
|
||||
- Trace API
|
||||
- Reference implementation of analysis plugin
|
||||
|
||||
|
||||
Trace API.
|
||||
|
||||
Trace API allows to plug a monitoring module into the engine and notify it
|
||||
of processes happening there. List of analysis plugins is specified in
|
||||
firebird.conf parameter TracePlugins. Each trace plugin receives notifications
|
||||
on each database attached as a call of procedure having following signature:
|
||||
|
||||
ISC_STATUS trace_attach(ISC_STATUS* status, TraceDatabase* db);
|
||||
|
||||
Conceptually db is the database trace interface, but it is implemented as a
|
||||
structure of function pointers and void* object pointer.
|
||||
|
||||
Given this interface plugin may install hooks for particular events and receive
|
||||
notifications on them. In fact, set of hooks is also implemented as a structure
|
||||
with function pointers.
|
||||
|
||||
See ntrace.h module for definitions of these structures and events supported.
|
||||
|
||||
|
||||
Default analysis module.
|
||||
|
||||
Reference implementation of analysis plugin is centered around a concept of
|
||||
performance snapshot. Snapshot detail may vary, but in any case it contains
|
||||
information on all activities performed by server during a given period of time,
|
||||
possibly in aggregated form. All snapshots may be compared to allow quanititive
|
||||
measurements of performance improvements due to various optimization activities
|
||||
or changes in user applications and infrastucture.
|
||||
|
||||
Snapshot data is collected by trace module in raw form in a binary log file and
|
||||
then may be loaded into a stats database using ntrace utility.
|
||||
|
||||
Stored snapshots may contain data on usage of indices, statements executed,
|
||||
their plans and performance counters, IO statistics and other performance data.
|
||||
|
||||
Level of detail for information collected is set up in analysis trace module
|
||||
configuration file on per-database basis.
|
||||
|
||||
Default analysis module does not have GUI and only provides a database with
|
||||
data on server activities and some stored procedures to use and maintain it.
|
||||
|
||||
It is expected that third parties develop GUI tools, custom trace modules and
|
||||
statistics tools to statisfy rich client needs.
|
Loading…
Reference in New Issue
Block a user