SlideShare una empresa de Scribd logo
1 de 29
Orphans, Corruption, Careful Write, and 
Logging, 
or 
Gfix says my database is CORRUPT 
or 
Database Integrity - then, now, future 
Ann W. Harrison 
James A. Starkey
A Word of Thanks to our Sponsors
And to Vlad Khorsun 
Core 4562 
Some errors reported by database validation (such as 
orphan pages and a few others) are not critical for 
database, i.e. don’t affect query results andor logical 
consistency of user data. 
Such defects should not be counted as errors to not 
scare users. 
Fixed 28 Sept 2014
Questions?
MVCC – Quick Review 
Read consistency, undo, and update concurrency 
provided in one durable mechanism. 
Data is never overwritten. 
Update or Delete creates new record version linked to old. 
Transaction reads the version committed when it started 
(or at the instant for Read Committed) 
Each record chain has at most one uncommitted version. 
Rollback removes uncommitted version. 
.
What does Gfix do? 
Reads entire database verifying internal consistency: 
Of interest now: 
Allocated pages are in use 
Unused pages are not allocated 
Primary record links to 
Fragments 
Back versions 
Before 28 September 2014, any problem was an error
What are Orphans? 
And what do they have to do with this? (not what you 
think)
Database Integrity 
Disasters occur (more often circa 1985) 
Database System, O/S, Network, Power, Disk 
Classic Solutions 
Write Ahead Log 
Shadow Pages 
After image Log 
Firebird Solution 
Careful write, multi-version records 
Write once
Disk Failure 
InterBase V1 
Journal 
After image 
Abandoned by Borland 
Shadow 
Complete copy on separate disk 
Better done in RAID
Careful Write 
Order writes to disk (fsync) 
Database is always consistent on disk 
Rule: write the object pointed to then the pointer 
Record examples: record before index, back 
version before main, fragment before main record 
Page examples: mark as allocated before using, 
release before marking free 
Requires disciplined development
Record Before Index 
Indexes are always considered “noisy” 
Start at the first value below desired value 
Stop at next value above 
Index will be written before commit completes 
After crash: 
New uncommitted records not in index 
Uncommitted deleted records stay in index 
Gfix reports index corruption
Back Version Before Record 
When the back version is on a different page 
Write the back version first 
Write the record pointing to the back version next 
After crash: 
Old record still exists 
New back version wastes space 
Gfix reports orphan back versions
Fragment Before Record 
Record bigger than page size 
Write the last page of the record 
Write the next to last, point to the last 
Write other pages in reverse order, pointing to prior 
Write the first bit, pointing to next page 
After crash: 
Record fragments are unusable space 
Gfix reports orphan record fragments
Page Allocation 
Allocation: 
Mark page as allocated on PIP 
Format page 
Enter page in table, index, or internal structure 
After crash: 
Page is unusable 
Gfix reports orphan page
Page Release 
Release 
Remove page from table or index 
Mark page as unallocated 
After crash: 
Page is unusable 
Gfix reports orphan page
Precedence 
If index page A points to a record on page B, page B 
must be written before page A. 
If the record on page B has a back version on page C, 
page C must be written before page B. 
Firebird maintains a complete graph of precedence. 
If a cache conflict requires writing page A, C and B must 
be written first. 
If the graph develops a cycle, all pages must be written.
Downsides of Careful Write 
Writes are random. 
Precedence may cause multiple writes. 
Cycles cause multiple writes.
Design is Balance 
Performance Recoverability
Disaster Recovery 
From DBMS crash 
From OS crash 
From CPU crash 
From Network failure 
From Disk Crash
Antediluvian Technology 
Long Term Journaling 
Before and after page images are journalled 
Required a Tape Drive (now extinct) 
Recovery 
Roll forward from dump 
Rollback from the current disk image 
Performance bounded by tape speed
JRD’s Across History 
1980 1990 2000 2010 2014 
Rdb/ELN 
InterBase 
Firebird 
Netfrastructure 
Falcon 
Development NuoDB 
Closed Source 
Open Source 
AmorphousDB
Interbase 1.0, 1985 
(Actually gds/Galaxy 1.0) 
MVCC + Careful Write 
Disk shadowing (raid not invented yet) 
GLTJ: Long term journal server 
Dumped database to journal when enabled 
Journalled page changes (or full page) 
GLTJ could be shared among databases 
Rarely, if ever, used 
Performance constrained by disk speed
Falcon 
MVCC in memory 
Disk used as back-fill for memory 
Serial log for recovery 
Single log per database 
Page changes posted to log 
Log written with non-buffered writes 
Pages written when convenient 
Performance constrained by CPU
NuoDB 
DB layered on distributed objects called Atoms 
Atoms replicate peer to peer 
MVCC at Atom level 
Transaction nodes pump SQL transactions 
Storage managers persist serialized Atoms 
Storage managers use serial log for replication 
messages
NuoDB Transactions 
DBA has control over commit policy: 
Commit when transaction node sends commit 
messages 
Commit when <n> storage managers acknowledge 
commit messages 
Commit when <n> storage managers have written 
commit messages to serial log
Performance Implications 
Disk Based MVCC 
Many disk writes per transaction 
Batch commit is possible 
Performance is dozens of transactions per second with 
forced write 
Higher transaction rate with buffered writes, but at risk 
of data loss 
SSDs are a big win
Performance Implications 
Serial Log 
With fine granularity threading and 8 cores, 
benchmarked at 22,000 TPS 
Serial log management is critical 
Requires substantial non-interlocked data structures
Performance Implications 
NuoDB 
Bench marked at 3,000,000 TPS running on 40 
commodity processors 
Read only TPS is theoretically infinite
Questions?

Más contenido relacionado

La actualidad más candente

Breaking IO Performance Barriers: Scalable Parallel File System for AWS
Breaking IO Performance Barriers: Scalable Parallel File System for AWSBreaking IO Performance Barriers: Scalable Parallel File System for AWS
Breaking IO Performance Barriers: Scalable Parallel File System for AWSAmazon Web Services
 
Developing imperfect software
Developing imperfect softwareDeveloping imperfect software
Developing imperfect softwareYoungGi Kim
 
Bcache and Aerospike
Bcache and AerospikeBcache and Aerospike
Bcache and AerospikeAnshu Prateek
 
Geographically Distributed Multi-Master MySQL Clusters
Geographically Distributed Multi-Master MySQL ClustersGeographically Distributed Multi-Master MySQL Clusters
Geographically Distributed Multi-Master MySQL ClustersContinuent
 
Right-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual MachineRight-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual Machineheraflux
 
AEM WITH MONGODB
AEM WITH MONGODBAEM WITH MONGODB
AEM WITH MONGODBNate Nelson
 
Provisioning and automating high availability postgres on aws ec2 (1)
Provisioning and automating high availability postgres on aws ec2 (1)Provisioning and automating high availability postgres on aws ec2 (1)
Provisioning and automating high availability postgres on aws ec2 (1)Payal Singh
 
Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2ShepHertz
 
Effectively Deploying MongoDB on AEM
Effectively Deploying MongoDB on AEMEffectively Deploying MongoDB on AEM
Effectively Deploying MongoDB on AEMNorberto Leite
 
Nordic infrastructure Conference 2017 - SQL Server in DevOps
Nordic infrastructure Conference 2017 - SQL Server in DevOpsNordic infrastructure Conference 2017 - SQL Server in DevOps
Nordic infrastructure Conference 2017 - SQL Server in DevOpsTravis Wright
 
Managing storage on Prem and in Cloud
Managing storage on Prem and in CloudManaging storage on Prem and in Cloud
Managing storage on Prem and in CloudHoward Marks
 
How to scale your web app
How to scale your web appHow to scale your web app
How to scale your web appGeorgio_1999
 
Varrow datacenter storage today and tomorrow
Varrow   datacenter storage today and tomorrowVarrow   datacenter storage today and tomorrow
Varrow datacenter storage today and tomorrowpittmantony
 
PowerDNS with MySQL
PowerDNS with MySQLPowerDNS with MySQL
PowerDNS with MySQLI Goo Lee
 
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...Nexcess.net LLC
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Tom Laszewski
 
Vm13 vnx mixed workloads
Vm13 vnx mixed workloadsVm13 vnx mixed workloads
Vm13 vnx mixed workloadspittmantony
 
Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationpittmantony
 

La actualidad más candente (20)

Breaking IO Performance Barriers: Scalable Parallel File System for AWS
Breaking IO Performance Barriers: Scalable Parallel File System for AWSBreaking IO Performance Barriers: Scalable Parallel File System for AWS
Breaking IO Performance Barriers: Scalable Parallel File System for AWS
 
Developing imperfect software
Developing imperfect softwareDeveloping imperfect software
Developing imperfect software
 
Bcache and Aerospike
Bcache and AerospikeBcache and Aerospike
Bcache and Aerospike
 
Geographically Distributed Multi-Master MySQL Clusters
Geographically Distributed Multi-Master MySQL ClustersGeographically Distributed Multi-Master MySQL Clusters
Geographically Distributed Multi-Master MySQL Clusters
 
Right-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual MachineRight-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual Machine
 
AEM WITH MONGODB
AEM WITH MONGODBAEM WITH MONGODB
AEM WITH MONGODB
 
IaaS for DBAs in Azure
IaaS for DBAs in AzureIaaS for DBAs in Azure
IaaS for DBAs in Azure
 
Provisioning and automating high availability postgres on aws ec2 (1)
Provisioning and automating high availability postgres on aws ec2 (1)Provisioning and automating high availability postgres on aws ec2 (1)
Provisioning and automating high availability postgres on aws ec2 (1)
 
Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2
 
Effectively Deploying MongoDB on AEM
Effectively Deploying MongoDB on AEMEffectively Deploying MongoDB on AEM
Effectively Deploying MongoDB on AEM
 
Nordic infrastructure Conference 2017 - SQL Server in DevOps
Nordic infrastructure Conference 2017 - SQL Server in DevOpsNordic infrastructure Conference 2017 - SQL Server in DevOps
Nordic infrastructure Conference 2017 - SQL Server in DevOps
 
Managing storage on Prem and in Cloud
Managing storage on Prem and in CloudManaging storage on Prem and in Cloud
Managing storage on Prem and in Cloud
 
How to scale your web app
How to scale your web appHow to scale your web app
How to scale your web app
 
Varrow datacenter storage today and tomorrow
Varrow   datacenter storage today and tomorrowVarrow   datacenter storage today and tomorrow
Varrow datacenter storage today and tomorrow
 
PowerDNS with MySQL
PowerDNS with MySQLPowerDNS with MySQL
PowerDNS with MySQL
 
Kickstart to Windows azure
Kickstart to Windows azureKickstart to Windows azure
Kickstart to Windows azure
 
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
 
Vm13 vnx mixed workloads
Vm13 vnx mixed workloadsVm13 vnx mixed workloads
Vm13 vnx mixed workloads
 
Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
 

Destacado

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 Solvencyartba
 
Accessibility Matters: Making Your Product Available to Everyone
Accessibility Matters: Making Your Product Available to EveryoneAccessibility Matters: Making Your Product Available to Everyone
Accessibility Matters: Making Your Product Available to EveryoneChar James-Tanny
 
Artba Senate Finance Committee May
Artba Senate Finance Committee MayArtba Senate Finance Committee May
Artba Senate Finance Committee Mayartba
 
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.artba
 
How to translate patient information leaflets
How to translate patient information leafletsHow to translate patient information leaflets
How to translate patient information leafletsMaja Źróbecka, MITI
 
New York Times Ad opposing tighter ozone standards
New York Times Ad opposing tighter ozone standardsNew York Times Ad opposing tighter ozone standards
New York Times Ad opposing tighter ozone standardsartba
 
Multi-Industry Letter to Congress on EPA Ozone Standards
Multi-Industry Letter to Congress on EPA Ozone StandardsMulti-Industry Letter to Congress on EPA Ozone Standards
Multi-Industry Letter to Congress on EPA Ozone Standardsartba
 
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
 
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 CenterCase IQ
 
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...artba
 
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 Batartba
 
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...artba
 
Accessibility Matters - Supplemental Links
Accessibility Matters - Supplemental LinksAccessibility Matters - Supplemental Links
Accessibility Matters - Supplemental LinksChar James-Tanny
 
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)Deborah Sauer
 
Technical Delivery - Expanded Role for Technical Communicators, STC New Engla...
Technical Delivery - Expanded Role for Technical Communicators, STC New Engla...Technical Delivery - Expanded Role for Technical Communicators, STC New Engla...
Technical Delivery - Expanded Role for Technical Communicators, STC New Engla...Todd DeLuca, MTSC
 
How does Linked Open Data change the publishing landscape?
How does Linked Open Data change the publishing landscape?How does Linked Open Data change the publishing landscape?
How does Linked Open Data change the publishing landscape?Quentin Reul
 
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 Committeeartba
 

Destacado (19)

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
 
Accessibility Matters: Making Your Product Available to Everyone
Accessibility Matters: Making Your Product Available to EveryoneAccessibility Matters: Making Your Product Available to Everyone
Accessibility Matters: Making Your Product Available to Everyone
 
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.
 
How to translate patient information leaflets
How to translate patient information leafletsHow to translate patient information leaflets
How to translate patient information leaflets
 
New York Times Ad opposing tighter ozone standards
New York Times Ad opposing tighter ozone standardsNew York Times Ad opposing tighter ozone standards
New York Times Ad opposing tighter ozone standards
 
Multi-Industry Letter to Congress on EPA Ozone Standards
Multi-Industry Letter to Congress on EPA Ozone StandardsMulti-Industry Letter to Congress on EPA Ozone Standards
Multi-Industry Letter to Congress on EPA Ozone Standards
 
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)
 
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
 
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...
 
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
 
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...
 
Harvey house
Harvey houseHarvey house
Harvey house
 
Accessibility Matters - Supplemental Links
Accessibility Matters - Supplemental LinksAccessibility Matters - Supplemental Links
Accessibility Matters - Supplemental Links
 
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)
 
Git Going With DVCS v1.1
Git Going With DVCS v1.1Git Going With DVCS v1.1
Git Going With DVCS v1.1
 
Technical Delivery - Expanded Role for Technical Communicators, STC New Engla...
Technical Delivery - Expanded Role for Technical Communicators, STC New Engla...Technical Delivery - Expanded Role for Technical Communicators, STC New Engla...
Technical Delivery - Expanded Role for Technical Communicators, STC New Engla...
 
How does Linked Open Data change the publishing landscape?
How does Linked Open Data change the publishing landscape?How does Linked Open Data change the publishing landscape?
How does Linked Open Data change the publishing landscape?
 
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
 

Similar a Orphans, Corruption, Careful Write, and Logging

How Data Instant Replay and Data Progression Work Together
How Data Instant Replay and Data Progression Work TogetherHow Data Instant Replay and Data Progression Work Together
How Data Instant Replay and Data Progression Work TogetherCompellent Technologies
 
Lifting the Blinds: Monitoring Windows Server 2012
Lifting the Blinds: Monitoring Windows Server 2012Lifting the Blinds: Monitoring Windows Server 2012
Lifting the Blinds: Monitoring Windows Server 2012Datadog
 
CS 542 Putting it all together -- Storage Management
CS 542 Putting it all together -- Storage ManagementCS 542 Putting it all together -- Storage Management
CS 542 Putting it all together -- Storage ManagementJ Singh
 
Handling Data in Mega Scale Systems
Handling Data in Mega Scale SystemsHandling Data in Mega Scale Systems
Handling Data in Mega Scale SystemsDirecti Group
 
Experience In Building Scalable Web Sites Through Infrastructure's View
Experience In Building Scalable Web Sites Through Infrastructure's ViewExperience In Building Scalable Web Sites Through Infrastructure's View
Experience In Building Scalable Web Sites Through Infrastructure's ViewPhuwadon D
 
Dsm (Distributed computing)
Dsm (Distributed computing)Dsm (Distributed computing)
Dsm (Distributed computing)Sri Prasanna
 
Design Tradeoffs for SSD Performance
Design Tradeoffs for SSD PerformanceDesign Tradeoffs for SSD Performance
Design Tradeoffs for SSD Performancejimmytruong
 
Showdown: IBM DB2 versus Oracle Database for OLTP
Showdown: IBM DB2 versus Oracle Database for OLTPShowdown: IBM DB2 versus Oracle Database for OLTP
Showdown: IBM DB2 versus Oracle Database for OLTPcomahony
 
Apache ignite as in-memory computing platform
Apache ignite as in-memory computing platformApache ignite as in-memory computing platform
Apache ignite as in-memory computing platformSurinder Mehra
 
Storage, San And Business Continuity Overview
Storage, San And Business Continuity OverviewStorage, San And Business Continuity Overview
Storage, San And Business Continuity OverviewAlan McSweeney
 
15 bufferand records
15 bufferand records15 bufferand records
15 bufferand recordsashish61_scs
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Bhupesh Bansal
 
Hadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop User Group
 
Application Caching: The Hidden Microservice (SAConf)
Application Caching: The Hidden Microservice (SAConf)Application Caching: The Hidden Microservice (SAConf)
Application Caching: The Hidden Microservice (SAConf)Scott Mansfield
 
Sequential file programming patterns and performance with .net
Sequential  file programming patterns and performance with .netSequential  file programming patterns and performance with .net
Sequential file programming patterns and performance with .netMichael Pavlovsky
 

Similar a Orphans, Corruption, Careful Write, and Logging (20)

How Data Instant Replay and Data Progression Work Together
How Data Instant Replay and Data Progression Work TogetherHow Data Instant Replay and Data Progression Work Together
How Data Instant Replay and Data Progression Work Together
 
Lifting the Blinds: Monitoring Windows Server 2012
Lifting the Blinds: Monitoring Windows Server 2012Lifting the Blinds: Monitoring Windows Server 2012
Lifting the Blinds: Monitoring Windows Server 2012
 
CS 542 Putting it all together -- Storage Management
CS 542 Putting it all together -- Storage ManagementCS 542 Putting it all together -- Storage Management
CS 542 Putting it all together -- Storage Management
 
Handling Data in Mega Scale Systems
Handling Data in Mega Scale SystemsHandling Data in Mega Scale Systems
Handling Data in Mega Scale Systems
 
Experience In Building Scalable Web Sites Through Infrastructure's View
Experience In Building Scalable Web Sites Through Infrastructure's ViewExperience In Building Scalable Web Sites Through Infrastructure's View
Experience In Building Scalable Web Sites Through Infrastructure's View
 
Dsm (Distributed computing)
Dsm (Distributed computing)Dsm (Distributed computing)
Dsm (Distributed computing)
 
Design Tradeoffs for SSD Performance
Design Tradeoffs for SSD PerformanceDesign Tradeoffs for SSD Performance
Design Tradeoffs for SSD Performance
 
Showdown: IBM DB2 versus Oracle Database for OLTP
Showdown: IBM DB2 versus Oracle Database for OLTPShowdown: IBM DB2 versus Oracle Database for OLTP
Showdown: IBM DB2 versus Oracle Database for OLTP
 
Apache ignite as in-memory computing platform
Apache ignite as in-memory computing platformApache ignite as in-memory computing platform
Apache ignite as in-memory computing platform
 
Demo 0.9.4
Demo 0.9.4Demo 0.9.4
Demo 0.9.4
 
Rdbms
Rdbms Rdbms
Rdbms
 
Storage, San And Business Continuity Overview
Storage, San And Business Continuity OverviewStorage, San And Business Continuity Overview
Storage, San And Business Continuity Overview
 
SQL 2005 Disk IO Performance
SQL 2005 Disk IO PerformanceSQL 2005 Disk IO Performance
SQL 2005 Disk IO Performance
 
Measuring Firebird Disk I/O
Measuring Firebird Disk I/OMeasuring Firebird Disk I/O
Measuring Firebird Disk I/O
 
15 bufferand records
15 bufferand records15 bufferand records
15 bufferand records
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
 
Hadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedIn
 
Application Caching: The Hidden Microservice (SAConf)
Application Caching: The Hidden Microservice (SAConf)Application Caching: The Hidden Microservice (SAConf)
Application Caching: The Hidden Microservice (SAConf)
 
Gfs
GfsGfs
Gfs
 
Sequential file programming patterns and performance with .net
Sequential  file programming patterns and performance with .netSequential  file programming patterns and performance with .net
Sequential file programming patterns and performance with .net
 

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 tablesMind 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 providerMind The Firebird
 
How Firebird transactions work
How Firebird transactions workHow Firebird transactions work
How Firebird transactions workMind The Firebird
 
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 FirebirdSQLMind The Firebird
 
Firebird Performance counters in details
Firebird Performance counters in detailsFirebird Performance counters in details
Firebird Performance counters in detailsMind The Firebird
 
Understanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQLUnderstanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQLMind The Firebird
 
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 KhorsunMind The Firebird
 
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/2016Mind 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...
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...Mind The Firebird
 
Working with Large Firebird databases
Working with Large Firebird databasesWorking with Large Firebird databases
Working with Large Firebird databasesMind The Firebird
 
Stored procedures in Firebird
Stored procedures in FirebirdStored procedures in Firebird
Stored procedures in FirebirdMind 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...
Superchaging big production systems on Firebird: transactions, garbage, maint...Mind The Firebird
 
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 APIMind The Firebird
 
Firebird 3 Windows Functions
Firebird 3 Windows  FunctionsFirebird 3 Windows  Functions
Firebird 3 Windows FunctionsMind The Firebird
 
Firebird Conference 2011 - Introduction
Firebird Conference 2011 - IntroductionFirebird Conference 2011 - Introduction
Firebird Conference 2011 - IntroductionMind The Firebird
 
Firebird database recovery and protection for enterprises and ISV
Firebird database recovery and protection for enterprises and ISVFirebird database recovery and protection for enterprises and ISV
Firebird database recovery and protection for enterprises and ISVMind 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
 
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
 
SuperServer in Firebird 3
SuperServer in Firebird 3SuperServer in Firebird 3
SuperServer in Firebird 3
 
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
 
Firebird Performance counters in details
Firebird Performance counters in detailsFirebird Performance counters in details
Firebird Performance counters in details
 
Understanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQLUnderstanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQL
 
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
 
Firebird Conference 2011 - Introduction
Firebird Conference 2011 - IntroductionFirebird Conference 2011 - Introduction
Firebird Conference 2011 - Introduction
 
Firebird database recovery and protection for enterprises and ISV
Firebird database recovery and protection for enterprises and ISVFirebird database recovery and protection for enterprises and ISV
Firebird database recovery and protection for enterprises and ISV
 

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
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...Shane Coughlan
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
%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 kaalfonteinmasabamasaba
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%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 Bahrainmasabamasaba
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 

Último (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
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...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%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
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%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
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 

Orphans, Corruption, Careful Write, and Logging

  • 1. Orphans, Corruption, Careful Write, and Logging, or Gfix says my database is CORRUPT or Database Integrity - then, now, future Ann W. Harrison James A. Starkey
  • 2. A Word of Thanks to our Sponsors
  • 3. And to Vlad Khorsun Core 4562 Some errors reported by database validation (such as orphan pages and a few others) are not critical for database, i.e. don’t affect query results andor logical consistency of user data. Such defects should not be counted as errors to not scare users. Fixed 28 Sept 2014
  • 5. MVCC – Quick Review Read consistency, undo, and update concurrency provided in one durable mechanism. Data is never overwritten. Update or Delete creates new record version linked to old. Transaction reads the version committed when it started (or at the instant for Read Committed) Each record chain has at most one uncommitted version. Rollback removes uncommitted version. .
  • 6. What does Gfix do? Reads entire database verifying internal consistency: Of interest now: Allocated pages are in use Unused pages are not allocated Primary record links to Fragments Back versions Before 28 September 2014, any problem was an error
  • 7. What are Orphans? And what do they have to do with this? (not what you think)
  • 8. Database Integrity Disasters occur (more often circa 1985) Database System, O/S, Network, Power, Disk Classic Solutions Write Ahead Log Shadow Pages After image Log Firebird Solution Careful write, multi-version records Write once
  • 9. Disk Failure InterBase V1 Journal After image Abandoned by Borland Shadow Complete copy on separate disk Better done in RAID
  • 10. Careful Write Order writes to disk (fsync) Database is always consistent on disk Rule: write the object pointed to then the pointer Record examples: record before index, back version before main, fragment before main record Page examples: mark as allocated before using, release before marking free Requires disciplined development
  • 11. Record Before Index Indexes are always considered “noisy” Start at the first value below desired value Stop at next value above Index will be written before commit completes After crash: New uncommitted records not in index Uncommitted deleted records stay in index Gfix reports index corruption
  • 12. Back Version Before Record When the back version is on a different page Write the back version first Write the record pointing to the back version next After crash: Old record still exists New back version wastes space Gfix reports orphan back versions
  • 13. Fragment Before Record Record bigger than page size Write the last page of the record Write the next to last, point to the last Write other pages in reverse order, pointing to prior Write the first bit, pointing to next page After crash: Record fragments are unusable space Gfix reports orphan record fragments
  • 14. Page Allocation Allocation: Mark page as allocated on PIP Format page Enter page in table, index, or internal structure After crash: Page is unusable Gfix reports orphan page
  • 15. Page Release Release Remove page from table or index Mark page as unallocated After crash: Page is unusable Gfix reports orphan page
  • 16. Precedence If index page A points to a record on page B, page B must be written before page A. If the record on page B has a back version on page C, page C must be written before page B. Firebird maintains a complete graph of precedence. If a cache conflict requires writing page A, C and B must be written first. If the graph develops a cycle, all pages must be written.
  • 17. Downsides of Careful Write Writes are random. Precedence may cause multiple writes. Cycles cause multiple writes.
  • 18. Design is Balance Performance Recoverability
  • 19. Disaster Recovery From DBMS crash From OS crash From CPU crash From Network failure From Disk Crash
  • 20. Antediluvian Technology Long Term Journaling Before and after page images are journalled Required a Tape Drive (now extinct) Recovery Roll forward from dump Rollback from the current disk image Performance bounded by tape speed
  • 21. JRD’s Across History 1980 1990 2000 2010 2014 Rdb/ELN InterBase Firebird Netfrastructure Falcon Development NuoDB Closed Source Open Source AmorphousDB
  • 22. Interbase 1.0, 1985 (Actually gds/Galaxy 1.0) MVCC + Careful Write Disk shadowing (raid not invented yet) GLTJ: Long term journal server Dumped database to journal when enabled Journalled page changes (or full page) GLTJ could be shared among databases Rarely, if ever, used Performance constrained by disk speed
  • 23. Falcon MVCC in memory Disk used as back-fill for memory Serial log for recovery Single log per database Page changes posted to log Log written with non-buffered writes Pages written when convenient Performance constrained by CPU
  • 24. NuoDB DB layered on distributed objects called Atoms Atoms replicate peer to peer MVCC at Atom level Transaction nodes pump SQL transactions Storage managers persist serialized Atoms Storage managers use serial log for replication messages
  • 25. NuoDB Transactions DBA has control over commit policy: Commit when transaction node sends commit messages Commit when <n> storage managers acknowledge commit messages Commit when <n> storage managers have written commit messages to serial log
  • 26. Performance Implications Disk Based MVCC Many disk writes per transaction Batch commit is possible Performance is dozens of transactions per second with forced write Higher transaction rate with buffered writes, but at risk of data loss SSDs are a big win
  • 27. Performance Implications Serial Log With fine granularity threading and 8 cores, benchmarked at 22,000 TPS Serial log management is critical Requires substantial non-interlocked data structures
  • 28. Performance Implications NuoDB Bench marked at 3,000,000 TPS running on 40 commodity processors Read only TPS is theoretically infinite

Notas del editor

  1. Since gfix will be more clear in V3, there’s not much to talk about…
  2. No, not that easy. First a review of the basic concurrency control mechanism of Firebird. Concurrency covers several areas: atomicity – a transaction succeeds or fails as a unit; isolation – a transaction is not affected by concurrent transactions; avoiding inconsistent reads and dirty writes; all done without locks.
  3. If anyone has missed gfix, it was originally known as Alice = because it handled everything that didn’t fit elsewhere, thus All Else. So it’s a grab bag of functions that run outside the database server. Gfix reads the database directly as if it were a file. The specific function of gfix that I’m talking about is its ability to validate a database’s internal consistency. Because it’s outside the server, it doesn’t know anything about database constraints or data formats. It won’t recoginize invalid data, non-functional referential constraints, duplicates in unique indexes, etc. However, it will recognize problems like index entries that don’t point to records, pages that are either doubly allocated or not allocated at all, records with back version pointers that don’t have back versions.
  4. So, gfix is looking for all those problems, how could they possibly occur in a robust database management system? From time to time, database systems stop cold. Local legend says that InterBase was used in Abrams tanks because the tanks suffered frequent short power failures. Unlike other database systems, InterBase restarted immediately. The cost of an immediate restart was that some