Use PowerOf2Sizes
 

Use PowerOf2Sizes

on

  • 451 views

 

Statistics

Views

Total Views
451
Views on SlideShare
451
Embed Views
0

Actions

Likes
0
Downloads
4
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Use PowerOf2Sizes Use PowerOf2Sizes Presentation Transcript

  • 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     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.
  • 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  Test duration using feature: 26.75s  Test duration not using feature: 34.66s  Percent improvement: 22.8% Pete Whitney, VP Cloud Development, FireScope, Inc.
  • 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.
  • 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.
  • 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.