Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Mongo: Performance and Troubleshooting
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
gamechanger
August 21, 2012
Technology
0
320
Mongo: Performance and Troubleshooting
gamechanger
August 21, 2012
Tweet
Share
More Decks by gamechanger
See All by gamechanger
Concurrency + Mongo
gamechanger
0
110
Mongo and Ops
gamechanger
0
120
Other Decks in Technology
See All in Technology
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
380
MCPで決済に楽にする
mu7889yoon
0
140
MIX AUDIO EN BROADCAST
ralpherick
0
110
Navigation APIと見るSvelteKitのWeb標準志向
yamanoku
2
120
SaaSに宿る21g
kanyamaguc
2
180
Change Calendarで今はOK?を仕組みにする
tommy0124
1
120
Phase04_ターミナル基礎
overflowinc
0
2.6k
Datadog で実現するセキュリティ対策 ~オブザーバビリティとセキュリティを 一緒にやると何がいいのか~
a2ush
0
160
LLMに何を任せ、何を任せないか
cap120
10
5.9k
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
76k
GitHub Advanced Security × Defender for Cloudで開発とSecOpsのサイロを超える: コードとクラウドをつなぐ、開発プラットフォームのセキュリティ
yuriemori
1
110
Agent Skill 是什麼?對軟體產業帶來的變化
appleboy
0
240
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.2k
The Spectacular Lies of Maps
axbom
PRO
1
650
How GitHub (no longer) Works
holman
316
150k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
120
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
460
30 Presentation Tips
portentint
PRO
1
260
Practical Orchestrator
shlominoach
191
11k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Transcript
Performance & Troubleshooting @kirilnyc @gcsports
• How MongoDB works (layman's version) • Common failure cases
• Best practices
Fundamentals • OS Pager, LRU cache ejection • Working Set
and implications • Documents on disk
Virtual Memory LRU
Working Set
Documents on Disk
Failing • Underestimating Working Set • Ill-Fitting Use Cases •
Schema Design Mistakes
Oops, Overload
Estimating Working Set • Indexes • Core operational data (user
records, etc) • Secondary records (logs, sessions) • Long tail data (historical, related) • Scans*
I Know, Let's use Mongo!
Sub-optimal Use Cases • Session storage • Big fragmented collections
• Giant working sets + performance demands • Clearly tabular data
Simulated Joins!!!
Let's NoSQL! • Look for the largest granularity that works
• Eschew lookup collections • Prefer containment over reference • Query sparingly
Best Practices • Denormalize heavily • Do Capacity Planning •
Live in your slow query logs • Watch the numbers
Documents No thanks. Yes please.
Capacity Planning
Logs *yawn* Ruh-roh...
Numbers • Query load (subjective, learn yours) • Lock percentage
(< 50%) • Queues (single digits) • Page faults (single digits)
@kirilnyc CTO, GameChanger Media http://GC.io/about