SlideShare a Scribd company logo
MongoDB’s best driver
John Page - Principal Consulting Engineer
The nature of Drivers
#MDBE16
What does a MongoDB Driver do?
•  Idiomatic API
•  Service Discovery and High Availability
•  Authentication
•  Wire protocol version abstraction
This is non trivial work – drivers are not thin wrappers.
#MDBE16
What does a MongoDB Driver do?
•  Idiomatic API
•  Service Discovery and High Availability
•  Authentication
•  Wire protocol version abstraction
#MDBE16
What Languages have Drivers
Python
PerlJavaScript
#MDBE16
Idiomatic API - Write
Data
Source
Map /
Object
db.coll.insert(Map)
BSON
Bytes
TCP
Data
#MDBE16
Idiomatic API - Read
TCP
Data
BSON
Bytes
db.coll.find()
Map /
Object
Field
Value
#MDBE16
Idiomatic API – Read Optimisations
TCP
Data
BSON
Bytes
db.coll.find()
Field
Value
Lazy
BSON
#MDBE16
High Data Throughput Workloads
•  Data Loading
•  Data Conversion
•  External Analysis / Reporting
•  Sensors and Internet Things
Reads/Writes from 10s to 100s MB/s
#MDBE16
Motivation for Measuring this
•  POC Benchmark stories
•  Shell Loops
•  YCSB
•  Consulting Experiences
•  Application Benchmarks and Sizing
#MDBE16
Quick Summary
•  Drivers do a number of things.
•  Different Languages need different things done.
•  Languages can vary in costs to write, maintain and run.
•  We want to know the relative difference for the run part.
Designing a Benchmark
#MDBE16
Things to be aware of
•  Experience.
•  It’s a non trivial undertaking.
•  Bias and Benchmarketing.
•  Be aware of conscious and unconscious bias.
•  Seek Assistance and Consensus.
#MDBE16
Our Client Benchmark
CRU (!D)
•  Insert 1,000,000 ~8K records.
•  Retrieve 1 field from each from the DB.
•  Modify each changing each String field.
Not using Aggregation, Projection or update modifiers.
#MDBE16
Architecture
Client (Fixed and Smallish)
•  4 Xeon 2.5GHz CPU cores
•  16GB RAM
•  10GB/s Network to server.
•  10GB/s switch
Server
•  MongoDB 3.2
•  WiredTiger – no journal
•  Local SSD
•  32 Xeon 2.5GHz Cores
•  250GB RAM
•  10GB/s Network to client.
#MDBE16
Measurables
What numbers are we interested in
•  Straight line speed.
•  Single Thread
•  Create (records/s)
•  Read (records/s)
•  Update (records/s)
•  Max throughput.
•  Multi Thread/Process (records/s)
Results
#MDBE16
Javascript – Mongo Shell and Node.JS
0
10000
20000
30000
40000
50000
60000
70000
80000
90000
Shell Linear Shell Parallel Node.js linear Node.js Parallel
Operations per Second
Create Read Update
#MDBE16
Javascript – Mongo Shell and Node.JS
0
10000
20000
30000
40000
50000
60000
70000
80000
90000
Shell Linear Shell Parallel Node.js linear Node.js Parallel
Operations per Second
Create Read Update
#MDBE16
Javascript – Mongo Shell and Node.JS
0
5000
10000
15000
20000
25000
30000
Shell Linear Shell Parallel Node.js linear Node.js Parallel
Operations per Second
Create Read Update
#MDBE16
Node versus Python– the hipster dichotomy
0
5000
10000
15000
20000
25000
30000
Node.js linear Node.js Parallel
Operations per Second
Create Read Update
#MDBE16
Node versus Python– the hipster dichotomy
0
5000
10000
15000
20000
25000
30000
Node.js linear Node.js Parallel Python linear Python parallel
Operations per Second
Create Read Update
#MDBE16
Node versus Python with C extensions
0
5000
10000
15000
20000
25000
30000
Node.js linear Node.js Parallel Python w. C linear Python w. C parallel
Operations per Second
Create Read Update
#MDBE16
Java 8 – the corporate favourite
0
5000
10000
15000
20000
25000
30000
35000
40000
Java 8 linear Java 8 parallel
Operations per Second
Create Read Update
#MDBE16
Java 8 on Linux versus Java 8 on Windows
0
5000
10000
15000
20000
25000
30000
35000
40000
Java 8 linear Java 8 parallel Java 8 linear(win) Java 8 parallel (win)
Operations per Second
Create Read Update
#MDBE16
Java 8 on Windows versus C#
0
5000
10000
15000
20000
25000
30000
35000
40000
Java 8 linear(win) Java 8 parallel (win) C# linear C# parallel
Operations per Second
Create Read Update
#MDBE16
Java 8 on Windows versus C#
0
5000
10000
15000
20000
25000
30000
35000
40000
Java 8 linear(win) Java 8 parallel (win) C# linear C# parallel
Operations per Second
Create Read Update
#MDBE16
C# on Windows versus C# on Linux!
0
5000
10000
15000
20000
25000
30000
35000
40000
C# linear C# parallel Dotnet Core liner DotNet Core Parallel
Operations per Second
Create Read Update
#MDBE16
Java 8 on Linux versus Morphia ODM
0
5000
10000
15000
20000
25000
30000
35000
40000
Java 8 linear Java 8 parallel Morphia linear Morphia parallel
Operations per Second
Create Read Update
#MDBE16
C – the classic choice
0
20000
40000
60000
80000
100000
120000
140000
160000
180000
C linear C Parallel
Operations per Second
Create Read Update
#MDBE16
C – the classic choice versus Go ‘The new C’
0
20000
40000
60000
80000
100000
120000
140000
160000
180000
C linear C Parallel GoLang Linear GoLang Parallel
Operations per Second
Create Read Update
#MDBE16
Java 8 on Linux versus C
0
20000
40000
60000
80000
100000
120000
140000
160000
180000
Java 8 linear Java 8 parallel C linear C Parallel
Operation per Second
Create Read Update
#MDBE16
Java 8 on Linux versus PHP 7 – the surprise
0
5000
10000
15000
20000
25000
30000
35000
40000
Java 8 linear Java 8 parallel PHP 7 linear PHP 7 parallel
Operations per Second
Create Read Update
#MDBE16
Create speed
0
5,000
10,000
15,000
20,000
25,000
30,000
35,000
40,000
45,000
C Java Threaded PHP 7 Java (on Win) GoLang Morphia Python with C
Extensions
Node.JS CSharp
Operations per Second
Create
#MDBE16
Read speed
0
20,000
40,000
60,000
80,000
100,000
120,000
140,000
160,000
180,000
C Shell PHP 7 Java Threaded Python with C
Extensions
Java (on Win) GoLang Node.JS Morphia
Operations per Second.
Read
What does that mean?
#MDBE16
Back in the real world
•  Database backend upgrade for logistics company
•  Schema conversion
•  Unacceptable 8 hours of downtime planned
•  Rewrite in C
•  40 mins downtime.
•  Regular bulk load of JSON Ecommerce data (>500GB)
•  From 35 minutes using mongoimport ( written in Go )
•  To 7 minutes with custom loader.
#MDBE16
Don’t be British!
•  If you aren’t using one ‘fast’ language, maybe you should.
•  If you aren’t using one dynamic language – go experience the joy.
•  Be a polyglot when you are working with MongoDB.
•  The API’s are really similar to make it easy.
•  A single language SLOW and LOUD isn’t always best.
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?

More Related Content

PDF
MongoDB Europe 2016 - Deploying MongoDB on NetApp storage
PDF
MongoDB Europe 2016 - Ops Manager and Cloud Manager
PDF
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
PPTX
MongoDB 3.4 webinar
PPTX
Powering Microservices with MongoDB, Docker, Kubernetes & Kafka – MongoDB Eur...
PPTX
Conceptos Avanzados 1: Motores de Almacenamiento
PPTX
The rise of microservices - containers and orchestration
PPTX
Using Compass to Diagnose Performance Problems in Your Cluster
MongoDB Europe 2016 - Deploying MongoDB on NetApp storage
MongoDB Europe 2016 - Ops Manager and Cloud Manager
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB 3.4 webinar
Powering Microservices with MongoDB, Docker, Kubernetes & Kafka – MongoDB Eur...
Conceptos Avanzados 1: Motores de Almacenamiento
The rise of microservices - containers and orchestration
Using Compass to Diagnose Performance Problems in Your Cluster

What's hot (20)

PPTX
Data Streaming with Apache Kafka & MongoDB - EMEA
PPTX
Sizing Your MongoDB Cluster
PDF
How We Fixed Our MongoDB Problems
PPTX
Experian Health: Moving Universal Identity Manager from ANSI SQL to MongoDB
PPTX
Practical Design Patterns for Building Applications Resilient to Infrastructu...
PPTX
AWS Lambda, Step Functions & MongoDB Atlas Tutorial
PPTX
Replacing Traditional Technologies with MongoDB: A Single Platform for All Fi...
PPTX
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB present...
PPTX
Introduction to MongoDB Enterprise
PDF
Webinar: Serverless Architectures with AWS Lambda and MongoDB Atlas
PPTX
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
PPTX
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
PPTX
GridFS: The Perfect Solution for Media Storage
PPTX
Building a Scalable and Modern Infrastructure at CARFAX
PPTX
An Introduction to MongoDB Ops Manager
PPTX
Designing Cloud Products
PPTX
Beyond the Basics 1: Storage Engines
PDF
MongoDB .local London 2019: Modern Data Backup and Recovery from On-premises ...
PDF
A Mobile-First, Cloud-First Stack at Pearson
PPTX
Key Performance Indicators for Managing MongoDB and Recommended Production Co...
Data Streaming with Apache Kafka & MongoDB - EMEA
Sizing Your MongoDB Cluster
How We Fixed Our MongoDB Problems
Experian Health: Moving Universal Identity Manager from ANSI SQL to MongoDB
Practical Design Patterns for Building Applications Resilient to Infrastructu...
AWS Lambda, Step Functions & MongoDB Atlas Tutorial
Replacing Traditional Technologies with MongoDB: A Single Platform for All Fi...
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB present...
Introduction to MongoDB Enterprise
Webinar: Serverless Architectures with AWS Lambda and MongoDB Atlas
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
GridFS: The Perfect Solution for Media Storage
Building a Scalable and Modern Infrastructure at CARFAX
An Introduction to MongoDB Ops Manager
Designing Cloud Products
Beyond the Basics 1: Storage Engines
MongoDB .local London 2019: Modern Data Backup and Recovery from On-premises ...
A Mobile-First, Cloud-First Stack at Pearson
Key Performance Indicators for Managing MongoDB and Recommended Production Co...
Ad

Viewers also liked (20)

PDF
MongoDB Europe 2016 - MongoDB Atlas
PDF
MongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCF
PDF
MongoDB Europe 2016 - Building WiredTiger
PDF
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
PDF
MongoDB Europe 2016 - Big Data meets Big Compute
PDF
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
PDF
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
PDF
MongoDB Europe 2016 - Distributed Ledgers, Blockchain + MongoDB
PDF
James Tan (MongoDB) - Automate Production-Ready MongoDB Deployments
PDF
MongoDB Europe 2016 - Warehousing MongoDB Data using Apache Beam and BigQuery
PPTX
Webinar: Backups + Disaster Recovery
PDF
MongoDB Launchpad 2016: Moving Cybersecurity to the Cloud
PDF
MongoDB Europe 2016 - Using MongoDB to Build a Fast and Scalable Content Repo...
PPT
Testing Java EE Applications Using Arquillian
PPTX
L’architettura di Classe Enterprise di Nuova Generazione
PDF
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
PDF
MongoDB Europe 2016 - Debugging MongoDB Performance
PPTX
Webinar: Data Streaming with Apache Kafka & MongoDB
PDF
MongoDB Europe 2016 - MongoDB 3.4 preview and introduction to MongoDB Atlas
PDF
MongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB Europe 2016 - MongoDB Atlas
MongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCF
MongoDB Europe 2016 - Building WiredTiger
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB Europe 2016 - Big Data meets Big Compute
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
MongoDB Europe 2016 - Distributed Ledgers, Blockchain + MongoDB
James Tan (MongoDB) - Automate Production-Ready MongoDB Deployments
MongoDB Europe 2016 - Warehousing MongoDB Data using Apache Beam and BigQuery
Webinar: Backups + Disaster Recovery
MongoDB Launchpad 2016: Moving Cybersecurity to the Cloud
MongoDB Europe 2016 - Using MongoDB to Build a Fast and Scalable Content Repo...
Testing Java EE Applications Using Arquillian
L’architettura di Classe Enterprise di Nuova Generazione
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB Europe 2016 - Debugging MongoDB Performance
Webinar: Data Streaming with Apache Kafka & MongoDB
MongoDB Europe 2016 - MongoDB 3.4 preview and introduction to MongoDB Atlas
MongoDB Europe 2016 - Graph Operations with MongoDB
Ad

Similar to MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best? (20)

PPTX
Mongodb Presentation
PPTX
Mongodb hashim shaikh
PPTX
JavaScript on the server - Node.js
PDF
High performance json- postgre sql vs. mongodb
PPTX
Mongodb Presentation
PDF
QCon Shanghai: Trends in Application Development
PDF
A Brief Introduction: MongoDB
PDF
Mongodb Introduction
PDF
Node Js, AngularJs and Express Js Tutorial
PPT
Ops Jumpstart: MongoDB Administration 101
PDF
PGConf APAC 2018 - High performance json postgre-sql vs. mongodb
PPTX
After the LAMP, it's time to get MEAN
PPTX
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
PPTX
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
PDF
Introduction to MongoDB Basics from SQL to NoSQL
PDF
MongoDB for Oracle Experts - OUGF Harmony 2014
PPTX
Mongo db operations_v2
PPTX
Python And The MySQL X DevAPI - PyCaribbean 2019
PDF
JavaOne 2014: Java vs JavaScript
PDF
MySQL 8.0, what's new ? - Forum PHP 2018
Mongodb Presentation
Mongodb hashim shaikh
JavaScript on the server - Node.js
High performance json- postgre sql vs. mongodb
Mongodb Presentation
QCon Shanghai: Trends in Application Development
A Brief Introduction: MongoDB
Mongodb Introduction
Node Js, AngularJs and Express Js Tutorial
Ops Jumpstart: MongoDB Administration 101
PGConf APAC 2018 - High performance json postgre-sql vs. mongodb
After the LAMP, it's time to get MEAN
PHP, The X DevAPI, and the MySQL Document Store -- Benelux PHP Confernece 2019
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
Introduction to MongoDB Basics from SQL to NoSQL
MongoDB for Oracle Experts - OUGF Harmony 2014
Mongo db operations_v2
Python And The MySQL X DevAPI - PyCaribbean 2019
JavaOne 2014: Java vs JavaScript
MySQL 8.0, what's new ? - Forum PHP 2018

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...

Recently uploaded (20)

PPTX
Global journeys: estimating international migration
PPTX
climate analysis of Dhaka ,Banglades.pptx
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
PDF
Mega Projects Data Mega Projects Data
PPTX
Moving the Public Sector (Government) to a Digital Adoption
PPTX
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
PDF
Lecture1 pattern recognition............
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PDF
Introduction to Business Data Analytics.
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PDF
“Getting Started with Data Analytics Using R – Concepts, Tools & Case Studies”
PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
Global journeys: estimating international migration
climate analysis of Dhaka ,Banglades.pptx
Introduction to Knowledge Engineering Part 1
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
IBA_Chapter_11_Slides_Final_Accessible.pptx
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
Mega Projects Data Mega Projects Data
Moving the Public Sector (Government) to a Digital Adoption
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
Lecture1 pattern recognition............
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
Introduction to Business Data Analytics.
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Galatica Smart Energy Infrastructure Startup Pitch Deck
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
Acceptance and paychological effects of mandatory extra coach I classes.pptx
“Getting Started with Data Analytics Using R – Concepts, Tools & Case Studies”
oil_refinery_comprehensive_20250804084928 (1).pptx

MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?

  • 1. MongoDB’s best driver John Page - Principal Consulting Engineer
  • 2. The nature of Drivers
  • 3. #MDBE16 What does a MongoDB Driver do? •  Idiomatic API •  Service Discovery and High Availability •  Authentication •  Wire protocol version abstraction This is non trivial work – drivers are not thin wrappers.
  • 4. #MDBE16 What does a MongoDB Driver do? •  Idiomatic API •  Service Discovery and High Availability •  Authentication •  Wire protocol version abstraction
  • 5. #MDBE16 What Languages have Drivers Python PerlJavaScript
  • 6. #MDBE16 Idiomatic API - Write Data Source Map / Object db.coll.insert(Map) BSON Bytes TCP Data
  • 7. #MDBE16 Idiomatic API - Read TCP Data BSON Bytes db.coll.find() Map / Object Field Value
  • 8. #MDBE16 Idiomatic API – Read Optimisations TCP Data BSON Bytes db.coll.find() Field Value Lazy BSON
  • 9. #MDBE16 High Data Throughput Workloads •  Data Loading •  Data Conversion •  External Analysis / Reporting •  Sensors and Internet Things Reads/Writes from 10s to 100s MB/s
  • 10. #MDBE16 Motivation for Measuring this •  POC Benchmark stories •  Shell Loops •  YCSB •  Consulting Experiences •  Application Benchmarks and Sizing
  • 11. #MDBE16 Quick Summary •  Drivers do a number of things. •  Different Languages need different things done. •  Languages can vary in costs to write, maintain and run. •  We want to know the relative difference for the run part.
  • 13. #MDBE16 Things to be aware of •  Experience. •  It’s a non trivial undertaking. •  Bias and Benchmarketing. •  Be aware of conscious and unconscious bias. •  Seek Assistance and Consensus.
  • 14. #MDBE16 Our Client Benchmark CRU (!D) •  Insert 1,000,000 ~8K records. •  Retrieve 1 field from each from the DB. •  Modify each changing each String field. Not using Aggregation, Projection or update modifiers.
  • 15. #MDBE16 Architecture Client (Fixed and Smallish) •  4 Xeon 2.5GHz CPU cores •  16GB RAM •  10GB/s Network to server. •  10GB/s switch Server •  MongoDB 3.2 •  WiredTiger – no journal •  Local SSD •  32 Xeon 2.5GHz Cores •  250GB RAM •  10GB/s Network to client.
  • 16. #MDBE16 Measurables What numbers are we interested in •  Straight line speed. •  Single Thread •  Create (records/s) •  Read (records/s) •  Update (records/s) •  Max throughput. •  Multi Thread/Process (records/s)
  • 18. #MDBE16 Javascript – Mongo Shell and Node.JS 0 10000 20000 30000 40000 50000 60000 70000 80000 90000 Shell Linear Shell Parallel Node.js linear Node.js Parallel Operations per Second Create Read Update
  • 19. #MDBE16 Javascript – Mongo Shell and Node.JS 0 10000 20000 30000 40000 50000 60000 70000 80000 90000 Shell Linear Shell Parallel Node.js linear Node.js Parallel Operations per Second Create Read Update
  • 20. #MDBE16 Javascript – Mongo Shell and Node.JS 0 5000 10000 15000 20000 25000 30000 Shell Linear Shell Parallel Node.js linear Node.js Parallel Operations per Second Create Read Update
  • 21. #MDBE16 Node versus Python– the hipster dichotomy 0 5000 10000 15000 20000 25000 30000 Node.js linear Node.js Parallel Operations per Second Create Read Update
  • 22. #MDBE16 Node versus Python– the hipster dichotomy 0 5000 10000 15000 20000 25000 30000 Node.js linear Node.js Parallel Python linear Python parallel Operations per Second Create Read Update
  • 23. #MDBE16 Node versus Python with C extensions 0 5000 10000 15000 20000 25000 30000 Node.js linear Node.js Parallel Python w. C linear Python w. C parallel Operations per Second Create Read Update
  • 24. #MDBE16 Java 8 – the corporate favourite 0 5000 10000 15000 20000 25000 30000 35000 40000 Java 8 linear Java 8 parallel Operations per Second Create Read Update
  • 25. #MDBE16 Java 8 on Linux versus Java 8 on Windows 0 5000 10000 15000 20000 25000 30000 35000 40000 Java 8 linear Java 8 parallel Java 8 linear(win) Java 8 parallel (win) Operations per Second Create Read Update
  • 26. #MDBE16 Java 8 on Windows versus C# 0 5000 10000 15000 20000 25000 30000 35000 40000 Java 8 linear(win) Java 8 parallel (win) C# linear C# parallel Operations per Second Create Read Update
  • 27. #MDBE16 Java 8 on Windows versus C# 0 5000 10000 15000 20000 25000 30000 35000 40000 Java 8 linear(win) Java 8 parallel (win) C# linear C# parallel Operations per Second Create Read Update
  • 28. #MDBE16 C# on Windows versus C# on Linux! 0 5000 10000 15000 20000 25000 30000 35000 40000 C# linear C# parallel Dotnet Core liner DotNet Core Parallel Operations per Second Create Read Update
  • 29. #MDBE16 Java 8 on Linux versus Morphia ODM 0 5000 10000 15000 20000 25000 30000 35000 40000 Java 8 linear Java 8 parallel Morphia linear Morphia parallel Operations per Second Create Read Update
  • 30. #MDBE16 C – the classic choice 0 20000 40000 60000 80000 100000 120000 140000 160000 180000 C linear C Parallel Operations per Second Create Read Update
  • 31. #MDBE16 C – the classic choice versus Go ‘The new C’ 0 20000 40000 60000 80000 100000 120000 140000 160000 180000 C linear C Parallel GoLang Linear GoLang Parallel Operations per Second Create Read Update
  • 32. #MDBE16 Java 8 on Linux versus C 0 20000 40000 60000 80000 100000 120000 140000 160000 180000 Java 8 linear Java 8 parallel C linear C Parallel Operation per Second Create Read Update
  • 33. #MDBE16 Java 8 on Linux versus PHP 7 – the surprise 0 5000 10000 15000 20000 25000 30000 35000 40000 Java 8 linear Java 8 parallel PHP 7 linear PHP 7 parallel Operations per Second Create Read Update
  • 34. #MDBE16 Create speed 0 5,000 10,000 15,000 20,000 25,000 30,000 35,000 40,000 45,000 C Java Threaded PHP 7 Java (on Win) GoLang Morphia Python with C Extensions Node.JS CSharp Operations per Second Create
  • 35. #MDBE16 Read speed 0 20,000 40,000 60,000 80,000 100,000 120,000 140,000 160,000 180,000 C Shell PHP 7 Java Threaded Python with C Extensions Java (on Win) GoLang Node.JS Morphia Operations per Second. Read
  • 36. What does that mean?
  • 37. #MDBE16 Back in the real world •  Database backend upgrade for logistics company •  Schema conversion •  Unacceptable 8 hours of downtime planned •  Rewrite in C •  40 mins downtime. •  Regular bulk load of JSON Ecommerce data (>500GB) •  From 35 minutes using mongoimport ( written in Go ) •  To 7 minutes with custom loader.
  • 38. #MDBE16 Don’t be British! •  If you aren’t using one ‘fast’ language, maybe you should. •  If you aren’t using one dynamic language – go experience the joy. •  Be a polyglot when you are working with MongoDB. •  The API’s are really similar to make it easy. •  A single language SLOW and LOUD isn’t always best.