Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mongo: Performance and Troubleshooting

Mongo: Performance and Troubleshooting

gamechanger

August 21, 2012
Tweet

More Decks by gamechanger

Other Decks in Technology

Transcript

  1. Fundamentals • OS Pager, LRU cache ejection • Working Set

    and implications • Documents on disk
  2. Estimating Working Set • Indexes • Core operational data (user

    records, etc) • Secondary records (logs, sessions) • Long tail data (historical, related) • Scans*
  3. Sub-optimal Use Cases • Session storage • Big fragmented collections

    • Giant working sets + performance demands • Clearly tabular data
  4. Let's NoSQL! • Look for the largest granularity that works

    • Eschew lookup collections • Prefer containment over reference • Query sparingly
  5. Best Practices • Denormalize heavily • Do Capacity Planning •

    Live in your slow query logs • Watch the numbers
  6. Numbers • Query load (subjective, learn yours) • Lock percentage

    (< 50%) • Queues (single digits) • Page faults (single digits)