SlideShare a Scribd company logo
How to monitor: 
MongoDB 
David Mytton 
Hangout on Air - Sept 2014 
https://blog.serverdensity.com/monitor-mongodb/
David Mytton
How to monitor MongoDB
Server Density Architecture
Server Density Architecture 
● ~100 servers - Ubuntu 12.04
Server Density Architecture 
● ~100 servers - Ubuntu 12.04 
● 50:50 virtual/dedicated
Server Density Architecture 
● ~100 servers - Ubuntu 12.04 
● 50:50 virtual/dedicated 
● 200TB/m processed data
Server Density Architecture 
● ~100 servers - Ubuntu 12.04 
● 50:50 virtual/dedicated 
● 200TB/m processed data 
● Nginx, Python, MongoDB
Server Density Architecture 
● ~100 servers - Ubuntu 12.04 
● 50:50 virtual/dedicated 
● 200TB/m processed data 
● Nginx, Python, MongoDB 
● Softlayer > 1TB RAM, 5TB SSDs
Key metrics 
● Oplog replication lag 
● Replica state 
● Lock % 
● Disk i/o % utilization
Oplog replication lag 
● Replica sets: master/slave
Oplog replication lag 
● Replica sets: master/slave 
● Async i.e. eventually consistent
Oplog replication lag 
● Replica sets: master/slave 
● Async i.e. eventually consistent 
● Write concern
Oplog replication lag
Oplog replication lag 
https://blog.serverdensity.com/mongodb-benchmarks/
Oplog replication lag 
● Replica sets: master/slave 
● Async i.e. eventually consistent 
● Write concern 
● Falling behind
Reasons for repl falling behind 
● Network problems
Reasons for repl falling behind 
● Network problems 
● Hardware problems
Reasons for repl falling behind 
● Network problems 
● Hardware problems 
● Shard chunk migrations
Reasons for repl falling behind 
● Network problems 
● Hardware problems 
● Shard chunk migrations 
● MongoDB bugs
Replica state 
● Primary / secondary
Replica state 
● Primary / secondary 
● Alert on state change
Lock % 
● Database locking (2.6)
Lock % 
● Database locking (2.6) 
● Sometimes a problem:
Lock % 
● Database locking (2.6) 
● Sometimes a problem: 
● Nearing 100%
Lock % 
● Database locking (2.6) 
● Sometimes a problem: 
● Nearing 100% 
● Constantly high
Lock % 
● Database locking (2.6) 
● Sometimes a problem: 
● Nearing 100% 
● Constantly high 
● Slows replication
Disk i/o % utilization 
● Hardware limits
Disk i/o % utilization 
● Hardware limits 
● Nearing 100%
Disk i/o % utilization 
● Hardware limits 
● Nearing 100% 
● Constantly high
Disk i/o % utilization 
● Hardware limits 
● Nearing 100% 
● Constantly high 
● Spinning -> SSD
Disk i/o % utilization 
https://blog.serverdensity.com/mongodb-performance-ssds-vs-spindle-sas-drives/
Disk i/o % utilization 
https://blog.serverdensity.com/mongodb-benchmarks/
Disk i/o % utilization 
● Hardware limits 
● Nearing 100% 
● Constantly high 
● Spinning -> SSD 
● Slow queries, hangs, slow repl
Non-critical metrics to watch 
● Memory usage
Non-critical metrics to watch 
● Memory usage 
● Page faults
Non-critical metrics to watch 
● Memory usage 
● Page faults 
● Connections
Non-critical metrics to watch 
● Memory usage 
● Page faults 
● Connections 
● Shard chunk distribution
Non-critical metrics to watch
Monitoring tools 
● mongostat 
● mongotop 
● rs.status() 
● sh.status()
rs.status()
sh.status()
Server Density
MMS
Summary 
● Critical alerts on key metrics
Key metrics 
● Oplog replication lag 
● Replica state 
● Lock % 
● Disk i/o % utilization
Summary 
● Critical alerts on key metrics
Summary 
● Critical alerts on key metrics 
● Watch non-critical
Summary 
● Critical alerts on key metrics 
● Watch non-critical 
● Manual tools for real time
Summary 
● Critical alerts on key metrics 
● Watch non-critical 
● Manual tools for real time 
● Set up a monitoring product
Useful resources 
● http://docs.mongodb.org/manual/administration/monitoring/ 
● https://blog.serverdensity.com/monitor-mongodb 
● https://blog.serverdensity.com
どもありがとうございます 
@davidmytton 
david@serverdensity.com 
blog.serverdensity.com

More Related Content

PDF
MongoDB and server performance
PPTX
Automate MongoDB with MongoDB Management Service
PPTX
MongoDB Memory Management Demystified
PDF
MongoDB memory management demystified
PDF
How to Monitor MySQL
PDF
7 Ways To Crash Postgres
PDF
Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...
ODP
Shootout at the AWS Corral
MongoDB and server performance
Automate MongoDB with MongoDB Management Service
MongoDB Memory Management Demystified
MongoDB memory management demystified
How to Monitor MySQL
7 Ways To Crash Postgres
Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...
Shootout at the AWS Corral

What's hot (20)

ODP
Shootout at the PAAS Corral
PPTX
Introducing MongoDB in a multi-site HA environment
PDF
Advanced Administration, Monitoring and Backup
PPT
High Availabiltity & Replica Sets with mongoDB
PDF
Optimizing MongoDB: Lessons Learned at Localytics
ODP
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...
PPTX
Tuning Linux for MongoDB
PDF
92 grand prix_2013
PDF
Redis ndc2013
PDF
Clug 2012 March web server optimisation
ODP
GUC Tutorial Package (9.0)
ODP
Fail over fail_back
PDF
Elephant Roads: a tour of Postgres forks
PDF
Как PostgreSQL работает с диском
PDF
Troubleshooting redis
PPTX
HighLoad Solutions On MySQL / Xiaobin Lin (Alibaba)
PDF
초보자를 위한 분산 캐시 이야기
PDF
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
PDF
Using ZFS file system with MySQL
ODP
PostgreSQL Replication in 10 Minutes - SCALE
Shootout at the PAAS Corral
Introducing MongoDB in a multi-site HA environment
Advanced Administration, Monitoring and Backup
High Availabiltity & Replica Sets with mongoDB
Optimizing MongoDB: Lessons Learned at Localytics
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...
Tuning Linux for MongoDB
92 grand prix_2013
Redis ndc2013
Clug 2012 March web server optimisation
GUC Tutorial Package (9.0)
Fail over fail_back
Elephant Roads: a tour of Postgres forks
Как PostgreSQL работает с диском
Troubleshooting redis
HighLoad Solutions On MySQL / Xiaobin Lin (Alibaba)
초보자를 위한 분산 캐시 이야기
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Using ZFS file system with MySQL
PostgreSQL Replication in 10 Minutes - SCALE
Ad

Viewers also liked (20)

PPTX
MongoDB Performance Tuning and Monitoring
PDF
Mongo db monitoring 어떤 것이 좋을까(mongodb korea, 김인범)
PPTX
An Introduction to MongoDB Ops Manager
PDF
MongoDB Performance Tuning
PDF
How to monitor NGINX
PDF
10 Key MongoDB Performance Indicators
PPTX
MongoDBが遅いときの切り分け方法
PPTX
MongoDB Ops Manager
KEY
MongoDB Administration ~ Kevin Hanson
PDF
Mongo db sharding guide
PPTX
MongoDBの監視
PDF
カジュアルにMongo dbのbackup機能説明
PDF
Mongo performance tuning: tips and tricks
PPTX
Understanding and tuning WiredTiger, the new high performance database engine...
PPTX
Performance Tuning and Optimization
PPTX
Monitoring_with_Prometheus_Grafana_Tutorial
PDF
Mongodb - Scaling write performance
PDF
MongoDB World 2016: Smart Strategies for Resilient Applications
PDF
Monitoring MongoDB (MongoSV)
PDF
Virtualizing MongoDB: Cloud, EC2, OpenStack, VMs...or Dedicated?
MongoDB Performance Tuning and Monitoring
Mongo db monitoring 어떤 것이 좋을까(mongodb korea, 김인범)
An Introduction to MongoDB Ops Manager
MongoDB Performance Tuning
How to monitor NGINX
10 Key MongoDB Performance Indicators
MongoDBが遅いときの切り分け方法
MongoDB Ops Manager
MongoDB Administration ~ Kevin Hanson
Mongo db sharding guide
MongoDBの監視
カジュアルにMongo dbのbackup機能説明
Mongo performance tuning: tips and tricks
Understanding and tuning WiredTiger, the new high performance database engine...
Performance Tuning and Optimization
Monitoring_with_Prometheus_Grafana_Tutorial
Mongodb - Scaling write performance
MongoDB World 2016: Smart Strategies for Resilient Applications
Monitoring MongoDB (MongoSV)
Virtualizing MongoDB: Cloud, EC2, OpenStack, VMs...or Dedicated?
Ad

Similar to How to monitor MongoDB (20)

PPTX
Performance Tuning Cheat Sheet for MongoDB
PDF
Mongo DB Monitoring - Become a MongoDB DBA
PPTX
Conceptos básicos. Seminario web 6: Despliegue de producción
KEY
Deployment Strategy
KEY
Deployment Strategies (Mongo Austin)
KEY
Deployment Strategies
PPTX
Dev Jumpstart: Build Your First App with MongoDB
PDF
MongoDB at MapMyFitness
PPTX
Ops Jumpstart: MongoDB Administration 101
PPTX
MonogDB Admin 101 - MonogDBDays Munich
PDF
MongoDB: Advantages of an Open Source NoSQL Database
KEY
The Care + Feeding of a Mongodb Cluster
PPTX
Webinar: General Technical Overview of MongoDB for Ops Teams
PDF
MongoDB at MapMyFitness from a DevOps Perspective
PPTX
Ops Jumpstart: MongoDB Administration 101
PDF
Deployment
PDF
Mongo nyc nyt + mongodb
PPTX
MongoDB 3.0
PPTX
Dev Jumpstart: Build Your First App with MongoDB
PPTX
Ops Jumpstart: MongoDB Administration 101
Performance Tuning Cheat Sheet for MongoDB
Mongo DB Monitoring - Become a MongoDB DBA
Conceptos básicos. Seminario web 6: Despliegue de producción
Deployment Strategy
Deployment Strategies (Mongo Austin)
Deployment Strategies
Dev Jumpstart: Build Your First App with MongoDB
MongoDB at MapMyFitness
Ops Jumpstart: MongoDB Administration 101
MonogDB Admin 101 - MonogDBDays Munich
MongoDB: Advantages of an Open Source NoSQL Database
The Care + Feeding of a Mongodb Cluster
Webinar: General Technical Overview of MongoDB for Ops Teams
MongoDB at MapMyFitness from a DevOps Perspective
Ops Jumpstart: MongoDB Administration 101
Deployment
Mongo nyc nyt + mongodb
MongoDB 3.0
Dev Jumpstart: Build Your First App with MongoDB
Ops Jumpstart: MongoDB Administration 101

More from Server Density (20)

PDF
Content marketing @ Server Density
PDF
Flight training for DevOps & HumanOps - IncontroDevOps 2016
PDF
Flight training for DevOps
PDF
Handling incidents
PDF
Scaling humans - Ops teams and incident management
PDF
Briefing: Containers
PDF
Why puppet? Why now?
PDF
Infrastructure choices - cloud vs colo vs bare metal
PDF
Navigating the customer lifecycle
PDF
Experiences from DevOps production: Deployment, performance, failure.
PDF
DevOps Incident Handling - Making friends not enemies.
PDF
High performance Infrastructure Oct 2013
PDF
Puppet at the centre of everything
PDF
NoSQL Infrastructure - Late 2013
PDF
Remote startup - building a company from everywhere in the world
PDF
NoSQL Infrastructure
PDF
StartOps: Growing an ops team from 1 founder
PDF
MongoDB: Optimising for Performance, Scale & Analytics
PDF
Puppet Camp Ghent 2013
PDF
Puppet Camp 2012
Content marketing @ Server Density
Flight training for DevOps & HumanOps - IncontroDevOps 2016
Flight training for DevOps
Handling incidents
Scaling humans - Ops teams and incident management
Briefing: Containers
Why puppet? Why now?
Infrastructure choices - cloud vs colo vs bare metal
Navigating the customer lifecycle
Experiences from DevOps production: Deployment, performance, failure.
DevOps Incident Handling - Making friends not enemies.
High performance Infrastructure Oct 2013
Puppet at the centre of everything
NoSQL Infrastructure - Late 2013
Remote startup - building a company from everywhere in the world
NoSQL Infrastructure
StartOps: Growing an ops team from 1 founder
MongoDB: Optimising for Performance, Scale & Analytics
Puppet Camp Ghent 2013
Puppet Camp 2012

Recently uploaded (20)

PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
A Presentation on Touch Screen Technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
A Presentation on Artificial Intelligence
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
DP Operators-handbook-extract for the Mautical Institute
WOOl fibre morphology and structure.pdf for textiles
A novel scalable deep ensemble learning framework for big data classification...
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
OMC Textile Division Presentation 2021.pptx
Tartificialntelligence_presentation.pptx
Approach and Philosophy of On baking technology
A Presentation on Touch Screen Technology
Building Integrated photovoltaic BIPV_UPV.pdf
TLE Review Electricity (Electricity).pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Hindi spoken digit analysis for native and non-native speakers
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
SOPHOS-XG Firewall Administrator PPT.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
A Presentation on Artificial Intelligence
Group 1 Presentation -Planning and Decision Making .pptx
Enhancing emotion recognition model for a student engagement use case through...
DP Operators-handbook-extract for the Mautical Institute

How to monitor MongoDB