SlideShare a Scribd company logo
1 of 43
Download to read offline
Falcon - built for speed

Ann Harrison
Kevin Lewis


                           MySQL Users' Conference April 2009
If it's so fast, why isn't it done yet?
Talk overview
 Falcon at a glance
 Project history
 Multi-threading for the database developer
 Cycle locking
Falcon at a glance – read first record
 MySQL                 Record Cache
 Server

                                        Serial
          Page Cache                     Log
                                        Windows



                                      Serial Log
     Database
                                        Files
     Tablespaces
Falcon at a glance – read complete
 MySQL                 Record Cache
 Server

                                        Serial
          Page Cache                     Log
                                        Windows



                                      Serial Log
     Database
                                        Files
     Tablespaces
Falcon at a glance – read again
 MySQL                 Record Cache
 Server

                                        Serial
          Page Cache                     Log
                                        Windows



                                      Serial Log
     Database
                                        Files
     Tablespaces
Falcon at a glance – write new record
 MySQL                 Record Cache
 Server

                                        Serial
          Page Cache                     Log
                                        Windows



                                      Serial Log
     Database
                                        Files
     Tablespaces
Falcon at a glance – commit
 MySQL                 Record Cache
 Server

                                        Serial
          Page Cache                     Log
                                        Windows



                                      Serial Log
     Database
                                        Files
     Tablespaces
Falcon at a glance – write complete
 MySQL                 Record Cache
 Server

                                        Serial
          Page Cache                     Log
                                        Windows



                                      Serial Log
     Database
                                        Files
     Tablespaces
Falcon history
 Origin
   Transactional SQL Engine for Web App Environment
   Bought by MySQL in 2006
 MVCC
   Consistent Read
   Verisons control write access
   Memory only – no steal
 Indexes and data separate
 Data encoded on disk and in memory
 Fine grained multi-threading
Falcon Goals circa 2006

Exploit large memory for more than just a bigger cache
Use threads and processors for data migration
Eliminate tradeoffs, minimize tuning
Scale gracefully to very heavy loads
Support web applications
Web application characteristics
 Large archive of data
 Smaller active set
 High read:write ratio
 Uneven, bursty activity
What we did instead

 Enforce limit on record cache size
 Respond to simple atypical loads
   Autocommit single record access
   Repeat “insert ... select”
   Single pass read of large data set
 Challenge InnoDB on DBT2
   Large working set
   Continuous heavy load
 Hired the world's most vicious test designer
Record Cache
 Record Cache contains:
   Committed records with no versions
Record Cache
 Record Cache contains:
   Committed records with no versions

   New, uncommitted records
Record Cache
 Record Cache contains:
   Committed records with no versions

   New, uncommitted records

   Records with multiple versions
Record Cache cleanup – step 1
 Cleanup old committed single
 version records
 Scavenger
 Runs on schedule or demand
 Removes oldest mature records
 Settable limits – start and stop
Record Cache Cleanup – step 2
 Clean out record versions too old
 to be useful

 Prune
   Remove old, unneeded versions
Record Cache Cleanup – step 3
Clean up a cache full of new records

Chill
  Copy new record data to log
  Done by transaction thread
  Settable start size
Record Cache Cleanup – step 4
 Clean up multiple versions of a
 single record created by a single
 transaction

 Remove intermediate versions
   Created by a single transaction
   Rolled back to save point
   Repeated updates
Record Cache Cleanup – step 5
 Clean up records with multiple
 versions, still potentially visible
 Backlog
    Copy entire record tree to disk
    Expensive
    Not yet working
Simple, atypical loads
 Challenge:
   Autocommit single record access
      Record cache is useless
      Record encoding is useless
      Transaction creation / destruction is too expensive

 Response:
   Reuse read only transactions

 Result:
   Multi-threaded bookkeeping nightmare
Simple, atypical loads
 Challenge:
   Repeat “insert ... select...”

 Fill cache with old and new records
Simple, atypical loads
 Challenge:
    Repeat “insert ... select...”

 Fill cache with old and new records

 First solution
    Scavenge old records
    Chill new record data
Simple, atypical loads
 Challenge:
   Repeat “insert ... select...”
 Fill cache with old and new records
 First solution
   Scavenge old records
   Chill new records
 Second solution
   Move the records headers out
   Also helps index creation
Simple, atypical loads

 Single pass read of large data set
   Read more records than
   Read them over and over
   Caches are useless
   Encoding is overhead
 Response:
   Make encoding optional?
Challenge InnoDB on DBT2
                Initial results were not encouraging (2007)
               30000




               25000




               20000
Transactions




                                                                          Falcon2007
               15000
                                                                          InnoDB2007




               10000




               5000




                  0
                       10    20      50                 100   150   200
                                          Connections
Challenge InnoDB on DBT2
                But Falcon has improved a lot since April 2007
               30000




               25000




               20000
Transactions




                                                                        Falcon2007
               15000                                                    InnoDB2007
                                                                        Falcon2009



               10000




               5000




                  0
                       10   20     50                 100   150   200
                                        Connections
Challenge InnoDB on DBT2
                 So did InnoDB
               30000




               25000




               20000
Transactions




                                                                      Falcon2007
                                                                      InnoDB2007
               15000
                                                                      Falcon2009
                                                                      InnoDB2009


               10000




               5000




                  0
                       10   20   50                 100   150   200
                                      Connections
Bug trends
Multi-threading
 Databases are a natural fit for multi-threading
   Connections
   Gophers
   Scavenger
   Disk reader/writer
 Except for shared structures
 Locking blocks parallel operations

 Challenge – sharing without locking
Multi-threading
 Non-locking operation



 Purge old record versions
Multi-threading
 Non-locking operation




 Purge old record versions
Multi-threading
 Locking operation

 Remove intermediate versions
Multi-threading
 Locking operation

 Remove intermediate versions

 What granularity of lock?
Multi-threading – Lock granularity

 One per record:
   Too many interlocked instructions

 One per record group:
   Thread reading one record prevents scavenge of another

 No answer is right – more options?
Cycle locking – read record chain
 Before starting to read a record chain,
 get a shared lock on a “cycle”
         Cycle 1 = 3   Cycle 2
          shared     inactive


 Transaction A
 Transaction B
 Transaction C
Cycle locking – clean a record chain
 Before starting to read a record chain,
 get a shared lock on a “cycle”
         Cycle 1 = 4    Cycle 2
          shared       inactive


 Transaction A active in Cycle 1
 Transaction B active in Cycle 1
 Transaction C active in Cycle 1
 Scavenger unlinks versions
 from record chain and links them
 to a “to be deleted” list.
Cycle locking – records relinked


        Cycle 1 = 1   Cycle 2
         shared       inactive

 Transaction A releases lock
 Transaction B releases lock
 Transaction C still active
 Scavenger releases lock
Cycle locking – swap cycles
 New access locks cycle 2

        Cycle 1 = 1 Cycle 2 = 1
         shared     shared

 Transaction C holds Cycle 1 lock
 Cycle Manager requests exclusive
 on Cycle 1 (pumps cycle)
 Transaction A acquires Cycle 2 lock
Cycle locking – cleanup phase


        Cycle 1 = 0 Cycle 2 = 2
         shared     shared
        exclusive
 Transaction C releases lock
 Transaction B acquires Cycle 2 lock
 Cycle manager exclusive Cycle 1
Cycle locking – cleanup complete


         Cycle 1     Cycle 2 = 2
         exclusive   shared

 Transaction C acquires Cycle 2 lock
 Cycle manager exclusive Cycle 1
 Remove unlinked, unloved, old
 versions
 When cleanup is done, Cycle
 manager releases cycle 1
Questions

More Related Content

What's hot

WildFly AppServer - State of the Union
WildFly AppServer - State of the UnionWildFly AppServer - State of the Union
WildFly AppServer - State of the UnionDimitris Andreadis
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & dockerejlp12
 
EBS in an hour: Build a Vision instance - FAST - in Oracle Virtualbox
EBS in an hour: Build a Vision instance - FAST - in Oracle VirtualboxEBS in an hour: Build a Vision instance - FAST - in Oracle Virtualbox
EBS in an hour: Build a Vision instance - FAST - in Oracle Virtualboxjpiwowar
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionDimitris Andreadis
 
12 Things About WebLogic 12.1.3 #oow2014 #otnla15
12 Things About WebLogic 12.1.3 #oow2014 #otnla1512 Things About WebLogic 12.1.3 #oow2014 #otnla15
12 Things About WebLogic 12.1.3 #oow2014 #otnla15Frank Munz
 
WildFly BOF and V9 update @ Devoxx 2014
WildFly BOF and V9 update @ Devoxx 2014WildFly BOF and V9 update @ Devoxx 2014
WildFly BOF and V9 update @ Devoxx 2014Dimitris Andreadis
 

What's hot (12)

WildFly AppServer - State of the Union
WildFly AppServer - State of the UnionWildFly AppServer - State of the Union
WildFly AppServer - State of the Union
 
Samba4 Introduction
Samba4 IntroductionSamba4 Introduction
Samba4 Introduction
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & docker
 
JBoss AS / EAP and Java EE6
JBoss AS / EAP and Java EE6JBoss AS / EAP and Java EE6
JBoss AS / EAP and Java EE6
 
EBS in an hour: Build a Vision instance - FAST - in Oracle Virtualbox
EBS in an hour: Build a Vision instance - FAST - in Oracle VirtualboxEBS in an hour: Build a Vision instance - FAST - in Oracle Virtualbox
EBS in an hour: Build a Vision instance - FAST - in Oracle Virtualbox
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the Union
 
11g r2 rac_guide
11g r2 rac_guide11g r2 rac_guide
11g r2 rac_guide
 
OpenSolaris Web Stack MySQL BOF
OpenSolaris Web Stack MySQL BOFOpenSolaris Web Stack MySQL BOF
OpenSolaris Web Stack MySQL BOF
 
JCR In 10 Minutes
JCR In 10 MinutesJCR In 10 Minutes
JCR In 10 Minutes
 
12 Things About WebLogic 12.1.3 #oow2014 #otnla15
12 Things About WebLogic 12.1.3 #oow2014 #otnla1512 Things About WebLogic 12.1.3 #oow2014 #otnla15
12 Things About WebLogic 12.1.3 #oow2014 #otnla15
 
Ameba Piggの裏側
Ameba Piggの裏側Ameba Piggの裏側
Ameba Piggの裏側
 
WildFly BOF and V9 update @ Devoxx 2014
WildFly BOF and V9 update @ Devoxx 2014WildFly BOF and V9 update @ Devoxx 2014
WildFly BOF and V9 update @ Devoxx 2014
 

Viewers also liked

Rollo manual-cz-web
Rollo manual-cz-webRollo manual-cz-web
Rollo manual-cz-web_MaGeek
 
SEO(Search Engine Optimization) On Page and Off Page Factor
SEO(Search Engine Optimization) On Page and Off Page FactorSEO(Search Engine Optimization) On Page and Off Page Factor
SEO(Search Engine Optimization) On Page and Off Page FactorRahul Songire
 
Introduction to Search Engine Optimization On Page
Introduction to Search Engine Optimization On PageIntroduction to Search Engine Optimization On Page
Introduction to Search Engine Optimization On PageDevetol
 
Googles 200 ranking factors - How to Rank a Website in Google
Googles 200 ranking factors - How to Rank a Website in GoogleGoogles 200 ranking factors - How to Rank a Website in Google
Googles 200 ranking factors - How to Rank a Website in GoogleDevetol
 

Viewers also liked (6)

Dix french movies - Box Office XXth century
Dix french movies - Box Office XXth centuryDix french movies - Box Office XXth century
Dix french movies - Box Office XXth century
 
Rollo manual-cz-web
Rollo manual-cz-webRollo manual-cz-web
Rollo manual-cz-web
 
SEO(Search Engine Optimization) On Page and Off Page Factor
SEO(Search Engine Optimization) On Page and Off Page FactorSEO(Search Engine Optimization) On Page and Off Page Factor
SEO(Search Engine Optimization) On Page and Off Page Factor
 
Introduction to Search Engine Optimization On Page
Introduction to Search Engine Optimization On PageIntroduction to Search Engine Optimization On Page
Introduction to Search Engine Optimization On Page
 
Googles 200 ranking factors - How to Rank a Website in Google
Googles 200 ranking factors - How to Rank a Website in GoogleGoogles 200 ranking factors - How to Rank a Website in Google
Googles 200 ranking factors - How to Rank a Website in Google
 
Albert Camus en BD
Albert Camus en BDAlbert Camus en BD
Albert Camus en BD
 

Similar to Falcon Storage Engine Designed For Speed Presentation

Squeak DBX
Squeak DBXSqueak DBX
Squeak DBXESUG
 
Vm13 vnx mixed workloads
Vm13 vnx mixed workloadsVm13 vnx mixed workloads
Vm13 vnx mixed workloadspittmantony
 
Power of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data StructuresPower of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data Structuresconfluent
 
The Power of the Log
The Power of the LogThe Power of the Log
The Power of the LogBen Stopford
 
OSS Presentation by Kevin Halgren
OSS Presentation by Kevin HalgrenOSS Presentation by Kevin Halgren
OSS Presentation by Kevin HalgrenOpenStorageSummit
 
MySQL Proxy: Architecture and concepts of misuse
MySQL Proxy: Architecture and concepts of misuseMySQL Proxy: Architecture and concepts of misuse
MySQL Proxy: Architecture and concepts of misuseweigon
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deploymentYoshinori Matsunobu
 
AWS August Webinar Series - Introducing Amazon Aurora
AWS August Webinar Series - Introducing Amazon AuroraAWS August Webinar Series - Introducing Amazon Aurora
AWS August Webinar Series - Introducing Amazon AuroraAmazon Web Services
 
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...SQLExpert.pl
 
Locality of (p)reference
Locality of (p)referenceLocality of (p)reference
Locality of (p)referenceFromDual GmbH
 
Amazon Aurora TechConnect
Amazon Aurora TechConnect Amazon Aurora TechConnect
Amazon Aurora TechConnect LavanyaMurthy9
 
Summer training oracle
Summer training   oracle Summer training   oracle
Summer training oracle Arshit Rai
 
Summer training oracle
Summer training   oracle Summer training   oracle
Summer training oracle Arshit Rai
 
Livio slides-libflexsc-usenix-atc11
Livio slides-libflexsc-usenix-atc11Livio slides-libflexsc-usenix-atc11
Livio slides-libflexsc-usenix-atc11Livio Soares
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repositorynobby
 
What’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQLWhat’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQLAmazon Web Services
 

Similar to Falcon Storage Engine Designed For Speed Presentation (20)

Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
 
Vm13 vnx mixed workloads
Vm13 vnx mixed workloadsVm13 vnx mixed workloads
Vm13 vnx mixed workloads
 
Power of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data StructuresPower of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data Structures
 
The Power of the Log
The Power of the LogThe Power of the Log
The Power of the Log
 
OSS Presentation by Kevin Halgren
OSS Presentation by Kevin HalgrenOSS Presentation by Kevin Halgren
OSS Presentation by Kevin Halgren
 
Introducing Amazon Aurora
Introducing Amazon AuroraIntroducing Amazon Aurora
Introducing Amazon Aurora
 
MySQL Proxy: Architecture and concepts of misuse
MySQL Proxy: Architecture and concepts of misuseMySQL Proxy: Architecture and concepts of misuse
MySQL Proxy: Architecture and concepts of misuse
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deployment
 
Deep Dive on Amazon Aurora
Deep Dive on Amazon AuroraDeep Dive on Amazon Aurora
Deep Dive on Amazon Aurora
 
AWS August Webinar Series - Introducing Amazon Aurora
AWS August Webinar Series - Introducing Amazon AuroraAWS August Webinar Series - Introducing Amazon Aurora
AWS August Webinar Series - Introducing Amazon Aurora
 
What's New in Amazon Aurora
What's New in Amazon AuroraWhat's New in Amazon Aurora
What's New in Amazon Aurora
 
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
 
Locality of (p)reference
Locality of (p)referenceLocality of (p)reference
Locality of (p)reference
 
Amazon Aurora TechConnect
Amazon Aurora TechConnect Amazon Aurora TechConnect
Amazon Aurora TechConnect
 
Summer training oracle
Summer training   oracle Summer training   oracle
Summer training oracle
 
Deep Dive on Amazon Aurora
Deep Dive on Amazon AuroraDeep Dive on Amazon Aurora
Deep Dive on Amazon Aurora
 
Summer training oracle
Summer training   oracle Summer training   oracle
Summer training oracle
 
Livio slides-libflexsc-usenix-atc11
Livio slides-libflexsc-usenix-atc11Livio slides-libflexsc-usenix-atc11
Livio slides-libflexsc-usenix-atc11
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repository
 
What’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQLWhat’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQL
 

More from elliando dias

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slideselliando dias
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScriptelliando dias
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structureselliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de containerelliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Webelliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduinoelliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorceryelliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Designelliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makeselliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebookelliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 

More from elliando dias (20)

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 

Recently uploaded

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Falcon Storage Engine Designed For Speed Presentation

  • 1. Falcon - built for speed Ann Harrison Kevin Lewis MySQL Users' Conference April 2009
  • 2. If it's so fast, why isn't it done yet?
  • 3. Talk overview Falcon at a glance Project history Multi-threading for the database developer Cycle locking
  • 4. Falcon at a glance – read first record MySQL Record Cache Server Serial Page Cache Log Windows Serial Log Database Files Tablespaces
  • 5. Falcon at a glance – read complete MySQL Record Cache Server Serial Page Cache Log Windows Serial Log Database Files Tablespaces
  • 6. Falcon at a glance – read again MySQL Record Cache Server Serial Page Cache Log Windows Serial Log Database Files Tablespaces
  • 7. Falcon at a glance – write new record MySQL Record Cache Server Serial Page Cache Log Windows Serial Log Database Files Tablespaces
  • 8. Falcon at a glance – commit MySQL Record Cache Server Serial Page Cache Log Windows Serial Log Database Files Tablespaces
  • 9. Falcon at a glance – write complete MySQL Record Cache Server Serial Page Cache Log Windows Serial Log Database Files Tablespaces
  • 10. Falcon history Origin Transactional SQL Engine for Web App Environment Bought by MySQL in 2006 MVCC Consistent Read Verisons control write access Memory only – no steal Indexes and data separate Data encoded on disk and in memory Fine grained multi-threading
  • 11. Falcon Goals circa 2006 Exploit large memory for more than just a bigger cache Use threads and processors for data migration Eliminate tradeoffs, minimize tuning Scale gracefully to very heavy loads Support web applications
  • 12. Web application characteristics Large archive of data Smaller active set High read:write ratio Uneven, bursty activity
  • 13. What we did instead Enforce limit on record cache size Respond to simple atypical loads Autocommit single record access Repeat “insert ... select” Single pass read of large data set Challenge InnoDB on DBT2 Large working set Continuous heavy load Hired the world's most vicious test designer
  • 14. Record Cache Record Cache contains: Committed records with no versions
  • 15. Record Cache Record Cache contains: Committed records with no versions New, uncommitted records
  • 16. Record Cache Record Cache contains: Committed records with no versions New, uncommitted records Records with multiple versions
  • 17. Record Cache cleanup – step 1 Cleanup old committed single version records Scavenger Runs on schedule or demand Removes oldest mature records Settable limits – start and stop
  • 18. Record Cache Cleanup – step 2 Clean out record versions too old to be useful Prune Remove old, unneeded versions
  • 19. Record Cache Cleanup – step 3 Clean up a cache full of new records Chill Copy new record data to log Done by transaction thread Settable start size
  • 20. Record Cache Cleanup – step 4 Clean up multiple versions of a single record created by a single transaction Remove intermediate versions Created by a single transaction Rolled back to save point Repeated updates
  • 21. Record Cache Cleanup – step 5 Clean up records with multiple versions, still potentially visible Backlog Copy entire record tree to disk Expensive Not yet working
  • 22. Simple, atypical loads Challenge: Autocommit single record access Record cache is useless Record encoding is useless Transaction creation / destruction is too expensive Response: Reuse read only transactions Result: Multi-threaded bookkeeping nightmare
  • 23. Simple, atypical loads Challenge: Repeat “insert ... select...” Fill cache with old and new records
  • 24. Simple, atypical loads Challenge: Repeat “insert ... select...” Fill cache with old and new records First solution Scavenge old records Chill new record data
  • 25. Simple, atypical loads Challenge: Repeat “insert ... select...” Fill cache with old and new records First solution Scavenge old records Chill new records Second solution Move the records headers out Also helps index creation
  • 26. Simple, atypical loads Single pass read of large data set Read more records than Read them over and over Caches are useless Encoding is overhead Response: Make encoding optional?
  • 27. Challenge InnoDB on DBT2 Initial results were not encouraging (2007) 30000 25000 20000 Transactions Falcon2007 15000 InnoDB2007 10000 5000 0 10 20 50 100 150 200 Connections
  • 28. Challenge InnoDB on DBT2 But Falcon has improved a lot since April 2007 30000 25000 20000 Transactions Falcon2007 15000 InnoDB2007 Falcon2009 10000 5000 0 10 20 50 100 150 200 Connections
  • 29. Challenge InnoDB on DBT2 So did InnoDB 30000 25000 20000 Transactions Falcon2007 InnoDB2007 15000 Falcon2009 InnoDB2009 10000 5000 0 10 20 50 100 150 200 Connections
  • 31. Multi-threading Databases are a natural fit for multi-threading Connections Gophers Scavenger Disk reader/writer Except for shared structures Locking blocks parallel operations Challenge – sharing without locking
  • 32. Multi-threading Non-locking operation Purge old record versions
  • 33. Multi-threading Non-locking operation Purge old record versions
  • 34. Multi-threading Locking operation Remove intermediate versions
  • 35. Multi-threading Locking operation Remove intermediate versions What granularity of lock?
  • 36. Multi-threading – Lock granularity One per record: Too many interlocked instructions One per record group: Thread reading one record prevents scavenge of another No answer is right – more options?
  • 37. Cycle locking – read record chain Before starting to read a record chain, get a shared lock on a “cycle” Cycle 1 = 3 Cycle 2 shared inactive Transaction A Transaction B Transaction C
  • 38. Cycle locking – clean a record chain Before starting to read a record chain, get a shared lock on a “cycle” Cycle 1 = 4 Cycle 2 shared inactive Transaction A active in Cycle 1 Transaction B active in Cycle 1 Transaction C active in Cycle 1 Scavenger unlinks versions from record chain and links them to a “to be deleted” list.
  • 39. Cycle locking – records relinked Cycle 1 = 1 Cycle 2 shared inactive Transaction A releases lock Transaction B releases lock Transaction C still active Scavenger releases lock
  • 40. Cycle locking – swap cycles New access locks cycle 2 Cycle 1 = 1 Cycle 2 = 1 shared shared Transaction C holds Cycle 1 lock Cycle Manager requests exclusive on Cycle 1 (pumps cycle) Transaction A acquires Cycle 2 lock
  • 41. Cycle locking – cleanup phase Cycle 1 = 0 Cycle 2 = 2 shared shared exclusive Transaction C releases lock Transaction B acquires Cycle 2 lock Cycle manager exclusive Cycle 1
  • 42. Cycle locking – cleanup complete Cycle 1 Cycle 2 = 2 exclusive shared Transaction C acquires Cycle 2 lock Cycle manager exclusive Cycle 1 Remove unlinked, unloved, old versions When cleanup is done, Cycle manager releases cycle 1