From 8303a2d860b8e87575dc3b21d3ed0cad6211dadd Mon Sep 17 00:00:00 2001 From: skidder Date: Sat, 3 Apr 2004 03:36:35 +0000 Subject: [PATCH] Write a kind of spec for my performance monitoring work. Peer review is welcome --- doc/README.performance_monitoring | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 doc/README.performance_monitoring diff --git a/doc/README.performance_monitoring b/doc/README.performance_monitoring new file mode 100644 index 0000000000..c1fad2cd6c --- /dev/null +++ b/doc/README.performance_monitoring @@ -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.