SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
Implications of MongoDB’s
“usePowerOf2Sizes” Feature

Introduction
Problem Use Case
Activating “usePowerOf2Sizes”
Testing Approach
Analysis of Test Results
Pete Whitney, VP Cloud Development, FireScope, Inc.
Problematic Use Case

Insert document
Append to document
Append to document
Append to document
Delete document
Repeat
Pete Whitney, VP Cloud Development, FireScope, Inc.
Activating usePowerOf2Sizes

Example shell command to
activate usePowerOf2Sizes:
db.runCommand( { collMod : “collection_name",
usePowerOf2Sizes : true } );

Pete Whitney, VP Cloud Development, FireScope, Inc.
Is usePowerOf2Sizes set?

To view the setting of
usePowerOf2Sizes:
db.collection_name.stats();
Inspect the “userFlags” value from the returned results.
A value of 1 indicates that usePowerOf2Sizes is in effect
A value of 0 indicates that usePowerOf2Sizes is not in effect

Pete Whitney, VP Cloud Development, FireScope, Inc.
Testing Process
v  Create two collections
v  One uses usePowerOf2Sizes
v  The other does not
v  Insert the same documents to each
collection
v  Update inserted documents
v  Delete documents
v  Retrieve and compare data size and
storage size
Pete Whitney, VP Cloud Development, FireScope, Inc.
Data Size Results
Final Data Size (KBytes)
600
500
400
300
200
100
0

Final Data
Size (KBytes)
Feature Not Feature Set
Set

Pete Whitney, VP Cloud Development, FireScope, Inc.
Storage Size Results
Final Storage Size (M-Bytes)
160
140
120
100
80
60
40
20
0

Final Storage
Size (M-Bytes)

Feature Not Set

Feature Set

Pete Whitney, VP Cloud Development, FireScope, Inc.
Compaction Ratio Results
Final Compaction Ratio
700
600
500
400
300
200
100
0

Final
Compaction
Ratio
Feature Not
Set

Feature Set

Pete Whitney, VP Cloud Development, FireScope, Inc.
Allocation Results
5000
4500
4000
3500
Allocation Size by
Insertion Count
Feature Not Set
Allocation Size by
Insertion Count
Feature Set

3000
2500
2000
1500
1000
500
0
5

10 15 20 25 30 35 40 45

Pete Whitney, VP Cloud Development, FireScope, Inc.
Performance Results

v  Test duration using feature: 26.75s
v  Test duration not using feature: 34.66s
v  Percent improvement: 22.8%

Pete Whitney, VP Cloud Development, FireScope, Inc.
Summary
l 

l 

l 

l 

Using the usePowerOf2Sizes feature results in
larger data size allocations
Using the usePowerOf2Sizes feature results in
significantly better use of storage size
Using the usePowerOf2Sizes feature results in
improved and sustained compaction ratio
Using the usePowerOf2Sizes feature results in
better performance for append operations due to
reductions in the number of disk allocations and
index updates
Pete Whitney, VP Cloud Development, FireScope, Inc.
Parting Thoughts
l 

l 

l 

l 

If you are not consistently gathering data from your
IT infrastructure do you know when some
important portion of your business is failing to meet
your customers needs?
When you change something in your IT
infrastructure do you know that the change is
performing up to the expectations of your
customers?
Do you have the tools in place today that allow you
to explore and identify issues, problems,
bottlenecks throughout all of your IT assets?
If not then check out:

www.firescope.com

Pete Whitney, VP Cloud Development, FireScope, Inc.
References
l 

Reference Article
MongoDB Exorcises File Fragmentation Demons

java.sys-con.com/node/2756958
l 

“usePowerOf2Sizes” Documentation
docs.mongodb.org/manual/reference/command/collMod/

l 

FireScope Inc.

www.firescope.com

l 

MongoDB

www.mongodb.org

l 

Pete Whitney

pwhitney@firescope.com

Pete Whitney, VP Cloud Development, FireScope, Inc.

Weitere ähnliche Inhalte

Ähnlich wie MongoDB's usePowerOf2Sizes Feature

Mercury Testdirector8.0 using Slides
Mercury Testdirector8.0 using SlidesMercury Testdirector8.0 using Slides
Mercury Testdirector8.0 using Slides
telab
 

Ähnlich wie MongoDB's usePowerOf2Sizes Feature (20)

Benchmarking PyCon AU 2011 v0
Benchmarking PyCon AU 2011 v0Benchmarking PyCon AU 2011 v0
Benchmarking PyCon AU 2011 v0
 
How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012How to make a Load Testing with Visual Studio 2012
How to make a Load Testing with Visual Studio 2012
 
Visual Studio 2010 Testing Overview
Visual Studio 2010 Testing OverviewVisual Studio 2010 Testing Overview
Visual Studio 2010 Testing Overview
 
JavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toJavaLand - Integration Testing How-to
JavaLand - Integration Testing How-to
 
Big Data Testing : Automate theTesting of Hadoop, NoSQL & DWH without Writing...
Big Data Testing : Automate theTesting of Hadoop, NoSQL & DWH without Writing...Big Data Testing : Automate theTesting of Hadoop, NoSQL & DWH without Writing...
Big Data Testing : Automate theTesting of Hadoop, NoSQL & DWH without Writing...
 
Walking Through Spring Cloud Data Flow
Walking Through Spring Cloud Data FlowWalking Through Spring Cloud Data Flow
Walking Through Spring Cloud Data Flow
 
Query Wizards - data testing made easy - no programming
Query Wizards - data testing made easy - no programmingQuery Wizards - data testing made easy - no programming
Query Wizards - data testing made easy - no programming
 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and Engineering
 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and Engineering
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsData Seeding via Parameterized API Requests
Data Seeding via Parameterized API Requests
 
DevOps Roadshow - cloud services for development
DevOps Roadshow - cloud services for developmentDevOps Roadshow - cloud services for development
DevOps Roadshow - cloud services for development
 
Test Driven Database Development With Data Dude
Test Driven Database Development With Data DudeTest Driven Database Development With Data Dude
Test Driven Database Development With Data Dude
 
Session 2: SQL Server 2012 with Christian Malbeuf
Session 2: SQL Server 2012 with Christian MalbeufSession 2: SQL Server 2012 with Christian Malbeuf
Session 2: SQL Server 2012 with Christian Malbeuf
 
Lab Management with TFS 2010
Lab Management with TFS 2010Lab Management with TFS 2010
Lab Management with TFS 2010
 
OSA Con 2022 - Scaling your Pandas Analytics with Modin - Doris Lee - Ponder.pdf
OSA Con 2022 - Scaling your Pandas Analytics with Modin - Doris Lee - Ponder.pdfOSA Con 2022 - Scaling your Pandas Analytics with Modin - Doris Lee - Ponder.pdf
OSA Con 2022 - Scaling your Pandas Analytics with Modin - Doris Lee - Ponder.pdf
 
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
 
State of the Market - Data Quality in 2023
State of the Market - Data Quality in 2023State of the Market - Data Quality in 2023
State of the Market - Data Quality in 2023
 
Mercury Testdirector8.0 using Slides
Mercury Testdirector8.0 using SlidesMercury Testdirector8.0 using Slides
Mercury Testdirector8.0 using Slides
 
The Practice of Presto & Alluxio in E-Commerce Big Data Platform
The Practice of Presto & Alluxio in E-Commerce Big Data PlatformThe Practice of Presto & Alluxio in E-Commerce Big Data Platform
The Practice of Presto & Alluxio in E-Commerce Big Data Platform
 
Evolutionary db development
Evolutionary db development Evolutionary db development
Evolutionary db development
 

Mehr von MongoDB

Mehr von MongoDB (20)

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

Kürzlich hochgeladen

Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
amitlee9823
 
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
HyderabadDolls
 

Kürzlich hochgeladen (20)

Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
 
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
 
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment BookingRanikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...
VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...
VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...
 
📞 Contact Number 8617697112 VIP East Sikkim Call Girls
📞 Contact Number 8617697112 VIP East Sikkim Call Girls📞 Contact Number 8617697112 VIP East Sikkim Call Girls
📞 Contact Number 8617697112 VIP East Sikkim Call Girls
 
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment BookingKanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...
Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...
Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...
 
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
 
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
 
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls AgencyHire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
 
(TOP CLASS) Call Girls In Chengalpattu Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Chengalpattu Phone 7427069034 Call Girls Model With...(TOP CLASS) Call Girls In Chengalpattu Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Chengalpattu Phone 7427069034 Call Girls Model With...
 
Borum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Borum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceBorum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Borum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
 
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls AgencyHire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
 
Sonagachi ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Sonagachi ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Sonagachi ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Sonagachi ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
 
Low Rate Call Girls Dhakuria (8005736733) 100% GENUINE ESCORT SERVICE & HOTEL...
Low Rate Call Girls Dhakuria (8005736733) 100% GENUINE ESCORT SERVICE & HOTEL...Low Rate Call Girls Dhakuria (8005736733) 100% GENUINE ESCORT SERVICE & HOTEL...
Low Rate Call Girls Dhakuria (8005736733) 100% GENUINE ESCORT SERVICE & HOTEL...
 
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
 
Almora call girls 📞 8617697112 At Low Cost Cash Payment Booking
Almora call girls 📞 8617697112 At Low Cost Cash Payment BookingAlmora call girls 📞 8617697112 At Low Cost Cash Payment Booking
Almora call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
Call Girls Panaji Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Panaji Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Panaji Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Panaji Just Call 8617370543 Top Class Call Girl Service Available
 
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
 

MongoDB's usePowerOf2Sizes Feature

  • 1. Implications of MongoDB’s “usePowerOf2Sizes” Feature Introduction Problem Use Case Activating “usePowerOf2Sizes” Testing Approach Analysis of Test Results Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 2. Problematic Use Case Insert document Append to document Append to document Append to document Delete document Repeat Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 3. Activating usePowerOf2Sizes Example shell command to activate usePowerOf2Sizes: db.runCommand( { collMod : “collection_name", usePowerOf2Sizes : true } ); Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 4. Is usePowerOf2Sizes set? To view the setting of usePowerOf2Sizes: db.collection_name.stats(); Inspect the “userFlags” value from the returned results. A value of 1 indicates that usePowerOf2Sizes is in effect A value of 0 indicates that usePowerOf2Sizes is not in effect Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 5. Testing Process v  Create two collections v  One uses usePowerOf2Sizes v  The other does not v  Insert the same documents to each collection v  Update inserted documents v  Delete documents v  Retrieve and compare data size and storage size Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 6. Data Size Results Final Data Size (KBytes) 600 500 400 300 200 100 0 Final Data Size (KBytes) Feature Not Feature Set Set Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 7. Storage Size Results Final Storage Size (M-Bytes) 160 140 120 100 80 60 40 20 0 Final Storage Size (M-Bytes) Feature Not Set Feature Set Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 8. Compaction Ratio Results Final Compaction Ratio 700 600 500 400 300 200 100 0 Final Compaction Ratio Feature Not Set Feature Set Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 9. Allocation Results 5000 4500 4000 3500 Allocation Size by Insertion Count Feature Not Set Allocation Size by Insertion Count Feature Set 3000 2500 2000 1500 1000 500 0 5 10 15 20 25 30 35 40 45 Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 10. Performance Results v  Test duration using feature: 26.75s v  Test duration not using feature: 34.66s v  Percent improvement: 22.8% Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 11. Summary l  l  l  l  Using the usePowerOf2Sizes feature results in larger data size allocations Using the usePowerOf2Sizes feature results in significantly better use of storage size Using the usePowerOf2Sizes feature results in improved and sustained compaction ratio Using the usePowerOf2Sizes feature results in better performance for append operations due to reductions in the number of disk allocations and index updates Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 12. Parting Thoughts l  l  l  l  If you are not consistently gathering data from your IT infrastructure do you know when some important portion of your business is failing to meet your customers needs? When you change something in your IT infrastructure do you know that the change is performing up to the expectations of your customers? Do you have the tools in place today that allow you to explore and identify issues, problems, bottlenecks throughout all of your IT assets? If not then check out: www.firescope.com Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 13. References l  Reference Article MongoDB Exorcises File Fragmentation Demons java.sys-con.com/node/2756958 l  “usePowerOf2Sizes” Documentation docs.mongodb.org/manual/reference/command/collMod/ l  FireScope Inc. www.firescope.com l  MongoDB www.mongodb.org l  Pete Whitney pwhitney@firescope.com Pete Whitney, VP Cloud Development, FireScope, Inc.