Firebird Performance counters in details

Mind The Firebird
Mind The FirebirdLead at charity
Firebird ppeerrffoorrmmaannccee ccoouunntteerrss 
iinn ddeettaaiillss 
Dmitry Yemanov 
mailto:dimitr@firebirdsql.org 
Firebird Project 
http://www.firebirdsql.org/
TThhaannkk yyoouu 
FIREBIRD INTERNATIONAL CONFERENCE '2014 2
AAnnaallyyssiinngg bboottttlleenneecckkss 
Disk 
Database 
Temporary files 
FIREBIRD INTERNATIONAL CONFERENCE '2014 3
AAnnaallyyssiinngg bboottttlleenneecckkss 
Disk 
Database 
Temporary files 
Memory 
Static (cache) 
Dynamic (pools) 
Shared 
FIREBIRD INTERNATIONAL CONFERENCE '2014 4
AAnnaallyyssiinngg bboottttlleenneecckkss 
CPU, waits, etc 
Real execution time 
User/kernel time 
Was time spent for work or waiting? 
What operations were performed? 
FIREBIRD INTERNATIONAL CONFERENCE '2014 5
LLeeggaaccyy ppeerrffoorrmmaannccee ccoouunntteerrss 
Page level 
Fetches, reads, marks, writes 
Shared in SS, per connection in CS 
Available via API 
FIREBIRD INTERNATIONAL CONFERENCE '2014 6
LLeeggaaccyy ppeerrffoorrmmaannccee ccoouunntteerrss 
Page level 
Fetches, reads, marks, writes 
Shared in SS, per connection in CS 
Available via API 
Record level 
Selected (seq/idx), inserted, updated, deleted etc 
Per connection and per table 
Available via API 
FIREBIRD INTERNATIONAL CONFERENCE '2014 7
IImmpprroovveemmeennttss iinn FFiirreebbiirrdd 22..xx 
Multi-level aggregated counters 
Database (SS only) 
Connection 
Transaction 
Statement 
Nested PSQL call (procedure / trigger) 
FIREBIRD INTERNATIONAL CONFERENCE '2014 8
IImmpprroovveemmeennttss iinn FFiirreebbiirrdd 22..xx 
Multi-level aggregated counters 
Database 
Connection 1 Connection 2 
Transaction 1 Transaction 2 
Statement 1 Statement 1 
FIREBIRD INTERNATIONAL CONFERENCE '2014 9
IImmpprroovveemmeennttss iinn FFiirreebbiirrdd 22..xx 
New interfaces 
Monitoring tables 
Trace/audit 
FIREBIRD INTERNATIONAL CONFERENCE '2014 10
PPaaggee lleevveell ccoouunntteerrss 
Page reads 
From disk to the page cache (physical reads) 
Usually means a cache miss 
FIREBIRD INTERNATIONAL CONFERENCE '2014 11
PPaaggee lleevveell ccoouunntteerrss 
Page reads 
From disk to the page cache (physical reads) 
Usually means a cache miss 
Page fetches 
Access page in cache (logical reads) 
Includes both cache hits and cache misses 
Corresponds to a shared page lock / latch 
FIREBIRD INTERNATIONAL CONFERENCE '2014 12
PPaaggee lleevveell ccoouunntteerrss 
Page reads 
From disk to the page cache (physical reads) 
Usually means a cache miss 
Page fetches 
Access page in cache (logical reads) 
Includes both cache hits and cache misses 
Corresponds to a shared page lock / latch 
Cache hit ratio = 1 - reads / fetches ??? 
FIREBIRD INTERNATIONAL CONFERENCE '2014 13
PPaaggee lleevveell ccoouunntteerrss 
Page writes 
From the page cache to disk (physical writes) 
At transaction commit/rollback 
Cache is full of dirty pages 
Asynchronous notification is received (CS/SC) 
Immediately after modification 
FIREBIRD INTERNATIONAL CONFERENCE '2014 14
PPaaggee lleevveell ccoouunntteerrss 
Page writes 
From the page cache to disk (physical writes) 
At transaction commit/rollback 
Cache is full of dirty pages 
Asynchronous notification is received (CS/SC) 
Immediately after modification 
Page marks 
Access page in cache (logical writes) 
Corresponds to an exclusive page lock / latch 
FIREBIRD INTERNATIONAL CONFERENCE '2014 15
RReeccoorrdd lleevveell ccoouunntteerrss 
Sequential record reads 
Records retrieved through a full table scan 
Includes sweep 
Indexed record reads 
Records retrieved positionally 
Includes bitmap index scans, index navigational 
walks, DBKEY based retrievals 
FIREBIRD INTERNATIONAL CONFERENCE '2014 16
RReeccoorrdd lleevveell ccoouunntteerrss 
Record inserts, updates, deletes 
Pretty obvious, huh? 
FIREBIRD INTERNATIONAL CONFERENCE '2014 17
RReeccoorrdd lleevveell ccoouunntteerrss 
Record inserts, updates, deletes 
Pretty obvious, huh? 
Record backouts 
Latest (uncommitted) version removed 
Happens after savepoint rollback, explicit or implicit 
May happen after transaction rollback 
FIREBIRD INTERNATIONAL CONFERENCE '2014 18
RReeccoorrdd lleevveell ccoouunntteerrss 
Record purges 
Old versions removed while keeping the primary 
version in place 
Outdated versions found while chasing 
FIREBIRD INTERNATIONAL CONFERENCE '2014 19
RReeccoorrdd lleevveell ccoouunntteerrss 
Record purges 
Old versions removed while keeping the primary 
version in place 
Outdated versions found while chasing 
Record expunges 
Whole version chains removed, along with the 
primary version 
Record is deleted and nobody is interested 
FIREBIRD INTERNATIONAL CONFERENCE '2014 20
NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx 
Record repeated reads 
Record is retrieved multiple times 
BEFORE triggers 
Sort-based updates/deletes 
FIREBIRD INTERNATIONAL CONFERENCE '2014 21
NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx 
Record repeated reads 
Record is retrieved multiple times 
BEFORE triggers 
Sort-based updates/deletes 
Record locks 
Record is selected usng WITH LOCK clause 
FIREBIRD INTERNATIONAL CONFERENCE '2014 22
NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx 
Record waits 
Attempts to update/delete/lock record 
owned by a concurrent active transaction 
Transaction is in the WAIT mode 
FIREBIRD INTERNATIONAL CONFERENCE '2014 23
NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx 
Record waits 
Attempts to update/delete/lock record 
owned by a concurrent active transaction 
Transaction is in the WAIT mode 
Record conflicts 
Unsuccessful attempts to update/delete/lock record 
owned by a concurrent active transaction 
UPDATE CONFLICT is reported 
FIREBIRD INTERNATIONAL CONFERENCE '2014 24
NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx 
Backversion reads 
Versions chased while finding a visible one 
Means old snapshots 
FIREBIRD INTERNATIONAL CONFERENCE '2014 25
NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx 
Backversion reads 
Versions chased while finding a visible one 
Means old snapshots 
Fragment reads 
Fragmented records 
Means extra page fetches/reads 
FIREBIRD INTERNATIONAL CONFERENCE '2014 26
NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx 
MON$TABLE_STATS MON$RECORD_STATS 
MON$STATS_ID 
MON$STATS_GROUP 
MON$TABLE_NAME 
MON$RECORD_STATS_ID 
MON$STATS_ID 
MON$STATS_GROUP 
MON$RECORD_SEQ_READS 
MON$RECORD_IDX_READS 
etc 
FIREBIRD INTERNATIONAL CONFERENCE '2014 27
TTOODDOO:: ppaaggee lleevveell ccoouunntteerrss 
Page writes (expanded) 
Regular writes (immediate / commit / rollback) 
Overflow writes 
Asynchronous writes 
FIREBIRD INTERNATIONAL CONFERENCE '2014 28
TTOODDOO:: ppaaggee lleevveell ccoouunntteerrss 
Page writes (expanded) 
Regular writes (immediate / commit / rollback) 
Overflow writes 
Asynchronous writes 
Page waits 
How many times page requests waited 
Shows contention inside the page cache 
FIREBIRD INTERNATIONAL CONFERENCE '2014 29
TTOODDOO:: iinnddeexx ccoouunntteerrss 
Possible metrics 
Index scans 
Node inserts / deletes 
Bucket splits / merges 
Keys scanned / compared while searching 
Reported per index 
MON$INDEX_STATS 
FIREBIRD INTERNATIONAL CONFERENCE '2014 30
TTOODDOO:: tteemmppoorraarryy ssppaaccee ccoouunntteerrss 
Operation metrics 
Reads / writes resolved through the cache 
Reads / writes redirected to temp files 
I/O amount metrics 
Bytes read / written through the cache 
Bytes read / written from/to temp files 
FIREBIRD INTERNATIONAL CONFERENCE '2014 31
TTOODDOO:: ttiimmee ssttaattiissttiiccss 
Elapsed time 
Total inside the engine 
Spent in the user space 
Spent in the system / kernel space 
FIREBIRD INTERNATIONAL CONFERENCE '2014 32
TTOODDOO:: ttiimmee ssttaattiissttiiccss 
Elapsed time 
Total inside the engine 
Spent in the user space 
Spent in the system / kernel space 
Wait time 
Database (and maybe temp files) I/O 
Page cache waits 
Transaction waits 
FIREBIRD INTERNATIONAL CONFERENCE '2014 33
TTOODDOO:: iinntteeggrraattiioonn 
Collecting the statistics 
StatsD, CollectD 
Reporting / analyzing 
Graphite / Graphene 
Other tools 
Nagios, Cacti, Zabbix 
FIREBIRD INTERNATIONAL CONFERENCE '2014 34
QQuueessttiioonnss?? 
mailto:dimitr@firebirdsql.org 
FIREBIRD INTERNATIONAL CONFERENCE '2014 35
1 of 35

Recommended

SuperServer in Firebird 3 by
SuperServer in Firebird 3SuperServer in Firebird 3
SuperServer in Firebird 3Mind The Firebird
6.7K views27 slides
Perforce BTrees: The Arcane and the Profane by
Perforce BTrees: The Arcane and the ProfanePerforce BTrees: The Arcane and the Profane
Perforce BTrees: The Arcane and the ProfanePerforce
795 views17 slides
Docker.io by
Docker.ioDocker.io
Docker.ioLadislav Prskavec
18.3K views55 slides
Stateful Containers: Flocker on CoreOS by
Stateful Containers: Flocker on CoreOSStateful Containers: Flocker on CoreOS
Stateful Containers: Flocker on CoreOSStephen Nguyen
280 views43 slides
Building reliable systems with Apache BookKeeper by
Building reliable systems with Apache BookKeeperBuilding reliable systems with Apache BookKeeper
Building reliable systems with Apache BookKeeperMatthieu Morel
6.9K views58 slides
Fluentd and WebHDFS by
Fluentd and WebHDFSFluentd and WebHDFS
Fluentd and WebHDFSSATOSHI TAGOMORI
15.9K views20 slides

More Related Content

What's hot

OpenZFS data-driven performance by
OpenZFS data-driven performanceOpenZFS data-driven performance
OpenZFS data-driven performanceahl0003
3.4K views43 slides
Putting Wings on the Elephant by
Putting Wings on the ElephantPutting Wings on the Elephant
Putting Wings on the ElephantDataWorks Summit
1.8K views42 slides
Filesystem Showdown: What a Difference a Decade Makes by
Filesystem Showdown: What a Difference a Decade MakesFilesystem Showdown: What a Difference a Decade Makes
Filesystem Showdown: What a Difference a Decade MakesPerforce
1.1K views21 slides
Lisa 2015-gluster fs-hands-on by
Lisa 2015-gluster fs-hands-onLisa 2015-gluster fs-hands-on
Lisa 2015-gluster fs-hands-onGluster.org
2.2K views49 slides
Backups by
BackupsBackups
BackupsPayal Singh
480 views48 slides
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going by
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s goingKernel Recipes 2016 - Kernel documentation: what we have and where it’s going
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s goingAnne Nicolas
738 views169 slides

What's hot(20)

OpenZFS data-driven performance by ahl0003
OpenZFS data-driven performanceOpenZFS data-driven performance
OpenZFS data-driven performance
ahl00033.4K views
Filesystem Showdown: What a Difference a Decade Makes by Perforce
Filesystem Showdown: What a Difference a Decade MakesFilesystem Showdown: What a Difference a Decade Makes
Filesystem Showdown: What a Difference a Decade Makes
Perforce1.1K views
Lisa 2015-gluster fs-hands-on by Gluster.org
Lisa 2015-gluster fs-hands-onLisa 2015-gluster fs-hands-on
Lisa 2015-gluster fs-hands-on
Gluster.org2.2K views
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going by Anne Nicolas
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s goingKernel Recipes 2016 - Kernel documentation: what we have and where it’s going
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going
Anne Nicolas738 views
Securing Apache Web Servers by webhostingguy
Securing Apache Web ServersSecuring Apache Web Servers
Securing Apache Web Servers
webhostingguy1.5K views
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud by Patrick McGarry
Journey to Stability: Petabyte Ceph Cluster in OpenStack CloudJourney to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Patrick McGarry2.5K views
EVCache: Lowering Costs for a Low Latency Cache with RocksDB by Scott Mansfield
EVCache: Lowering Costs for a Low Latency Cache with RocksDBEVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
Scott Mansfield651 views
Branch Management in Git Fusion by Perforce
Branch Management in Git FusionBranch Management in Git Fusion
Branch Management in Git Fusion
Perforce790 views
My Sql Performance In A Cloud by Sky Jian
My Sql Performance In A CloudMy Sql Performance In A Cloud
My Sql Performance In A Cloud
Sky Jian764 views
Windows Server 2016 Webinar by Men and Mice
Windows Server 2016 WebinarWindows Server 2016 Webinar
Windows Server 2016 Webinar
Men and Mice3.4K views
Redis overview for Software Architecture Forum by Christopher Spring
Redis overview for Software Architecture ForumRedis overview for Software Architecture Forum
Redis overview for Software Architecture Forum
Christopher Spring5.1K views
Kernel Recipes 2016 - Would an ABI changes visualization tool be useful to Li... by Anne Nicolas
Kernel Recipes 2016 - Would an ABI changes visualization tool be useful to Li...Kernel Recipes 2016 - Would an ABI changes visualization tool be useful to Li...
Kernel Recipes 2016 - Would an ABI changes visualization tool be useful to Li...
Anne Nicolas922 views
Optimizing MongoDB: Lessons Learned at Localytics by andrew311
Optimizing MongoDB: Lessons Learned at LocalyticsOptimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at Localytics
andrew31153.2K views
Distributed Stream Processing on Fluentd / #fluentd by SATOSHI TAGOMORI
Distributed Stream Processing on Fluentd / #fluentdDistributed Stream Processing on Fluentd / #fluentd
Distributed Stream Processing on Fluentd / #fluentd
SATOSHI TAGOMORI6.3K views

Viewers also liked

Coalition Letter to House of Representatives on Failure to Advance S. 1140, t... by
Coalition Letter to House of Representatives on Failure to Advance S. 1140, t...Coalition Letter to House of Representatives on Failure to Advance S. 1140, t...
Coalition Letter to House of Representatives on Failure to Advance S. 1140, t...artba
792 views3 slides
Measuring Firebird Disk I/O by
Measuring Firebird Disk I/OMeasuring Firebird Disk I/O
Measuring Firebird Disk I/OMind The Firebird
2.2K views26 slides
Resolving Firebird performance problems by
Resolving Firebird performance problemsResolving Firebird performance problems
Resolving Firebird performance problemsAlexey Kovyazin
67.4K views48 slides
Orphans, Corruption, Careful Write, and Logging by
Orphans, Corruption, Careful Write, and LoggingOrphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and LoggingMind The Firebird
1.5K views29 slides
09/25/13: Senate EPW Highway Trust Fund Hearing by
09/25/13: Senate EPW Highway Trust Fund Hearing09/25/13: Senate EPW Highway Trust Fund Hearing
09/25/13: Senate EPW Highway Trust Fund Hearingartba
937 views17 slides
Coalition Letter to House Energy and Commerce Committee Leaders on Chemical S... by
Coalition Letter to House Energy and Commerce Committee Leaders on Chemical S...Coalition Letter to House Energy and Commerce Committee Leaders on Chemical S...
Coalition Letter to House Energy and Commerce Committee Leaders on Chemical S...artba
924 views5 slides

Viewers also liked(20)

Coalition Letter to House of Representatives on Failure to Advance S. 1140, t... by artba
Coalition Letter to House of Representatives on Failure to Advance S. 1140, t...Coalition Letter to House of Representatives on Failure to Advance S. 1140, t...
Coalition Letter to House of Representatives on Failure to Advance S. 1140, t...
artba792 views
Resolving Firebird performance problems by Alexey Kovyazin
Resolving Firebird performance problemsResolving Firebird performance problems
Resolving Firebird performance problems
Alexey Kovyazin67.4K views
Orphans, Corruption, Careful Write, and Logging by Mind The Firebird
Orphans, Corruption, Careful Write, and LoggingOrphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and Logging
Mind The Firebird1.5K views
09/25/13: Senate EPW Highway Trust Fund Hearing by artba
09/25/13: Senate EPW Highway Trust Fund Hearing09/25/13: Senate EPW Highway Trust Fund Hearing
09/25/13: Senate EPW Highway Trust Fund Hearing
artba937 views
Coalition Letter to House Energy and Commerce Committee Leaders on Chemical S... by artba
Coalition Letter to House Energy and Commerce Committee Leaders on Chemical S...Coalition Letter to House Energy and Commerce Committee Leaders on Chemical S...
Coalition Letter to House Energy and Commerce Committee Leaders on Chemical S...
artba924 views
Comments Objecting to ESA protections for the Long-Eared Bat by artba
Comments Objecting to ESA protections for the Long-Eared BatComments Objecting to ESA protections for the Long-Eared Bat
Comments Objecting to ESA protections for the Long-Eared Bat
artba804 views
Keeping Denial of Service and Financial Fraud out of Your Contact Center by Case IQ
Keeping Denial of Service and Financial Fraud out of Your Contact CenterKeeping Denial of Service and Financial Fraud out of Your Contact Center
Keeping Denial of Service and Financial Fraud out of Your Contact Center
Case IQ2K views
02/12/14: Testimony to Senate Environment & Public Works Committee by artba
02/12/14: Testimony to Senate Environment & Public Works Committee02/12/14: Testimony to Senate Environment & Public Works Committee
02/12/14: Testimony to Senate Environment & Public Works Committee
artba893 views
Coalition Comments on OSHA Clarification to Workplace Injury and Illness Regu... by artba
Coalition Comments on OSHA Clarification to Workplace Injury and Illness Regu...Coalition Comments on OSHA Clarification to Workplace Injury and Illness Regu...
Coalition Comments on OSHA Clarification to Workplace Injury and Illness Regu...
artba734 views
Coalition Letter to Senate Majority Leader McConnell (R-Ky) on Chemical Safet... by artba
Coalition Letter to Senate Majority Leader McConnell (R-Ky) on Chemical Safet...Coalition Letter to Senate Majority Leader McConnell (R-Ky) on Chemical Safet...
Coalition Letter to Senate Majority Leader McConnell (R-Ky) on Chemical Safet...
artba953 views
The Experience Comes First (STC New England - InterChange2016) by Deborah Sauer
The Experience Comes First (STC New England - InterChange2016)The Experience Comes First (STC New England - InterChange2016)
The Experience Comes First (STC New England - InterChange2016)
Deborah Sauer262 views
04/24/13: State of the Highway Trust Fund: Long-Term Solutions for Solvency by artba
04/24/13: State of the Highway Trust Fund: Long-Term Solutions for Solvency04/24/13: State of the Highway Trust Fund: Long-Term Solutions for Solvency
04/24/13: State of the Highway Trust Fund: Long-Term Solutions for Solvency
artba978 views
Artba Senate Finance Committee May by artba
Artba Senate Finance Committee MayArtba Senate Finance Committee May
Artba Senate Finance Committee May
artba1K views
FHWA MOU with the State of Alaska Regarding Delegation of CEs. by artba
FHWA MOU with the State of Alaska Regarding Delegation of CEs.FHWA MOU with the State of Alaska Regarding Delegation of CEs.
FHWA MOU with the State of Alaska Regarding Delegation of CEs.
artba684 views

Similar to Firebird Performance counters in details

Rendering Large Models in the Browser in Real-Time by
Rendering Large Models in the Browser in Real-TimeRendering Large Models in the Browser in Real-Time
Rendering Large Models in the Browser in Real-TimeC4Media
228 views103 slides
Experiences building a distributed shared log on RADOS - Noah Watkins by
Experiences building a distributed shared log on RADOS - Noah WatkinsExperiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah WatkinsCeph Community
98 views80 slides
QEMU Disk IO Which performs Better: Native or threads? by
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?Pradeep Kumar
34.2K views66 slides
Linaro Connect 2017 - Presentation - Kynetics by
Linaro Connect 2017 - Presentation - KyneticsLinaro Connect 2017 - Presentation - Kynetics
Linaro Connect 2017 - Presentation - KyneticsKynetics
1K views43 slides
FreeBSD Document Project by
FreeBSD Document ProjectFreeBSD Document Project
FreeBSD Document ProjectChinsan Huang
897 views82 slides
Don't screw it up! How to build durable API by
Don't screw it up! How to build durable API Don't screw it up! How to build durable API
Don't screw it up! How to build durable API Alessandro Cinelli (cirpo)
2.6K views169 slides

Similar to Firebird Performance counters in details(20)

Rendering Large Models in the Browser in Real-Time by C4Media
Rendering Large Models in the Browser in Real-TimeRendering Large Models in the Browser in Real-Time
Rendering Large Models in the Browser in Real-Time
C4Media228 views
Experiences building a distributed shared log on RADOS - Noah Watkins by Ceph Community
Experiences building a distributed shared log on RADOS - Noah WatkinsExperiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah Watkins
Ceph Community 98 views
QEMU Disk IO Which performs Better: Native or threads? by Pradeep Kumar
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?
Pradeep Kumar34.2K views
Linaro Connect 2017 - Presentation - Kynetics by Kynetics
Linaro Connect 2017 - Presentation - KyneticsLinaro Connect 2017 - Presentation - Kynetics
Linaro Connect 2017 - Presentation - Kynetics
Kynetics1K views
FreeBSD Document Project by Chinsan Huang
FreeBSD Document ProjectFreeBSD Document Project
FreeBSD Document Project
Chinsan Huang897 views
Modern Release Engineering in a Nutshell - Why Researchers should Care! by Bram Adams
Modern Release Engineering in a Nutshell - Why Researchers should Care!Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Bram Adams751 views
Online MySQL Backups with Percona XtraBackup by Kenny Gryp
Online MySQL Backups with Percona XtraBackupOnline MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackup
Kenny Gryp1.2K views
Building collaborative workflows for scientific data by Bruno Vieira
Building collaborative workflows for scientific dataBuilding collaborative workflows for scientific data
Building collaborative workflows for scientific data
Bruno Vieira637 views
Don't screw it up: how to build durable web apis @ PHPDay 2014 in Verona (ITA) by Alessandro Nadalin
Don't screw it up: how to build durable web apis @ PHPDay 2014 in Verona (ITA)Don't screw it up: how to build durable web apis @ PHPDay 2014 in Verona (ITA)
Don't screw it up: how to build durable web apis @ PHPDay 2014 in Verona (ITA)
Alessandro Nadalin4.2K views
Loophole: Timing Attacks on Shared Event Loops in Chrome by cgvwzq
Loophole: Timing Attacks on Shared Event Loops in ChromeLoophole: Timing Attacks on Shared Event Loops in Chrome
Loophole: Timing Attacks on Shared Event Loops in Chrome
cgvwzq565 views
Greyhound - Powerful Functional Kafka Library - Devtalks reimagined by Natan Silnitsky
Greyhound - Powerful Functional Kafka Library - Devtalks reimaginedGreyhound - Powerful Functional Kafka Library - Devtalks reimagined
Greyhound - Powerful Functional Kafka Library - Devtalks reimagined
Natan Silnitsky198 views
It's Time to Debloat the Cloud with Unikraft by ScyllaDB
It's Time to Debloat the Cloud with UnikraftIt's Time to Debloat the Cloud with Unikraft
It's Time to Debloat the Cloud with Unikraft
ScyllaDB156 views
Juggling Chainsaws: Perl and MongoDB by David Golden
Juggling Chainsaws: Perl and MongoDBJuggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDB
David Golden1.4K views
Caching with Varnish by schoefmax
Caching with VarnishCaching with Varnish
Caching with Varnish
schoefmax14K views
The Unofficial VCAP / VCP VMware Study Guide by Veeam Software
The Unofficial VCAP / VCP VMware Study GuideThe Unofficial VCAP / VCP VMware Study Guide
The Unofficial VCAP / VCP VMware Study Guide
Veeam Software5.6K views
PHP on Heroku: Deploying and Scaling Apps in the Cloud by Salesforce Developers
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
Java File I/O Performance Analysis - Part I - JCConf 2018 by Michael Fong
Java File I/O Performance Analysis - Part I - JCConf 2018Java File I/O Performance Analysis - Part I - JCConf 2018
Java File I/O Performance Analysis - Part I - JCConf 2018
Michael Fong1.3K views

More from Mind The Firebird

Tips for using Firebird system tables by
Tips for using Firebird system tablesTips for using Firebird system tables
Tips for using Firebird system tablesMind The Firebird
6K views38 slides
Using Azure cloud and Firebird to develop applications easily by
Using Azure cloud and Firebird to develop applications easilyUsing Azure cloud and Firebird to develop applications easily
Using Azure cloud and Firebird to develop applications easilyMind The Firebird
2.2K views9 slides
A year in the life of Firebird .Net provider by
A year in the life of Firebird .Net providerA year in the life of Firebird .Net provider
A year in the life of Firebird .Net providerMind The Firebird
1.2K views16 slides
How Firebird transactions work by
How Firebird transactions workHow Firebird transactions work
How Firebird transactions workMind The Firebird
2.9K views72 slides
Copycat presentation by
Copycat presentationCopycat presentation
Copycat presentationMind The Firebird
1.9K views17 slides
Using ТРСС to study Firebird performance by
Using ТРСС to study Firebird performanceUsing ТРСС to study Firebird performance
Using ТРСС to study Firebird performanceMind The Firebird
1.9K views56 slides

More from Mind The Firebird(20)

Using Azure cloud and Firebird to develop applications easily by Mind The Firebird
Using Azure cloud and Firebird to develop applications easilyUsing Azure cloud and Firebird to develop applications easily
Using Azure cloud and Firebird to develop applications easily
Mind The Firebird2.2K views
A year in the life of Firebird .Net provider by Mind The Firebird
A year in the life of Firebird .Net providerA year in the life of Firebird .Net provider
A year in the life of Firebird .Net provider
Mind The Firebird1.2K views
Using ТРСС to study Firebird performance by Mind The Firebird
Using ТРСС to study Firebird performanceUsing ТРСС to study Firebird performance
Using ТРСС to study Firebird performance
Mind The Firebird1.9K views
Creating logs for data auditing in FirebirdSQL by Mind The Firebird
Creating logs for data auditing in FirebirdSQLCreating logs for data auditing in FirebirdSQL
Creating logs for data auditing in FirebirdSQL
Mind The Firebird2.8K views
Understanding Numbers in Firebird SQL by Mind The Firebird
Understanding Numbers in Firebird SQLUnderstanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQL
Mind The Firebird6.5K views
Threading through InterBase, Firebird, and beyond by Mind The Firebird
Threading through InterBase, Firebird, and beyondThreading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyond
Mind The Firebird1.8K views
New SQL Features in Firebird 3, by Vlad Khorsun by Mind The Firebird
New SQL Features in Firebird 3, by Vlad KhorsunNew SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad Khorsun
Mind The Firebird52.2K views
Firebird release strategy and roadmap for 2015/2016 by Mind The Firebird
Firebird release strategy and roadmap for 2015/2016Firebird release strategy and roadmap for 2015/2016
Firebird release strategy and roadmap for 2015/2016
Mind The Firebird3.5K views
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk... by Mind The Firebird
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
Mind The Firebird1.1K views
Working with Large Firebird databases by Mind The Firebird
Working with Large Firebird databasesWorking with Large Firebird databases
Working with Large Firebird databases
Mind The Firebird1.7K views
Superchaging big production systems on Firebird: transactions, garbage, maint... by Mind The Firebird
Superchaging big production systems on Firebird: transactions, garbage, maint...Superchaging big production systems on Firebird: transactions, garbage, maint...
Superchaging big production systems on Firebird: transactions, garbage, maint...
Mind The Firebird1.5K views
Continuous Database Monitoring with the Trace API by Mind The Firebird
Continuous Database Monitoring with the Trace APIContinuous Database Monitoring with the Trace API
Continuous Database Monitoring with the Trace API
Mind The Firebird2.7K views

Recently uploaded

DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h... by
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...Deltares
5 views31 slides
SAP FOR TYRE INDUSTRY.pdf by
SAP FOR TYRE INDUSTRY.pdfSAP FOR TYRE INDUSTRY.pdf
SAP FOR TYRE INDUSTRY.pdfVirendra Rai, PMP
24 views3 slides
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...Marc Müller
38 views62 slides
Software evolution understanding: Automatic extraction of software identifier... by
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...Ra'Fat Al-Msie'deen
7 views33 slides
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... by
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...Deltares
17 views12 slides
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDeltares
7 views23 slides

Recently uploaded(20)

DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h... by Deltares
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
Deltares5 views
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller38 views
Software evolution understanding: Automatic extraction of software identifier... by Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
Deltares17 views
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by Deltares
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
Deltares7 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares10 views
AI and Ml presentation .pptx by FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8711 views
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... by sparkfabrik
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
sparkfabrik5 views
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok5 views
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... by Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke28 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares14 views
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t... by Deltares
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
Deltares9 views
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... by Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri795 views
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme... by Deltares
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
Deltares5 views
MariaDB stored procedures and why they should be improved by Federico Razzoli
MariaDB stored procedures and why they should be improvedMariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improved
A first look at MariaDB 11.x features and ideas on how to use them by Federico Razzoli
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
Federico Razzoli45 views
DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs by Deltares
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
Deltares8 views

Firebird Performance counters in details

  • 1. Firebird ppeerrffoorrmmaannccee ccoouunntteerrss iinn ddeettaaiillss Dmitry Yemanov mailto:dimitr@firebirdsql.org Firebird Project http://www.firebirdsql.org/
  • 2. TThhaannkk yyoouu FIREBIRD INTERNATIONAL CONFERENCE '2014 2
  • 3. AAnnaallyyssiinngg bboottttlleenneecckkss Disk Database Temporary files FIREBIRD INTERNATIONAL CONFERENCE '2014 3
  • 4. AAnnaallyyssiinngg bboottttlleenneecckkss Disk Database Temporary files Memory Static (cache) Dynamic (pools) Shared FIREBIRD INTERNATIONAL CONFERENCE '2014 4
  • 5. AAnnaallyyssiinngg bboottttlleenneecckkss CPU, waits, etc Real execution time User/kernel time Was time spent for work or waiting? What operations were performed? FIREBIRD INTERNATIONAL CONFERENCE '2014 5
  • 6. LLeeggaaccyy ppeerrffoorrmmaannccee ccoouunntteerrss Page level Fetches, reads, marks, writes Shared in SS, per connection in CS Available via API FIREBIRD INTERNATIONAL CONFERENCE '2014 6
  • 7. LLeeggaaccyy ppeerrffoorrmmaannccee ccoouunntteerrss Page level Fetches, reads, marks, writes Shared in SS, per connection in CS Available via API Record level Selected (seq/idx), inserted, updated, deleted etc Per connection and per table Available via API FIREBIRD INTERNATIONAL CONFERENCE '2014 7
  • 8. IImmpprroovveemmeennttss iinn FFiirreebbiirrdd 22..xx Multi-level aggregated counters Database (SS only) Connection Transaction Statement Nested PSQL call (procedure / trigger) FIREBIRD INTERNATIONAL CONFERENCE '2014 8
  • 9. IImmpprroovveemmeennttss iinn FFiirreebbiirrdd 22..xx Multi-level aggregated counters Database Connection 1 Connection 2 Transaction 1 Transaction 2 Statement 1 Statement 1 FIREBIRD INTERNATIONAL CONFERENCE '2014 9
  • 10. IImmpprroovveemmeennttss iinn FFiirreebbiirrdd 22..xx New interfaces Monitoring tables Trace/audit FIREBIRD INTERNATIONAL CONFERENCE '2014 10
  • 11. PPaaggee lleevveell ccoouunntteerrss Page reads From disk to the page cache (physical reads) Usually means a cache miss FIREBIRD INTERNATIONAL CONFERENCE '2014 11
  • 12. PPaaggee lleevveell ccoouunntteerrss Page reads From disk to the page cache (physical reads) Usually means a cache miss Page fetches Access page in cache (logical reads) Includes both cache hits and cache misses Corresponds to a shared page lock / latch FIREBIRD INTERNATIONAL CONFERENCE '2014 12
  • 13. PPaaggee lleevveell ccoouunntteerrss Page reads From disk to the page cache (physical reads) Usually means a cache miss Page fetches Access page in cache (logical reads) Includes both cache hits and cache misses Corresponds to a shared page lock / latch Cache hit ratio = 1 - reads / fetches ??? FIREBIRD INTERNATIONAL CONFERENCE '2014 13
  • 14. PPaaggee lleevveell ccoouunntteerrss Page writes From the page cache to disk (physical writes) At transaction commit/rollback Cache is full of dirty pages Asynchronous notification is received (CS/SC) Immediately after modification FIREBIRD INTERNATIONAL CONFERENCE '2014 14
  • 15. PPaaggee lleevveell ccoouunntteerrss Page writes From the page cache to disk (physical writes) At transaction commit/rollback Cache is full of dirty pages Asynchronous notification is received (CS/SC) Immediately after modification Page marks Access page in cache (logical writes) Corresponds to an exclusive page lock / latch FIREBIRD INTERNATIONAL CONFERENCE '2014 15
  • 16. RReeccoorrdd lleevveell ccoouunntteerrss Sequential record reads Records retrieved through a full table scan Includes sweep Indexed record reads Records retrieved positionally Includes bitmap index scans, index navigational walks, DBKEY based retrievals FIREBIRD INTERNATIONAL CONFERENCE '2014 16
  • 17. RReeccoorrdd lleevveell ccoouunntteerrss Record inserts, updates, deletes Pretty obvious, huh? FIREBIRD INTERNATIONAL CONFERENCE '2014 17
  • 18. RReeccoorrdd lleevveell ccoouunntteerrss Record inserts, updates, deletes Pretty obvious, huh? Record backouts Latest (uncommitted) version removed Happens after savepoint rollback, explicit or implicit May happen after transaction rollback FIREBIRD INTERNATIONAL CONFERENCE '2014 18
  • 19. RReeccoorrdd lleevveell ccoouunntteerrss Record purges Old versions removed while keeping the primary version in place Outdated versions found while chasing FIREBIRD INTERNATIONAL CONFERENCE '2014 19
  • 20. RReeccoorrdd lleevveell ccoouunntteerrss Record purges Old versions removed while keeping the primary version in place Outdated versions found while chasing Record expunges Whole version chains removed, along with the primary version Record is deleted and nobody is interested FIREBIRD INTERNATIONAL CONFERENCE '2014 20
  • 21. NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx Record repeated reads Record is retrieved multiple times BEFORE triggers Sort-based updates/deletes FIREBIRD INTERNATIONAL CONFERENCE '2014 21
  • 22. NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx Record repeated reads Record is retrieved multiple times BEFORE triggers Sort-based updates/deletes Record locks Record is selected usng WITH LOCK clause FIREBIRD INTERNATIONAL CONFERENCE '2014 22
  • 23. NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx Record waits Attempts to update/delete/lock record owned by a concurrent active transaction Transaction is in the WAIT mode FIREBIRD INTERNATIONAL CONFERENCE '2014 23
  • 24. NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx Record waits Attempts to update/delete/lock record owned by a concurrent active transaction Transaction is in the WAIT mode Record conflicts Unsuccessful attempts to update/delete/lock record owned by a concurrent active transaction UPDATE CONFLICT is reported FIREBIRD INTERNATIONAL CONFERENCE '2014 24
  • 25. NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx Backversion reads Versions chased while finding a visible one Means old snapshots FIREBIRD INTERNATIONAL CONFERENCE '2014 25
  • 26. NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx Backversion reads Versions chased while finding a visible one Means old snapshots Fragment reads Fragmented records Means extra page fetches/reads FIREBIRD INTERNATIONAL CONFERENCE '2014 26
  • 27. NNeeww rreeccoorrdd lleevveell ccoouunntteerrss iinn vv33..xx MON$TABLE_STATS MON$RECORD_STATS MON$STATS_ID MON$STATS_GROUP MON$TABLE_NAME MON$RECORD_STATS_ID MON$STATS_ID MON$STATS_GROUP MON$RECORD_SEQ_READS MON$RECORD_IDX_READS etc FIREBIRD INTERNATIONAL CONFERENCE '2014 27
  • 28. TTOODDOO:: ppaaggee lleevveell ccoouunntteerrss Page writes (expanded) Regular writes (immediate / commit / rollback) Overflow writes Asynchronous writes FIREBIRD INTERNATIONAL CONFERENCE '2014 28
  • 29. TTOODDOO:: ppaaggee lleevveell ccoouunntteerrss Page writes (expanded) Regular writes (immediate / commit / rollback) Overflow writes Asynchronous writes Page waits How many times page requests waited Shows contention inside the page cache FIREBIRD INTERNATIONAL CONFERENCE '2014 29
  • 30. TTOODDOO:: iinnddeexx ccoouunntteerrss Possible metrics Index scans Node inserts / deletes Bucket splits / merges Keys scanned / compared while searching Reported per index MON$INDEX_STATS FIREBIRD INTERNATIONAL CONFERENCE '2014 30
  • 31. TTOODDOO:: tteemmppoorraarryy ssppaaccee ccoouunntteerrss Operation metrics Reads / writes resolved through the cache Reads / writes redirected to temp files I/O amount metrics Bytes read / written through the cache Bytes read / written from/to temp files FIREBIRD INTERNATIONAL CONFERENCE '2014 31
  • 32. TTOODDOO:: ttiimmee ssttaattiissttiiccss Elapsed time Total inside the engine Spent in the user space Spent in the system / kernel space FIREBIRD INTERNATIONAL CONFERENCE '2014 32
  • 33. TTOODDOO:: ttiimmee ssttaattiissttiiccss Elapsed time Total inside the engine Spent in the user space Spent in the system / kernel space Wait time Database (and maybe temp files) I/O Page cache waits Transaction waits FIREBIRD INTERNATIONAL CONFERENCE '2014 33
  • 34. TTOODDOO:: iinntteeggrraattiioonn Collecting the statistics StatsD, CollectD Reporting / analyzing Graphite / Graphene Other tools Nagios, Cacti, Zabbix FIREBIRD INTERNATIONAL CONFERENCE '2014 34