• Like

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Use PowerOf2Sizes

  • 200 views
Published

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
200
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
4
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 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     Create two collections One uses usePowerOf2Sizes The other does not Insert the same documents to each collection  Update inserted documents  Delete documents  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  Test duration using feature: 26.75s  Test duration not using feature: 34.66s  Percent improvement: 22.8% Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 11. Summary     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     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  Reference Article MongoDB Exorcises File Fragmentation Demons java.sys-con.com/node/2756958  “usePowerOf2Sizes” Documentation docs.mongodb.org/manual/reference/command/collMod/  FireScope Inc. www.firescope.com  MongoDB www.mongodb.org  Pete Whitney pwhitney@firescope.com Pete Whitney, VP Cloud Development, FireScope, Inc.