SlideShare a Scribd company logo
1 of 32
Download to read offline
Developing a Database
Server: Software Engineer’s
View
Laurynas Biveinis / Percona
laurynas.biveinis@{gmail|percona}.com
Big Data Strategy 2015 Vilnius
Which database server?
Percona Server
http://www.percona.com/software/percona-server
A drop-in compatible fork of MySQL
An open-source, relational database management
system
Approaching 2,000,000 downloads
A part of MySQL ecosystem
Enabled by GNU General Public License
Forks abound
Healthy and thriving
Lots of politics
The main players, pt 1
The main players, pt 2
The main players, pt 3
Big Web Patches
The main players, pt 4
The main players, pt 5
The ecosystem is
fragmented, but is it healthy?
One measure is code flow between the forks
A case of super_read_only
A case of super_read_only
Facebook patch implemented it first
Facebook contributed it to WebScaleSQL
A case of super_read_only
Facebook patch implemented it first
Facebook contributed it to WebScaleSQL
Percona Server merged it from WebScaleSQL, sent
some bugfixes back to WebScaleSQL
A case of super_read_only
Facebook patch implemented it first
Facebook contributed it to WebScaleSQL
Percona Server merged it from WebScaleSQL, sent
some bugfixes back to WebScaleSQL
Oracle re-implemented it from scratch for the next major
MySQL release
A case of super_read_only
Facebook patch implemented it first
Facebook contributed it to WebScaleSQL
Percona Server merged it from WebScaleSQL, sent
some bugfixes back to WebScaleSQL
Oracle re-implemented it from scratch for the next major
MySQL release
MariaDB did not like it
Code is flowing (mostly) everywhere
Coopetition
Back to Percona Server
Tracks MySQL closely
Diagnostics and management
Performance and scalability
Why diagnostics and
management?
Early Percona Server:
Ad-hoc patch for extra diagnostics by Percona
consultants
Get billed-per-hour work done more efficiently
Why (InnoDB) performance
and scalability?
In 2010, InnoDB was performing worse on a 4-core
machine than on 1-core one
And fixes were not forthcoming at the time
Addressed the need then, built the reputation since
Why not other features?
Feature benefit / feature cost ratio has to be very, very
high
Case 1: implement low-hanging fruits
Case 2: implement extremely beneficial features
No rewrites, no refactorings, no code base cleanups
“Why not other features”
brings us to lessons learned
Lesson 1: stand on the
shoulders of giants
You probably do not need to write a DBMS from
scratch
So find a good project to fork
Lesson 2: do not diverge
Do not add a single line of code difference without a very
good reason
Unless your engineering team is as big as the upstream
one
Improvements such as O(n2
) -> O(n log n) algorithms are
often not good enough in cold code paths
Plugins are very good
Lesson 3: listen to users
Easier said than done, especially if done right
Listening and then ignoring / downplaying users’ pain
Listening to wrong users
We have the best users! :)
$$$ / €€€ add weight to users’ opinions
Both right and wrong
Lesson 4: Continuous QC
Was not something Percona Server had on Day One
MySQL always had an automated feature/regression testsuite
But 3rd parties did not always add tests for their features
Step 1: require developers to actually run the testsuite
Step 2: Jenkins per-push
Step 3: …
Lesson 4: wrong ways and slightly
less wrong ways to do performance
A Performance Graph
0
10000
20000
30000
40000
Product A Product B
A Performance Graph
0
10000
20000
30000
40000
Product A Product B
PRODUCT B
IS BETTER !!1!
Same performance graph, different view
0
20000
40000
60000
80000
00:00 00:01 00:02 00:03 00:04 00:05 00:06
Product A Product B
Is Product B still better?
How to provision
capacity for B?
What response time
guarantee will it give?
Will your automated
failover work correctly in
the presence of stalls?
0
20000
40000
60000
80000
00:00 00:03 00:06
Engineering low variance >
engineering max peak performance
Where does variance come from anyway?
From the query code path requesting resources with variable
availability
C, C++, CPU, memory: caches, heap, mutexes, rwlocks
Memory/disk: data on disk, which could be cached
RDBMS: free space on WAL log etc
Client-server and clusters: network roundtrips
Database servers love being
in homeostasis
All the required resources for queries readily available
In the presence of unpredictable load
Do not make query threads work for this
Monitor them in background and make them available
as needed
In the presence of unpredictable workload
If you want to develop a
DBMS:
Find an existing one to fork!
And then do not diverge
Listen to your users
Control quality continuously
Ensure stable performance

More Related Content

What's hot

A Prophet in Production Shiri Hochhauser
A Prophet in Production   Shiri HochhauserA Prophet in Production   Shiri Hochhauser
A Prophet in Production Shiri Hochhauser
DevOpsDays Tel Aviv
 

What's hot (20)

Java Performance Mistakes
Java Performance MistakesJava Performance Mistakes
Java Performance Mistakes
 
How to explain DevOps to your mom
How to explain DevOps to your momHow to explain DevOps to your mom
How to explain DevOps to your mom
 
Web and App Performance: Top Problems to avoid to keep you out of the News
Web and App Performance: Top Problems to avoid to keep you out of the NewsWeb and App Performance: Top Problems to avoid to keep you out of the News
Web and App Performance: Top Problems to avoid to keep you out of the News
 
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and ScalabiltyDocker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
 
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
Application Quality Gates in Continuous Delivery: Deliver Better Software Fas...
 
Mobile User Experience: Auto Drive through Performance Metrics
Mobile User Experience:Auto Drive through Performance MetricsMobile User Experience:Auto Drive through Performance Metrics
Mobile User Experience: Auto Drive through Performance Metrics
 
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and TestersHugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
 
Sydney Continuous Delivery Meetup May 2014
Sydney Continuous Delivery Meetup May 2014Sydney Continuous Delivery Meetup May 2014
Sydney Continuous Delivery Meetup May 2014
 
Metrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
Metrics Driven DevOps - Automate Scalability and Performance Into your PipelineMetrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
Metrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
 
London WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance ProblemsLondon WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance Problems
 
HSPS 2015 - SharePoint Performance Santiy Checks
HSPS 2015 - SharePoint Performance Santiy ChecksHSPS 2015 - SharePoint Performance Santiy Checks
HSPS 2015 - SharePoint Performance Santiy Checks
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
 
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
 
Ride the database in JUnit tests with Database Rider
Ride the database in JUnit tests with Database RiderRide the database in JUnit tests with Database Rider
Ride the database in JUnit tests with Database Rider
 
JUG Poznan - 2017.01.31
JUG Poznan - 2017.01.31 JUG Poznan - 2017.01.31
JUG Poznan - 2017.01.31
 
A Prophet in Production Shiri Hochhauser
A Prophet in Production   Shiri HochhauserA Prophet in Production   Shiri Hochhauser
A Prophet in Production Shiri Hochhauser
 
Effectiveness tips from Kubernetes trenches by Captain Obvious
Effectiveness tips from Kubernetes trenches by Captain ObviousEffectiveness tips from Kubernetes trenches by Captain Obvious
Effectiveness tips from Kubernetes trenches by Captain Obvious
 
How to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsHow to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance Tips
 
(R)evolutionize APM
(R)evolutionize APM(R)evolutionize APM
(R)evolutionize APM
 
Lightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend Fast Data Platform
Lightbend Fast Data Platform
 

Viewers also liked

Οι δώδεκα θεοί του Ολύμπου (Δημήτρης και Ηλίας)
Οι δώδεκα θεοί του Ολύμπου (Δημήτρης και Ηλίας)Οι δώδεκα θεοί του Ολύμπου (Δημήτρης και Ηλίας)
Οι δώδεκα θεοί του Ολύμπου (Δημήτρης και Ηλίας)
ΕΛΕΝΗ ΚΑΛΕΥΡΑ
 
En el hall de entrada , se ha
En el hall de entrada , se haEn el hall de entrada , se ha
En el hall de entrada , se ha
laahhassy
 
Zorginnovatieforum 170909
Zorginnovatieforum 170909Zorginnovatieforum 170909
Zorginnovatieforum 170909
Chris Flim
 
Acta revisión tablas 2011
Acta revisión tablas 2011Acta revisión tablas 2011
Acta revisión tablas 2011
oscargaliza
 
Lauren Givens_Resume
Lauren Givens_ResumeLauren Givens_Resume
Lauren Givens_Resume
Lauren Givens
 

Viewers also liked (15)

Οι δώδεκα θεοί του Ολύμπου (Δημήτρης και Ηλίας)
Οι δώδεκα θεοί του Ολύμπου (Δημήτρης και Ηλίας)Οι δώδεκα θεοί του Ολύμπου (Δημήτρης και Ηλίας)
Οι δώδεκα θεοί του Ολύμπου (Δημήτρης και Ηλίας)
 
Rutger Teunissen Gamification Sowijs Presentatie
Rutger Teunissen Gamification Sowijs PresentatieRutger Teunissen Gamification Sowijs Presentatie
Rutger Teunissen Gamification Sowijs Presentatie
 
Χώρες του κόσμου (Δ1, Άγγελος)
Χώρες του κόσμου (Δ1, Άγγελος)Χώρες του κόσμου (Δ1, Άγγελος)
Χώρες του κόσμου (Δ1, Άγγελος)
 
Espec. 02-13
Espec. 02-13Espec. 02-13
Espec. 02-13
 
Chocolate de cacao
Chocolate de cacaoChocolate de cacao
Chocolate de cacao
 
Οι δώδεκα θεοί του Ολύμπου (Ηρακλής και Κωνσταντίνος)
Οι δώδεκα θεοί του Ολύμπου (Ηρακλής και Κωνσταντίνος)Οι δώδεκα θεοί του Ολύμπου (Ηρακλής και Κωνσταντίνος)
Οι δώδεκα θεοί του Ολύμπου (Ηρακλής και Κωνσταντίνος)
 
En el hall de entrada , se ha
En el hall de entrada , se haEn el hall de entrada , se ha
En el hall de entrada , se ha
 
Zorginnovatieforum 170909
Zorginnovatieforum 170909Zorginnovatieforum 170909
Zorginnovatieforum 170909
 
Acta revisión tablas 2011
Acta revisión tablas 2011Acta revisión tablas 2011
Acta revisión tablas 2011
 
Presenting social media_in_hotel
Presenting social media_in_hotelPresenting social media_in_hotel
Presenting social media_in_hotel
 
Community Voice Ltd Application Form
Community Voice Ltd Application FormCommunity Voice Ltd Application Form
Community Voice Ltd Application Form
 
Beauty care e attuale scenario dei consumi: fatti, cifre, tendenze di sviluppo
Beauty care e attuale scenario dei consumi: fatti, cifre, tendenze di sviluppoBeauty care e attuale scenario dei consumi: fatti, cifre, tendenze di sviluppo
Beauty care e attuale scenario dei consumi: fatti, cifre, tendenze di sviluppo
 
DbOps, DevOps and Ops
DbOps, DevOps and OpsDbOps, DevOps and Ops
DbOps, DevOps and Ops
 
Lauren Givens_Resume
Lauren Givens_ResumeLauren Givens_Resume
Lauren Givens_Resume
 
Imperialismo siglo XIX
Imperialismo siglo XIXImperialismo siglo XIX
Imperialismo siglo XIX
 

Similar to Developing a database server: software engineer's view

Kscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data PlatformKscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data Platform
Kyle Hailey
 
TechTalk_Cloud Performance Testing_0.6
TechTalk_Cloud Performance Testing_0.6TechTalk_Cloud Performance Testing_0.6
TechTalk_Cloud Performance Testing_0.6
Sravanthi N
 

Similar to Developing a database server: software engineer's view (20)

VMWare Wpg Jeff Franz-Lien
VMWare Wpg   Jeff Franz-LienVMWare Wpg   Jeff Franz-Lien
VMWare Wpg Jeff Franz-Lien
 
Kscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data PlatformKscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data Platform
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web Application
 
Refactoring to Microservices
Refactoring to MicroservicesRefactoring to Microservices
Refactoring to Microservices
 
test4
test4test4
test4
 
Web
WebWeb
Web
 
test4
test4test4
test4
 
test3
test3test3
test3
 
Become a Performance Diagnostics Hero
Become a Performance Diagnostics HeroBecome a Performance Diagnostics Hero
Become a Performance Diagnostics Hero
 
Accelerate application delivery with docker containers and windows server 2016
Accelerate application delivery with docker containers and windows server 2016Accelerate application delivery with docker containers and windows server 2016
Accelerate application delivery with docker containers and windows server 2016
 
Application Modernisation through Event-Driven Microservices
Application Modernisation through Event-Driven Microservices Application Modernisation through Event-Driven Microservices
Application Modernisation through Event-Driven Microservices
 
Scaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, GoalsScaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, Goals
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
 
Performance Analysis of Idle Programs
Performance Analysis of Idle ProgramsPerformance Analysis of Idle Programs
Performance Analysis of Idle Programs
 
JCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptxJCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptx
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More Defects
 
BGOUG "Agile Data: revolutionizing database cloning'
BGOUG  "Agile Data: revolutionizing database cloning'BGOUG  "Agile Data: revolutionizing database cloning'
BGOUG "Agile Data: revolutionizing database cloning'
 
OpenStack Nova - Developer Introduction
OpenStack Nova - Developer IntroductionOpenStack Nova - Developer Introduction
OpenStack Nova - Developer Introduction
 
TechTalk_Cloud Performance Testing_0.6
TechTalk_Cloud Performance Testing_0.6TechTalk_Cloud Performance Testing_0.6
TechTalk_Cloud Performance Testing_0.6
 
Scaling Databricks to Run Data and ML Workloads on Millions of VMs
Scaling Databricks to Run Data and ML Workloads on Millions of VMsScaling Databricks to Run Data and ML Workloads on Millions of VMs
Scaling Databricks to Run Data and ML Workloads on Millions of VMs
 

More from Laurynas Biveinis

Tracking Page Changes for Your Database and Bitmap Backups
Tracking Page Changes for Your Database and Bitmap BackupsTracking Page Changes for Your Database and Bitmap Backups
Tracking Page Changes for Your Database and Bitmap Backups
Laurynas Biveinis
 

More from Laurynas Biveinis (10)

Percona Server for MySQL 8.0 @ Percona Live 2019
Percona Server for MySQL 8.0 @ Percona Live 2019Percona Server for MySQL 8.0 @ Percona Live 2019
Percona Server for MySQL 8.0 @ Percona Live 2019
 
MySQL Ecosystem in 2018
MySQL Ecosystem in 2018MySQL Ecosystem in 2018
MySQL Ecosystem in 2018
 
Percona Server 8.0
Percona Server 8.0Percona Server 8.0
Percona Server 8.0
 
Percona Server 8.0
Percona Server 8.0Percona Server 8.0
Percona Server 8.0
 
Percona Server 5.7: Key Performance Algorithms
Percona Server 5.7: Key Performance AlgorithmsPercona Server 5.7: Key Performance Algorithms
Percona Server 5.7: Key Performance Algorithms
 
XtraDB 5.7: key performance algorithms
XtraDB 5.7: key performance algorithmsXtraDB 5.7: key performance algorithms
XtraDB 5.7: key performance algorithms
 
XtraDB 5.6 and 5.7: Key Performance Algorithms
XtraDB 5.6 and 5.7: Key Performance AlgorithmsXtraDB 5.6 and 5.7: Key Performance Algorithms
XtraDB 5.6 and 5.7: Key Performance Algorithms
 
Percona Server 5.6: Enterprise-Grade MySQL / PLMCE 2014
Percona Server 5.6: Enterprise-Grade MySQL / PLMCE 2014Percona Server 5.6: Enterprise-Grade MySQL / PLMCE 2014
Percona Server 5.6: Enterprise-Grade MySQL / PLMCE 2014
 
Fast Incremental Backups with Percona Server and Percona XtraBackup / PLMCE 2014
Fast Incremental Backups with Percona Server and Percona XtraBackup / PLMCE 2014Fast Incremental Backups with Percona Server and Percona XtraBackup / PLMCE 2014
Fast Incremental Backups with Percona Server and Percona XtraBackup / PLMCE 2014
 
Tracking Page Changes for Your Database and Bitmap Backups
Tracking Page Changes for Your Database and Bitmap BackupsTracking Page Changes for Your Database and Bitmap Backups
Tracking Page Changes for Your Database and Bitmap Backups
 

Recently uploaded

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
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...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
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
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 

Developing a database server: software engineer's view

  • 1. Developing a Database Server: Software Engineer’s View Laurynas Biveinis / Percona laurynas.biveinis@{gmail|percona}.com Big Data Strategy 2015 Vilnius
  • 2. Which database server? Percona Server http://www.percona.com/software/percona-server A drop-in compatible fork of MySQL An open-source, relational database management system Approaching 2,000,000 downloads
  • 3. A part of MySQL ecosystem Enabled by GNU General Public License Forks abound Healthy and thriving Lots of politics
  • 6. The main players, pt 3 Big Web Patches
  • 9. The ecosystem is fragmented, but is it healthy? One measure is code flow between the forks
  • 10. A case of super_read_only
  • 11. A case of super_read_only Facebook patch implemented it first Facebook contributed it to WebScaleSQL
  • 12. A case of super_read_only Facebook patch implemented it first Facebook contributed it to WebScaleSQL Percona Server merged it from WebScaleSQL, sent some bugfixes back to WebScaleSQL
  • 13. A case of super_read_only Facebook patch implemented it first Facebook contributed it to WebScaleSQL Percona Server merged it from WebScaleSQL, sent some bugfixes back to WebScaleSQL Oracle re-implemented it from scratch for the next major MySQL release
  • 14. A case of super_read_only Facebook patch implemented it first Facebook contributed it to WebScaleSQL Percona Server merged it from WebScaleSQL, sent some bugfixes back to WebScaleSQL Oracle re-implemented it from scratch for the next major MySQL release MariaDB did not like it
  • 15. Code is flowing (mostly) everywhere Coopetition
  • 16. Back to Percona Server Tracks MySQL closely Diagnostics and management Performance and scalability
  • 17. Why diagnostics and management? Early Percona Server: Ad-hoc patch for extra diagnostics by Percona consultants Get billed-per-hour work done more efficiently
  • 18. Why (InnoDB) performance and scalability? In 2010, InnoDB was performing worse on a 4-core machine than on 1-core one And fixes were not forthcoming at the time Addressed the need then, built the reputation since
  • 19. Why not other features? Feature benefit / feature cost ratio has to be very, very high Case 1: implement low-hanging fruits Case 2: implement extremely beneficial features No rewrites, no refactorings, no code base cleanups
  • 20. “Why not other features” brings us to lessons learned
  • 21. Lesson 1: stand on the shoulders of giants You probably do not need to write a DBMS from scratch So find a good project to fork
  • 22. Lesson 2: do not diverge Do not add a single line of code difference without a very good reason Unless your engineering team is as big as the upstream one Improvements such as O(n2 ) -> O(n log n) algorithms are often not good enough in cold code paths Plugins are very good
  • 23. Lesson 3: listen to users Easier said than done, especially if done right Listening and then ignoring / downplaying users’ pain Listening to wrong users We have the best users! :) $$$ / €€€ add weight to users’ opinions Both right and wrong
  • 24. Lesson 4: Continuous QC Was not something Percona Server had on Day One MySQL always had an automated feature/regression testsuite But 3rd parties did not always add tests for their features Step 1: require developers to actually run the testsuite Step 2: Jenkins per-push Step 3: …
  • 25. Lesson 4: wrong ways and slightly less wrong ways to do performance
  • 27. A Performance Graph 0 10000 20000 30000 40000 Product A Product B PRODUCT B IS BETTER !!1!
  • 28. Same performance graph, different view 0 20000 40000 60000 80000 00:00 00:01 00:02 00:03 00:04 00:05 00:06 Product A Product B
  • 29. Is Product B still better? How to provision capacity for B? What response time guarantee will it give? Will your automated failover work correctly in the presence of stalls? 0 20000 40000 60000 80000 00:00 00:03 00:06
  • 30. Engineering low variance > engineering max peak performance Where does variance come from anyway? From the query code path requesting resources with variable availability C, C++, CPU, memory: caches, heap, mutexes, rwlocks Memory/disk: data on disk, which could be cached RDBMS: free space on WAL log etc Client-server and clusters: network roundtrips
  • 31. Database servers love being in homeostasis All the required resources for queries readily available In the presence of unpredictable load Do not make query threads work for this Monitor them in background and make them available as needed In the presence of unpredictable workload
  • 32. If you want to develop a DBMS: Find an existing one to fork! And then do not diverge Listen to your users Control quality continuously Ensure stable performance