SlideShare a Scribd company logo
MongoDB Days Silicon Valley: A Technical Introduction to WiredTiger
WiredTiger MongoDB Integration
By: Osmar “Oz” Olivo
Product Manager
MongoDB Inc.
Agenda
• WiredTiger Integration
• Document Level Locking
• Compression
• Caching
Pluggable Storage Engines
• Vision
– One data model, one API, one set of operational
concerns
» Under the hood, many options for every use
case under the sun
Storage Engine Layer
Storage Engine Layer
Content
Repo
IoT Sensor
Backend
Ad Service
Customer
Analytics
Archive
MongoDB Query Language (MQL) + Native Drivers
MongoDB Document Data Model
MMAP V1 WT In-Memory ? ?
Future Possible Storage Engines
Management
Security
Beta in MongoDB
3.2
WiredTiger Integration
Why WT?
They’re Grrrreat!
Why WT?
• WT product and team acquired by MongoDB
– Authors former members of Berkeley DB team
– Standalone engine in use in production today
• WT addresses weaknesses of MMAPv1
– Compression
– Highly concurrent and enables full hardware utilization
– More tunable
Document Level Concurrency
Document Level Concurrency
• Improved Concurrency
– Uses various algorithms to minimize contention
between threads
– One thread yields on contention to same document
• Writes no longer block all other writes
• CPU utilization directly correlates with performance
Concurrency Model
MMAPv1 WiredTiger
W
W
R R R
W
R W RW
Relative Comparisons
5M Operations
Avg. Record size = 1k
10 Threads
Batch Size = 1000
12 Cores
SSD’s
Acknowledge Writes
WT
• 5M Documents Inserted
• RunTime: 46.3 seconds
• Throughput(ops/sec):
107,972.7
*Saturated SSD’s at ~2.25x
MMAP
• 5M Documents Inserted
• RunTime: 103.7 seconds
• Throughput(ops/sec):
48,213.2
Insert Only
WT
• Docs updated randomly
5M times
• RunTime:41.7 seconds
• Throughput(ops/sec):
119,817
*3.3x Faster
MMAP
• Docs updated randomly
5M times
• RunTime: 139.3 seconds
• Throughput(ops/sec):
35,903
Update Many
Update One
WT
• 1 Document updated 5M
times
• RunTime: 99.97 seconds
• Throughput(ops/sec):
50,014
MMAP
• 1 Document updated 5M
times
• RunTime: 90 seconds
• Throughput(ops/sec):
55,625
Compression
Compression (On by default)
• WT supports two compression algorithms
– snappy ( default)
• Good compression benefits with little
CPU/performance impact
– zlib
• Extremely good compression at a cost of additional
CPU/degraded performance
– Prefix compression
• Used for Indexes (on by default)
Sample Document
{
"_id" : ObjectId("5553a98ce4b02cf7150dee1f"),
"st" : "x+50600-002700",
"ts" : ISODate("1984-01-01T00:00:00Z"),
"position" : {
"type" : "Point",
"coordinates" : [
-2.7,
50.6
]
},
"elevation" : 9999,
"callLetters" : "BUOY",
"qualityControlProcess" : "V020",
"dataSource" : "4",
"type" : "FM-13",
"airTemperature" : {
"value" : 999.9,
"quality" : "9"
},
"dewPoint" : {
"value" : 999.9,
"quality" : "9"
},
"pressure" : {
"value" : 9999.9,
"quality" : "9"
},
"wind" : {
"direction" : {
"angle" : 999,
"quality" : "9"
},
"type" : "9",
"speed" : {
"rate" : 999.9,
"quality" : "9"
}
},
"visibility" : {
"distance" : {
"value" : 999999,
"quality" : "9"
},"variability" : {
"value" : "N",
"quality" : "9"}},
"skyCondition" : {
"ceilingHeight" : {
"value" : 99999,
"quality" : "9",
"determination" : "9"},
"cavok" : "N"},
"sections" : [
"AG1"
],
"precipitationEstimatedObservation" : {
"discrepancy" : "2",
"estimatedWaterDepth" : 0
}
}
MMAPv1
"ns" : "ncdc.data",
"count" : 33382365,
"size" : 58GB,
"avgObjSize" : 1887 Bytes,
"numExtents" : 51,
"storageSize" : 60GB,
"nindexes" : 1,
"totalIndexSize" : 1400MB,
"indexSizes" : {
"_id_" : 1400MB
}
WT (Snappy)
"ns" : "ncdc.data",
"count" : 33382365,
"size" : 44GB,
"avgObjSize" : 1419 Bytes,
"storageSize" : 8GB,
"nindexes" : 1,
"totalIndexSize" : 289MB,
"indexSizes" : {
"_id_" : 289MB
}
Data Size
WT (ZLIB)
"ns" : "ncdc.data",
"count" : 33382365,
"size" : 44GB,
"avgObjSize" : 1419 Bytes,
"storageSize" : 3GB,
"nindexes" : 1,
"totalIndexSize" : 289MB,
"indexSizes" : {
"_id_" : 289MB
},
Data Size
Caching
Caching
RAM
DISK
(compressed)
FS Cache
(compressed)
WT Cache
(uncompressed)
MongoD (WT)
Caching
• WT cache should be tuned to fit as much of the working set as
possible.
• When should I tune the WT cache down?
In Summary
• The 3 C’s of the WiredTiger Storage Engine
– Concurrency
– Compression
– Caching
Transparent To The Application
Content
Repo
IoT Sensor
Backend
Ad Service
Customer
Analytics
Archive
MongoDB Query Language (MQL) + Native Drivers
MongoDB Document Data Model
MMAP V1 WT In-Memory ? ?
Supported in MongoDB Future Possible Storage Engines
Management
Security
Beta in MongoDB
3.2
MongoDB Days Silicon Valley: A Technical Introduction to WiredTiger
Questions?
#MDBDays
mongodb.com
Get your technical questions answered
In the foyer, 10:00 - 5:00
By appointment only – register in person
Tell me how I did today on Guidebook and enter for a chance
to win one of these
How to do it:
Download the Guidebook App
Search for MongoDB Silicon Valley
Submit session feedback

More Related Content

POTX
WiredTiger MongoDB Integration
PPTX
Let the Tiger Roar! - MongoDB 3.0 + WiredTiger
PPTX
Webinar: Introduction to MongoDB 3.0
PDF
MongoDB Evenings Boston - An Update on MongoDB's WiredTiger Storage Engine
PDF
MongoDB WiredTiger Internals
PPTX
MongoDB Internals
PPTX
WiredTiger & What's New in 3.0
PDF
A Technical Introduction to WiredTiger
WiredTiger MongoDB Integration
Let the Tiger Roar! - MongoDB 3.0 + WiredTiger
Webinar: Introduction to MongoDB 3.0
MongoDB Evenings Boston - An Update on MongoDB's WiredTiger Storage Engine
MongoDB WiredTiger Internals
MongoDB Internals
WiredTiger & What's New in 3.0
A Technical Introduction to WiredTiger

What's hot (20)

PPTX
What's new in MongoDB 2.6
PDF
NoSQL benchmarking
PPTX
Running MongoDB 3.0 on AWS
PDF
Mongo db eveningschemadesign
PPTX
Beyond the Basics 1: Storage Engines
PDF
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
PDF
Rpsonmongodb
PPTX
MongoDB 101 & Beyond: Get Started in MongoDB 3.0, Preview 3.2 & Demo of Ops M...
PPTX
MMS - Monitoring, backup and management at a single click
PPTX
WiredTiger Overview
PDF
MongoDB Capacity Planning
PDF
MongoDB Introduction talk at Dr Dobbs Conference, MongoDB Evenings at Bangalo...
PDF
Let the Tiger Roar - MongoDB 3.0
PPTX
Concurrency Control in MongoDB 3.0
PDF
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
PPTX
An Introduction to MongoDB Compass
PPTX
Sizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-Final
PDF
MongoDB Administration 101
PPTX
Agility and Scalability with MongoDB
PPTX
Premiers pas avec Ops Manager
What's new in MongoDB 2.6
NoSQL benchmarking
Running MongoDB 3.0 on AWS
Mongo db eveningschemadesign
Beyond the Basics 1: Storage Engines
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
Rpsonmongodb
MongoDB 101 & Beyond: Get Started in MongoDB 3.0, Preview 3.2 & Demo of Ops M...
MMS - Monitoring, backup and management at a single click
WiredTiger Overview
MongoDB Capacity Planning
MongoDB Introduction talk at Dr Dobbs Conference, MongoDB Evenings at Bangalo...
Let the Tiger Roar - MongoDB 3.0
Concurrency Control in MongoDB 3.0
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
An Introduction to MongoDB Compass
Sizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-Final
MongoDB Administration 101
Agility and Scalability with MongoDB
Premiers pas avec Ops Manager
Ad

Similar to MongoDB Days Silicon Valley: A Technical Introduction to WiredTiger (18)

PDF
MongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
PPTX
Understanding and tuning WiredTiger, the new high performance database engine...
PPTX
Let the Tiger Roar!
PDF
Mongo db3.0 wired_tiger_storage_engine
PPTX
Mongo db v3_deep_dive
PPTX
What'sNnew in 3.0 Webinar
PDF
Introduction to new high performance storage engines in mongodb 3.0
PPTX
MongoDB World 2015 - A Technical Introduction to WiredTiger
PDF
MongoDB World 2016: The Best IoT Analytics with MongoDB
PDF
MongoDB Engines: Demystified
PPTX
Beyond the Basics 1: Storage Engines
PDF
WiredTiger In-Memory vs WiredTiger B-Tree
PDF
Webinar: Schema Patterns and Your Storage Engine
PPTX
Conceptos Avanzados 1: Motores de Almacenamiento
PDF
A Century Of Weather Data - Midwest.io
PDF
MongoDB World 2018: Transactions and Durability: Putting the “D” in ACID
PDF
Storage dei dati con MongoDB
PPTX
MongoDB 3.2 - a giant leap. What’s new?
MongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
Understanding and tuning WiredTiger, the new high performance database engine...
Let the Tiger Roar!
Mongo db3.0 wired_tiger_storage_engine
Mongo db v3_deep_dive
What'sNnew in 3.0 Webinar
Introduction to new high performance storage engines in mongodb 3.0
MongoDB World 2015 - A Technical Introduction to WiredTiger
MongoDB World 2016: The Best IoT Analytics with MongoDB
MongoDB Engines: Demystified
Beyond the Basics 1: Storage Engines
WiredTiger In-Memory vs WiredTiger B-Tree
Webinar: Schema Patterns and Your Storage Engine
Conceptos Avanzados 1: Motores de Almacenamiento
A Century Of Weather Data - Midwest.io
MongoDB World 2018: Transactions and Durability: Putting the “D” in ACID
Storage dei dati con MongoDB
MongoDB 3.2 - a giant leap. What’s new?
Ad

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)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Cloud computing and distributed systems.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Big Data Technologies - Introduction.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Review of recent advances in non-invasive hemoglobin estimation
Per capita expenditure prediction using model stacking based on satellite ima...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Reach Out and Touch Someone: Haptics and Empathic Computing
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Cloud computing and distributed systems.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Chapter 3 Spatial Domain Image Processing.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation_ Review paper, used for researhc scholars
Diabetes mellitus diagnosis method based random forest with bat algorithm
20250228 LYD VKU AI Blended-Learning.pptx
Big Data Technologies - Introduction.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”

MongoDB Days Silicon Valley: A Technical Introduction to WiredTiger

  • 2. WiredTiger MongoDB Integration By: Osmar “Oz” Olivo Product Manager MongoDB Inc.
  • 3. Agenda • WiredTiger Integration • Document Level Locking • Compression • Caching
  • 5. • Vision – One data model, one API, one set of operational concerns » Under the hood, many options for every use case under the sun Storage Engine Layer
  • 6. Storage Engine Layer Content Repo IoT Sensor Backend Ad Service Customer Analytics Archive MongoDB Query Language (MQL) + Native Drivers MongoDB Document Data Model MMAP V1 WT In-Memory ? ? Future Possible Storage Engines Management Security Beta in MongoDB 3.2
  • 9. Why WT? • WT product and team acquired by MongoDB – Authors former members of Berkeley DB team – Standalone engine in use in production today • WT addresses weaknesses of MMAPv1 – Compression – Highly concurrent and enables full hardware utilization – More tunable
  • 11. Document Level Concurrency • Improved Concurrency – Uses various algorithms to minimize contention between threads – One thread yields on contention to same document • Writes no longer block all other writes • CPU utilization directly correlates with performance
  • 13. Relative Comparisons 5M Operations Avg. Record size = 1k 10 Threads Batch Size = 1000 12 Cores SSD’s Acknowledge Writes
  • 14. WT • 5M Documents Inserted • RunTime: 46.3 seconds • Throughput(ops/sec): 107,972.7 *Saturated SSD’s at ~2.25x MMAP • 5M Documents Inserted • RunTime: 103.7 seconds • Throughput(ops/sec): 48,213.2 Insert Only
  • 15. WT • Docs updated randomly 5M times • RunTime:41.7 seconds • Throughput(ops/sec): 119,817 *3.3x Faster MMAP • Docs updated randomly 5M times • RunTime: 139.3 seconds • Throughput(ops/sec): 35,903 Update Many
  • 16. Update One WT • 1 Document updated 5M times • RunTime: 99.97 seconds • Throughput(ops/sec): 50,014 MMAP • 1 Document updated 5M times • RunTime: 90 seconds • Throughput(ops/sec): 55,625
  • 18. Compression (On by default) • WT supports two compression algorithms – snappy ( default) • Good compression benefits with little CPU/performance impact – zlib • Extremely good compression at a cost of additional CPU/degraded performance – Prefix compression • Used for Indexes (on by default)
  • 19. Sample Document { "_id" : ObjectId("5553a98ce4b02cf7150dee1f"), "st" : "x+50600-002700", "ts" : ISODate("1984-01-01T00:00:00Z"), "position" : { "type" : "Point", "coordinates" : [ -2.7, 50.6 ] }, "elevation" : 9999, "callLetters" : "BUOY", "qualityControlProcess" : "V020", "dataSource" : "4", "type" : "FM-13", "airTemperature" : { "value" : 999.9, "quality" : "9" }, "dewPoint" : { "value" : 999.9, "quality" : "9" }, "pressure" : { "value" : 9999.9, "quality" : "9" }, "wind" : { "direction" : { "angle" : 999, "quality" : "9" }, "type" : "9", "speed" : { "rate" : 999.9, "quality" : "9" } }, "visibility" : { "distance" : { "value" : 999999, "quality" : "9" },"variability" : { "value" : "N", "quality" : "9"}}, "skyCondition" : { "ceilingHeight" : { "value" : 99999, "quality" : "9", "determination" : "9"}, "cavok" : "N"}, "sections" : [ "AG1" ], "precipitationEstimatedObservation" : { "discrepancy" : "2", "estimatedWaterDepth" : 0 } }
  • 20. MMAPv1 "ns" : "ncdc.data", "count" : 33382365, "size" : 58GB, "avgObjSize" : 1887 Bytes, "numExtents" : 51, "storageSize" : 60GB, "nindexes" : 1, "totalIndexSize" : 1400MB, "indexSizes" : { "_id_" : 1400MB } WT (Snappy) "ns" : "ncdc.data", "count" : 33382365, "size" : 44GB, "avgObjSize" : 1419 Bytes, "storageSize" : 8GB, "nindexes" : 1, "totalIndexSize" : 289MB, "indexSizes" : { "_id_" : 289MB } Data Size
  • 21. WT (ZLIB) "ns" : "ncdc.data", "count" : 33382365, "size" : 44GB, "avgObjSize" : 1419 Bytes, "storageSize" : 3GB, "nindexes" : 1, "totalIndexSize" : 289MB, "indexSizes" : { "_id_" : 289MB }, Data Size
  • 24. Caching • WT cache should be tuned to fit as much of the working set as possible. • When should I tune the WT cache down?
  • 25. In Summary • The 3 C’s of the WiredTiger Storage Engine – Concurrency – Compression – Caching
  • 26. Transparent To The Application Content Repo IoT Sensor Backend Ad Service Customer Analytics Archive MongoDB Query Language (MQL) + Native Drivers MongoDB Document Data Model MMAP V1 WT In-Memory ? ? Supported in MongoDB Future Possible Storage Engines Management Security Beta in MongoDB 3.2
  • 29. #MDBDays mongodb.com Get your technical questions answered In the foyer, 10:00 - 5:00 By appointment only – register in person
  • 30. Tell me how I did today on Guidebook and enter for a chance to win one of these How to do it: Download the Guidebook App Search for MongoDB Silicon Valley Submit session feedback