SlideShare una empresa de Scribd logo
1 de 35
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

Más contenido relacionado

La actualidad más candente

Putting Wings on the Elephant
Putting Wings on the ElephantPutting Wings on the Elephant
Putting Wings on the Elephant
DataWorks Summit
 
Securing Apache Web Servers
Securing Apache Web ServersSecuring Apache Web Servers
Securing Apache Web Servers
webhostingguy
 

La actualidad más candente (20)

OpenZFS data-driven performance
OpenZFS data-driven performanceOpenZFS data-driven performance
OpenZFS data-driven performance
 
Putting Wings on the Elephant
Putting Wings on the ElephantPutting Wings on the Elephant
Putting Wings on the Elephant
 
Filesystem Showdown: What a Difference a Decade Makes
Filesystem Showdown: What a Difference a Decade MakesFilesystem Showdown: What a Difference a Decade Makes
Filesystem Showdown: What a Difference a Decade Makes
 
Lisa 2015-gluster fs-hands-on
Lisa 2015-gluster fs-hands-onLisa 2015-gluster fs-hands-on
Lisa 2015-gluster fs-hands-on
 
Backups
BackupsBackups
Backups
 
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going
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
 
Securing Apache Web Servers
Securing Apache Web ServersSecuring Apache Web Servers
Securing Apache Web Servers
 
Redis 101
Redis 101Redis 101
Redis 101
 
Redis Persistence
Redis  PersistenceRedis  Persistence
Redis Persistence
 
Docker Intro
Docker IntroDocker Intro
Docker Intro
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
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
 
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
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
 
Branch Management in Git Fusion
Branch Management in Git FusionBranch Management in Git Fusion
Branch Management in Git Fusion
 
My Sql Performance In A Cloud
My Sql Performance In A CloudMy Sql Performance In A Cloud
My Sql Performance In A Cloud
 
Windows Server 2016 Webinar
Windows Server 2016 WebinarWindows Server 2016 Webinar
Windows Server 2016 Webinar
 
Redis overview for Software Architecture Forum
Redis overview for Software Architecture ForumRedis overview for Software Architecture Forum
Redis overview for Software Architecture Forum
 
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...
Kernel Recipes 2016 - Would an ABI changes visualization tool be useful to Li...
 
Optimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at LocalyticsOptimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at Localytics
 
Distributed Stream Processing on Fluentd / #fluentd
Distributed Stream Processing on Fluentd / #fluentdDistributed Stream Processing on Fluentd / #fluentd
Distributed Stream Processing on Fluentd / #fluentd
 
Tuning Solr & Pipeline for Logs
Tuning Solr & Pipeline for LogsTuning Solr & Pipeline for Logs
Tuning Solr & Pipeline for Logs
 

Destacado

Orphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and LoggingOrphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and Logging
Mind The Firebird
 
09/25/13: Senate EPW Highway Trust Fund Hearing
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
artba
 
02/12/14: Testimony to Senate Environment & Public Works Committee
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
artba
 
Athfield house, Wellington, New Zealand (Architect: Ian Athfield)
Athfield house, Wellington, New Zealand (Architect: Ian Athfield)Athfield house, Wellington, New Zealand (Architect: Ian Athfield)
Athfield house, Wellington, New Zealand (Architect: Ian Athfield)
Simon Devitt Photographer
 
How to translate patient information leaflets
How to translate patient information leafletsHow to translate patient information leaflets
How to translate patient information leaflets
Maja Źróbecka, MITI
 
04/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 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
artba
 
Artba Senate Finance Committee May
Artba Senate Finance Committee MayArtba Senate Finance Committee May
Artba Senate Finance Committee May
artba
 

Destacado (20)

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...
Coalition Letter to House of Representatives on Failure to Advance S. 1140, t...
 
Measuring Firebird Disk I/O
Measuring Firebird Disk I/OMeasuring Firebird Disk I/O
Measuring Firebird Disk I/O
 
Resolving Firebird performance problems
Resolving Firebird performance problemsResolving Firebird performance problems
Resolving Firebird performance problems
 
Orphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and LoggingOrphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and Logging
 
09/25/13: Senate EPW Highway Trust Fund Hearing
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
 
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...
Coalition Letter to House Energy and Commerce Committee Leaders on Chemical S...
 
Comments Objecting to ESA protections for the Long-Eared Bat
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
 
Git Going With DVCS v1.1
Git Going With DVCS v1.1Git Going With DVCS v1.1
Git Going With DVCS v1.1
 
Matapouri beach house
Matapouri beach houseMatapouri beach house
Matapouri beach house
 
Keeping Denial of Service and Financial Fraud out of Your Contact Center
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
 
02/12/14: Testimony to Senate Environment & Public Works Committee
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
 
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...
Coalition Comments on OSHA Clarification to Workplace Injury and Illness Regu...
 
Athfield house, Wellington, New Zealand (Architect: Ian Athfield)
Athfield house, Wellington, New Zealand (Architect: Ian Athfield)Athfield house, Wellington, New Zealand (Architect: Ian Athfield)
Athfield house, Wellington, New Zealand (Architect: Ian Athfield)
 
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...
Coalition Letter to Senate Majority Leader McConnell (R-Ky) on Chemical Safet...
 
How to translate patient information leaflets
How to translate patient information leafletsHow to translate patient information leaflets
How to translate patient information leaflets
 
The Experience Comes First (STC New England - InterChange2016)
The Experience Comes First (STC New England - InterChange2016)The Experience Comes First (STC New England - InterChange2016)
The Experience Comes First (STC New England - InterChange2016)
 
Harvey house
Harvey houseHarvey house
Harvey house
 
04/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 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
 
Artba Senate Finance Committee May
Artba Senate Finance Committee MayArtba Senate Finance Committee May
Artba Senate Finance Committee May
 
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.
FHWA MOU with the State of Alaska Regarding Delegation of CEs.
 

Similar a Firebird Performance counters in details

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)
Don't screw it up: how to build durable web apis @ PHPDay 2014 in Verona (ITA)
Alessandro Nadalin
 
Caching with Varnish
Caching with VarnishCaching with Varnish
Caching with Varnish
schoefmax
 

Similar a Firebird Performance counters in details (20)

Rendering Large Models in the Browser in Real-Time
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
 
Experiences building a distributed shared log on RADOS - Noah Watkins
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
 
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?
QEMU Disk IO Which performs Better: Native or threads?
 
Linaro Connect 2017 - Presentation - Kynetics
Linaro Connect 2017 - Presentation - KyneticsLinaro Connect 2017 - Presentation - Kynetics
Linaro Connect 2017 - Presentation - Kynetics
 
FreeBSD Document Project
FreeBSD Document ProjectFreeBSD Document Project
FreeBSD Document Project
 
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
Don't screw it up! How to build durable API
 
Subversion howto
Subversion howtoSubversion howto
Subversion howto
 
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!
Modern Release Engineering in a Nutshell - Why Researchers should Care!
 
Online MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupOnline MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackup
 
Building collaborative workflows for scientific data
Building collaborative workflows for scientific dataBuilding collaborative workflows for scientific data
Building collaborative workflows for scientific data
 
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)
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
Don't screw it up: how to build durable web apisDon't screw it up: how to build durable web apis
Don't screw it up: how to build durable web apis
 
Loophole: Timing Attacks on Shared Event Loops in Chrome
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
 
Greyhound - Powerful Functional Kafka Library - Devtalks reimagined
Greyhound - Powerful Functional Kafka Library - Devtalks reimaginedGreyhound - Powerful Functional Kafka Library - Devtalks reimagined
Greyhound - Powerful Functional Kafka Library - Devtalks reimagined
 
It's Time to Debloat the Cloud with Unikraft
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
 
Juggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDBJuggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDB
 
Caching with Varnish
Caching with VarnishCaching with Varnish
Caching with Varnish
 
The Unofficial VCAP / VCP VMware Study Guide
The Unofficial VCAP / VCP VMware Study GuideThe Unofficial VCAP / VCP VMware Study Guide
The Unofficial VCAP / VCP VMware Study Guide
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
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
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
 

Más de Mind The Firebird

Tips for using Firebird system tables
Tips for using Firebird system tablesTips for using Firebird system tables
Tips for using Firebird system tables
Mind The Firebird
 
A year in the life of Firebird .Net provider
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 Firebird
 
How Firebird transactions work
How Firebird transactions workHow Firebird transactions work
How Firebird transactions work
Mind The Firebird
 
Firebird 3 Windows Functions
Firebird 3 Windows  FunctionsFirebird 3 Windows  Functions
Firebird 3 Windows Functions
Mind The Firebird
 

Más de Mind The Firebird (20)

Tips for using Firebird system tables
Tips for using Firebird system tablesTips for using Firebird system tables
Tips for using Firebird system tables
 
Using Azure cloud and Firebird to develop applications easily
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
 
A year in the life of Firebird .Net provider
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
 
How Firebird transactions work
How Firebird transactions workHow Firebird transactions work
How Firebird transactions work
 
Copycat presentation
Copycat presentationCopycat presentation
Copycat presentation
 
Using ТРСС to study Firebird performance
Using ТРСС to study Firebird performanceUsing ТРСС to study Firebird performance
Using ТРСС to study Firebird performance
 
Overview of RedDatabase 2.5
Overview of RedDatabase 2.5Overview of RedDatabase 2.5
Overview of RedDatabase 2.5
 
Creating logs for data auditing in FirebirdSQL
Creating logs for data auditing in FirebirdSQLCreating logs for data auditing in FirebirdSQL
Creating logs for data auditing in FirebirdSQL
 
Understanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQLUnderstanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQL
 
Threading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyondThreading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyond
 
New SQL Features in Firebird 3, by Vlad Khorsun
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
 
Firebird release strategy and roadmap for 2015/2016
Firebird release strategy and roadmap for 2015/2016Firebird release strategy and roadmap for 2015/2016
Firebird release strategy and roadmap for 2015/2016
 
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...
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
 
Working with Large Firebird databases
Working with Large Firebird databasesWorking with Large Firebird databases
Working with Large Firebird databases
 
Stored procedures in Firebird
Stored procedures in FirebirdStored procedures in Firebird
Stored procedures in Firebird
 
Firebird on Linux
Firebird on LinuxFirebird on Linux
Firebird on Linux
 
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...
Superchaging big production systems on Firebird: transactions, garbage, maint...
 
Firebird meets NoSQL
Firebird meets NoSQLFirebird meets NoSQL
Firebird meets NoSQL
 
Continuous Database Monitoring with the Trace API
Continuous Database Monitoring with the Trace APIContinuous Database Monitoring with the Trace API
Continuous Database Monitoring with the Trace API
 
Firebird 3 Windows Functions
Firebird 3 Windows  FunctionsFirebird 3 Windows  Functions
Firebird 3 Windows Functions
 

Último

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Último (20)

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 

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