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
gamechanger
August 21, 2012
Technology
0
310
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
110
Other Decks in Technology
See All in Technology
ZOZOのAI活用実践〜社内基盤からサービス応用まで〜
zozotech
PRO
0
200
LLM時代にデータエンジニアの役割はどう変わるか?
ikkimiyazaki
4
900
神回のメカニズムと再現方法/Mechanisms and Playbook for Kamikai scrumat2025
moriyuya
4
600
Access-what? why and how, A11Y for All - Nordic.js 2025
gdomiciano
1
120
From Prompt to Product @ How to Web 2025, Bucharest, Romania
janwerner
0
120
pprof vs runtime/trace (FlightRecorder)
task4233
0
170
英語は話せません!それでも海外チームと信頼関係を作るため、対話を重ねた2ヶ月間のまなび
niioka_97
0
130
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
11
78k
「Verify with Wallet API」を アプリに導入するために
hinakko
1
250
AWSにおけるTrend Vision Oneの効果について
shimak
0
130
OCI Network Firewall 概要
oracle4engineer
PRO
1
7.8k
about #74462 go/token#FileSet
tomtwinkle
1
420
Featured
See All Featured
Producing Creativity
orderedlist
PRO
347
40k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Typedesign – Prime Four
hannesfritz
42
2.8k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Building Adaptive Systems
keathley
43
2.8k
Designing Experiences People Love
moore
142
24k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
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