SlideShare a Scribd company logo
1 of 23
Download to read offline
Enteros, Inc.
MongoDB
Performance Tuning
Load Testing
NoSQL Now! 2013 Conference
San Jose
ron@enteros.com
Ron Warshawsky
August 23, 2013
2
MongoDB Overview
Agenda
Overview performance
tuning
Overview load testing
3
MongoDB Areas Of Performance Tuning
OS tuning
Storage tuning
Database tuning
Load Testing
4
MongoDB Areas Of Performance Tuning
• OS Tuning
• Follow ulimitsper mongo manual
• http://docs.mongodb.org/manual/reference/ulimit/
• Follow production notes per mongo manual
• http://docs.mongodb.org/manual/administration/production-notes/
• No atime on fs
• No hugepages
• Use NTT to sync time between the nodes
• Try “tuned”
• Best when used in staging/load testing environment under
realisticload
• CPU, Network and Storage tuning
5
MongoDB Areas Of Performance Tuning
• Storage Tuning
• RAID 10
• Ext4 or XFS
• Delaysharding with better I/O
• SSD + FlashCache – shutterflytested
• https://github.com/facebook/flashcache/
• Provisioned IOPS on AWS
6
MongoDB Areas Of Performance Tuning
• Storage Tuning
• Ext4 + external journal on SSD – good I/O results
• Make sure to test
• journal_async_commit is used
• http://www.raid6.com.au/posts/fs_ext4_external_journal/
7
MongoDB Areas Of Performance Tuning
Softlayerstudy/ benchmarking
“MongoDB Performance Analysis: Bare Metal v. Virtual”
http://blog.softlayer.com/2012/mongodb-performance-analysis-bare-metal-v-
virtual/
Highlights:
• When a working data set is smaller than available memory, query performance increases.
• The number of clients performing queries has an impact on query performance because more
data is being actively cached at a rapid rate.
• The addition of a separate Journal Mount volume significantly improves performance.
Because the Small (SM) engineered server does not include a secondary mount for Journals,
whenever MongoDB began to journal, the disk I/O associated with journaling was disruptive to
the query and update operations performed on the Data Mount.
• The best deployments in terms of operations per second,stability and control were the
configurations with a RAID10 SSD Data Mount and a RAID1 SSD Journal Mount. These
configurations are available in both Medium and Large offerings,and I’d highly recommend
them.
8
MongoDB Areas Of Performance Tuning
OS Performancemonitoring and analysis tools:
• A) Linux utilities: iostat, vmstat, mpstat, sar, free -tm
• B) Open source monitoring / performance analysissystems: Nagios,
Cacti
• http://tag1consulting.com/blog/mongodb-cacti-graphs
• https://github.com/mzupan/nagios-plugin-mongodb
C) Oracle OS Watcher– Free tool, performance collection and chart
generator, easy to operate, very reliable, covers CPU, processes,
top processes, I/O, network, etc
OSWatcher Black Box Analyzer User Guide (Doc ID 461053.1)
9
MongoDB Areas Of Performance Tuning
Database Tuning
• Database configuration
• Preallocatespace (noprealloc = false)
• journalCommitInterval – range of 2 to 300, default 100. Can be
adjusted to for better performance
• Option to disable services:
1. HTTP Interface using nohttpinterface = true.
2. ScriptingEngine using noscripting = true (server-side java
script).
3. RESTservice using rest = false.
10
MongoDB Areas Of Performance Tuning
Database Tuning
• Database monitoring tools
• Mongostat– based on “eBay” “freecon” utility.
• Use “–discover” option for membersof replicaSet / shared
cluster
• Displays critical performance metrics:
• Flushes/Faults/locked db/idxmiss/qr/qw
• Collect 24x7 and save for analysis
11
MongoDB Areas Of Performance Tuning
Database Tuning
• Database monitoring tools
• Mongotop
• Per collection I/O time tracking
• Per database lock tracking (--lock option)
12
MongoDB Areas Of Performance Tuning
Database networktraffic analysis
• Database networkmonitoringtools
• Mongosniff– sniffing MongoDb requests
• Can capture invalid BSON requests from a network (--objcheck option)
• Wireshark– support for MongoDB protocol (not BSON), great
options for network performanceand latencyanalysis
13
MongoDB Areas Of Performance Tuning
Database Tuning
• Collections/ Fragmentation
Collections in a MongoDB database can become fragmented. This can be a particularly serious problem if
data usage patterns are relatively unstructured. In the long run, this will result in databases taking up more
space on disk and in RAM to hold the same amount of data, it will make many database operations noticeably
slower, and it can reduce overall query capacity significantly.
compactcollection:
db.runCommand ( { compact: '<collection>', paddingBytes: 100 } )
Automate compaction:
http://blog.parse.com/2013/03/26/always-be-compacting/
./mongo_compact.rb -d userdata1,userdata2,userdata3
14
MongoDB Areas Of Performance Tuning
Database Tuning
Profiler
db.setProfilingLevel(level, slowms)
db.setProfilingLevel(1)– collects slow requests
Output:
system.profile.op – operation
system.profile.ns – namespace
system.profile.ntoreturn – documentsreturned
system.profile.nscanned – documentsscanned
…
http://docs.mongodb.org/manual/reference/database-profiler/
Profilerdeep dive
https://speakerdeck.com/kgorman/mongodb-profiler-deep-dive
15
MongoDB Areas Of Performance Tuning
Database Tuning
• Indexes
• Explain
db.collection.find({…}).explain()
Watch for scans
• Indexes + Profiler= DEX - suggest what indexesare needed
https://github.com/jwilder/mongodb-tools
http://architects.dzone.com/articles/mongodb-performance-tuning-
dex
16
MongoDB Areas Of Performance Tuning
Database Monitoring and performance analysisUI
a) MongoDB monitoring service (MMS)
b) Open Source monitoringsoftware
http://docs.mongodb.org/manual/administration/monitoring/
c) Enteros High Load Capture for MongoDB
17
MongoDB Areas Of Performance Tuning
• Replication/ Replica set tuning
Watch for replicationlag
Problem:
a) Weaksecondary
b) Write bursts
c) Index build
d) Secondarylocked for backup
e) Secondaryoffline
Measure lag:
db.printSlaveReplicationInfo()
db.printReplicationInfo()
Get time difference
MMS provides replication lag chart and alerts
18
MongoDB Areas Of Performance Tuning
• Sharding Tuning
• Shard size
• Migration of chunks
• Failed migrationof chunks
19
MongoDB Load Testing
Load testing
1) Whyload testing?
• Validate upgrades
• Validate fixes
• Validate hardware and platform changes (to / from cloud, etc)
• Validate multiplesof production load
20
MongoDB Load Testing
2) Options for Load testing
A) BenchmarkLoad Testing
• Mongo-Perf - Create standard TPCC-like load on MongoDB
• https://github.com/mongodb/mongo-perf
B) Disk I/O load testing
• Mongoperf
• Iozone http://www.iozone.org/
21
MongoDB Load Testing
C) Real traffic Load Testing
Parse PCAP files and generate production-like load
http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-
protocol/
Create custom tool
Enteros Load2Test (pre-GA)
Understandbusiness requirements
and it’s impact on production system
design
Designfor performance, scalability
and availability
Implement monitoring and performance
analysis across layers
Implement reliable production-like
load testing
MongoDB Summary
Enteros, Inc
http://www.enteros.com/
Enteros is an innovative software company specializing in
Performance Management and Load Testing Software for
Production Databases - RDBMS and NOSQL/Big Data
Enteros solutions enable IT professionals to identify
and remediate performance problems in business-critical
databases with unprecedented speed, accuracy and scope.
Ron Warshawsky; ron@enteros.com
408-207-8408
MongoDB Summary

More Related Content

What's hot

Setting up mongo replica set
Setting up mongo replica setSetting up mongo replica set
Setting up mongo replica setSudheer Kondla
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on awsEmanuel Calvo
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance TuningMongoDB
 
Open Source SQL databases enters millions queries per second era
Open Source SQL databases enters millions queries per second eraOpen Source SQL databases enters millions queries per second era
Open Source SQL databases enters millions queries per second eraSveta Smirnova
 
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015PostgreSQL-Consulting
 
Postgres connections at scale
Postgres connections at scalePostgres connections at scale
Postgres connections at scaleMydbops
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL AdministrationEDB
 
Concurrency Patterns with MongoDB
Concurrency Patterns with MongoDBConcurrency Patterns with MongoDB
Concurrency Patterns with MongoDBYann Cluchey
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationMydbops
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica setsRandall Hunt
 
Background Tasks in Node - Evan Tahler, TaskRabbit
Background Tasks in Node - Evan Tahler, TaskRabbitBackground Tasks in Node - Evan Tahler, TaskRabbit
Background Tasks in Node - Evan Tahler, TaskRabbitRedis Labs
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Denish Patel
 

What's hot (20)

Tuning Linux for MongoDB
Tuning Linux for MongoDBTuning Linux for MongoDB
Tuning Linux for MongoDB
 
Setting up mongo replica set
Setting up mongo replica setSetting up mongo replica set
Setting up mongo replica set
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on aws
 
GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance Tuning
 
7 Ways To Crash Postgres
7 Ways To Crash Postgres7 Ways To Crash Postgres
7 Ways To Crash Postgres
 
Containers > VMs
Containers > VMsContainers > VMs
Containers > VMs
 
Open Source SQL databases enters millions queries per second era
Open Source SQL databases enters millions queries per second eraOpen Source SQL databases enters millions queries per second era
Open Source SQL databases enters millions queries per second era
 
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
 
Postgres connections at scale
Postgres connections at scalePostgres connections at scale
Postgres connections at scale
 
Mongodb replication
Mongodb replicationMongodb replication
Mongodb replication
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
Concurrency Patterns with MongoDB
Concurrency Patterns with MongoDBConcurrency Patterns with MongoDB
Concurrency Patterns with MongoDB
 
92 grand prix_2013
92 grand prix_201392 grand prix_2013
92 grand prix_2013
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL Administration
 
PostgreSQL and RAM usage
PostgreSQL and RAM usagePostgreSQL and RAM usage
PostgreSQL and RAM usage
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica sets
 
Background Tasks in Node - Evan Tahler, TaskRabbit
Background Tasks in Node - Evan Tahler, TaskRabbitBackground Tasks in Node - Evan Tahler, TaskRabbit
Background Tasks in Node - Evan Tahler, TaskRabbit
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4
 

Viewers also liked

Тестирование ядра высоконагруженой системы
Тестирование ядра высоконагруженой системыТестирование ядра высоконагруженой системы
Тестирование ядра высоконагруженой системыOntico
 
Принципы построения кампусных сетей для внедрения тонких клиентов VDI.
 Принципы построения кампусных сетей для внедрения тонких клиентов VDI.  Принципы построения кампусных сетей для внедрения тонких клиентов VDI.
Принципы построения кампусных сетей для внедрения тонких клиентов VDI. Cisco Russia
 
MongoDB and server performance
MongoDB and server performanceMongoDB and server performance
MongoDB and server performanceAlon Horev
 
MongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() OutputMongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() OutputMongoDB
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance TuningPuneet Behl
 
How We Test MongoDB: Evergreen
How We Test MongoDB: EvergreenHow We Test MongoDB: Evergreen
How We Test MongoDB: EvergreenMongoDB
 
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.Ambiente Livre
 
High Performance MongoDB on Storage-Optimized AWS EC2
High Performance MongoDB on Storage-Optimized AWS EC2High Performance MongoDB on Storage-Optimized AWS EC2
High Performance MongoDB on Storage-Optimized AWS EC2MongoDB
 
Mining AWR V2 - Trend Analysis
Mining AWR V2 - Trend AnalysisMining AWR V2 - Trend Analysis
Mining AWR V2 - Trend AnalysisMaris Elsins
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.Mike Brevoort
 
Oracle Event Delivery Network (EDN) of SOA Suite 11g
Oracle Event Delivery Network (EDN) of SOA Suite 11gOracle Event Delivery Network (EDN) of SOA Suite 11g
Oracle Event Delivery Network (EDN) of SOA Suite 11gGuido Schmutz
 
How_to_build_GameServer_2
How_to_build_GameServer_2How_to_build_GameServer_2
How_to_build_GameServer_2Peter Rybar
 
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...Lucas Jellema
 
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...Lucas Jellema
 
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and FutureReview Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and FutureLucas Jellema
 
Mobile Database and Service Oriented Architecture
Mobile Database and Service Oriented ArchitectureMobile Database and Service Oriented Architecture
Mobile Database and Service Oriented ArchitectureLucas Jellema
 
Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)Lucas Jellema
 
Introducing Oracle Real-Time Integration Business Insight
Introducing Oracle Real-Time Integration Business InsightIntroducing Oracle Real-Time Integration Business Insight
Introducing Oracle Real-Time Integration Business InsightLucas Jellema
 

Viewers also liked (20)

Тестирование ядра высоконагруженой системы
Тестирование ядра высоконагруженой системыТестирование ядра высоконагруженой системы
Тестирование ядра высоконагруженой системы
 
Принципы построения кампусных сетей для внедрения тонких клиентов VDI.
 Принципы построения кампусных сетей для внедрения тонких клиентов VDI.  Принципы построения кампусных сетей для внедрения тонких клиентов VDI.
Принципы построения кампусных сетей для внедрения тонких клиентов VDI.
 
MongoDB and server performance
MongoDB and server performanceMongoDB and server performance
MongoDB and server performance
 
MongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() OutputMongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() Output
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance Tuning
 
How We Test MongoDB: Evergreen
How We Test MongoDB: EvergreenHow We Test MongoDB: Evergreen
How We Test MongoDB: Evergreen
 
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
 
High Performance MongoDB on Storage-Optimized AWS EC2
High Performance MongoDB on Storage-Optimized AWS EC2High Performance MongoDB on Storage-Optimized AWS EC2
High Performance MongoDB on Storage-Optimized AWS EC2
 
Mining AWR V2 - Trend Analysis
Mining AWR V2 - Trend AnalysisMining AWR V2 - Trend Analysis
Mining AWR V2 - Trend Analysis
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
NoSQL and SOA
NoSQL and SOANoSQL and SOA
NoSQL and SOA
 
Oracle Event Delivery Network (EDN) of SOA Suite 11g
Oracle Event Delivery Network (EDN) of SOA Suite 11gOracle Event Delivery Network (EDN) of SOA Suite 11g
Oracle Event Delivery Network (EDN) of SOA Suite 11g
 
How_to_build_GameServer_2
How_to_build_GameServer_2How_to_build_GameServer_2
How_to_build_GameServer_2
 
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...
Systems on the edge - your stepping stones into Oracle Public PaaS Cloud - AM...
 
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
 
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...
The True State of the Oracle Public Cloud - Dutch Oracle Architects Platform ...
 
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and FutureReview Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
 
Mobile Database and Service Oriented Architecture
Mobile Database and Service Oriented ArchitectureMobile Database and Service Oriented Architecture
Mobile Database and Service Oriented Architecture
 
Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)
 
Introducing Oracle Real-Time Integration Business Insight
Introducing Oracle Real-Time Integration Business InsightIntroducing Oracle Real-Time Integration Business Insight
Introducing Oracle Real-Time Integration Business Insight
 

Similar to MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference presentation

Webinar: Introduction to MongoDB 3.0
Webinar: Introduction to MongoDB 3.0Webinar: Introduction to MongoDB 3.0
Webinar: Introduction to MongoDB 3.0MongoDB
 
MongoDB Tokyo - Monitoring and Queueing
MongoDB Tokyo - Monitoring and QueueingMongoDB Tokyo - Monitoring and Queueing
MongoDB Tokyo - Monitoring and QueueingBoxed Ice
 
High Performance, Scalable MongoDB in a Bare Metal Cloud
High Performance, Scalable MongoDB in a Bare Metal CloudHigh Performance, Scalable MongoDB in a Bare Metal Cloud
High Performance, Scalable MongoDB in a Bare Metal CloudMongoDB
 
Eko10 Workshop Opensource Database Auditing
Eko10  Workshop Opensource Database AuditingEko10  Workshop Opensource Database Auditing
Eko10 Workshop Opensource Database AuditingJuan Berner
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMorgan Tocker
 
Mongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesMongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesronwarshawsky
 
Conceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producciónConceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producciónMongoDB
 
Eko10 workshop - OPEN SOURCE DATABASE MONITORING
Eko10 workshop - OPEN SOURCE DATABASE MONITORINGEko10 workshop - OPEN SOURCE DATABASE MONITORING
Eko10 workshop - OPEN SOURCE DATABASE MONITORINGPablo Garbossa
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment StrategyMongoDB
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharpSerdar Buyuktemiz
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBSeveralnines
 
5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDBTim Callaghan
 
Let the Tiger Roar - MongoDB 3.0
Let the Tiger Roar - MongoDB 3.0Let the Tiger Roar - MongoDB 3.0
Let the Tiger Roar - MongoDB 3.0Norberto Leite
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)MongoDB
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksSenturus
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSPC Adriatics
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment StrategiesMongoDB
 
Grabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkGrabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkHarold Giménez
 

Similar to MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference presentation (20)

mongodb tutorial
mongodb tutorialmongodb tutorial
mongodb tutorial
 
Webinar: Introduction to MongoDB 3.0
Webinar: Introduction to MongoDB 3.0Webinar: Introduction to MongoDB 3.0
Webinar: Introduction to MongoDB 3.0
 
MongoDB Tokyo - Monitoring and Queueing
MongoDB Tokyo - Monitoring and QueueingMongoDB Tokyo - Monitoring and Queueing
MongoDB Tokyo - Monitoring and Queueing
 
High Performance, Scalable MongoDB in a Bare Metal Cloud
High Performance, Scalable MongoDB in a Bare Metal CloudHigh Performance, Scalable MongoDB in a Bare Metal Cloud
High Performance, Scalable MongoDB in a Bare Metal Cloud
 
Eko10 Workshop Opensource Database Auditing
Eko10  Workshop Opensource Database AuditingEko10  Workshop Opensource Database Auditing
Eko10 Workshop Opensource Database Auditing
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
 
Mongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesMongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategies
 
Conceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producciónConceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producción
 
Eko10 workshop - OPEN SOURCE DATABASE MONITORING
Eko10 workshop - OPEN SOURCE DATABASE MONITORINGEko10 workshop - OPEN SOURCE DATABASE MONITORING
Eko10 workshop - OPEN SOURCE DATABASE MONITORING
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment Strategy
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDB
 
5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB
 
Let the Tiger Roar - MongoDB 3.0
Let the Tiger Roar - MongoDB 3.0Let the Tiger Roar - MongoDB 3.0
Let the Tiger Roar - MongoDB 3.0
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & Tricks
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment Strategies
 
Grabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkGrabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the Trunk
 
DOTNET8.pptx
DOTNET8.pptxDOTNET8.pptx
DOTNET8.pptx
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference presentation

  • 1. Enteros, Inc. MongoDB Performance Tuning Load Testing NoSQL Now! 2013 Conference San Jose ron@enteros.com Ron Warshawsky August 23, 2013
  • 3. 3 MongoDB Areas Of Performance Tuning OS tuning Storage tuning Database tuning Load Testing
  • 4. 4 MongoDB Areas Of Performance Tuning • OS Tuning • Follow ulimitsper mongo manual • http://docs.mongodb.org/manual/reference/ulimit/ • Follow production notes per mongo manual • http://docs.mongodb.org/manual/administration/production-notes/ • No atime on fs • No hugepages • Use NTT to sync time between the nodes • Try “tuned” • Best when used in staging/load testing environment under realisticload • CPU, Network and Storage tuning
  • 5. 5 MongoDB Areas Of Performance Tuning • Storage Tuning • RAID 10 • Ext4 or XFS • Delaysharding with better I/O • SSD + FlashCache – shutterflytested • https://github.com/facebook/flashcache/ • Provisioned IOPS on AWS
  • 6. 6 MongoDB Areas Of Performance Tuning • Storage Tuning • Ext4 + external journal on SSD – good I/O results • Make sure to test • journal_async_commit is used • http://www.raid6.com.au/posts/fs_ext4_external_journal/
  • 7. 7 MongoDB Areas Of Performance Tuning Softlayerstudy/ benchmarking “MongoDB Performance Analysis: Bare Metal v. Virtual” http://blog.softlayer.com/2012/mongodb-performance-analysis-bare-metal-v- virtual/ Highlights: • When a working data set is smaller than available memory, query performance increases. • The number of clients performing queries has an impact on query performance because more data is being actively cached at a rapid rate. • The addition of a separate Journal Mount volume significantly improves performance. Because the Small (SM) engineered server does not include a secondary mount for Journals, whenever MongoDB began to journal, the disk I/O associated with journaling was disruptive to the query and update operations performed on the Data Mount. • The best deployments in terms of operations per second,stability and control were the configurations with a RAID10 SSD Data Mount and a RAID1 SSD Journal Mount. These configurations are available in both Medium and Large offerings,and I’d highly recommend them.
  • 8. 8 MongoDB Areas Of Performance Tuning OS Performancemonitoring and analysis tools: • A) Linux utilities: iostat, vmstat, mpstat, sar, free -tm • B) Open source monitoring / performance analysissystems: Nagios, Cacti • http://tag1consulting.com/blog/mongodb-cacti-graphs • https://github.com/mzupan/nagios-plugin-mongodb C) Oracle OS Watcher– Free tool, performance collection and chart generator, easy to operate, very reliable, covers CPU, processes, top processes, I/O, network, etc OSWatcher Black Box Analyzer User Guide (Doc ID 461053.1)
  • 9. 9 MongoDB Areas Of Performance Tuning Database Tuning • Database configuration • Preallocatespace (noprealloc = false) • journalCommitInterval – range of 2 to 300, default 100. Can be adjusted to for better performance • Option to disable services: 1. HTTP Interface using nohttpinterface = true. 2. ScriptingEngine using noscripting = true (server-side java script). 3. RESTservice using rest = false.
  • 10. 10 MongoDB Areas Of Performance Tuning Database Tuning • Database monitoring tools • Mongostat– based on “eBay” “freecon” utility. • Use “–discover” option for membersof replicaSet / shared cluster • Displays critical performance metrics: • Flushes/Faults/locked db/idxmiss/qr/qw • Collect 24x7 and save for analysis
  • 11. 11 MongoDB Areas Of Performance Tuning Database Tuning • Database monitoring tools • Mongotop • Per collection I/O time tracking • Per database lock tracking (--lock option)
  • 12. 12 MongoDB Areas Of Performance Tuning Database networktraffic analysis • Database networkmonitoringtools • Mongosniff– sniffing MongoDb requests • Can capture invalid BSON requests from a network (--objcheck option) • Wireshark– support for MongoDB protocol (not BSON), great options for network performanceand latencyanalysis
  • 13. 13 MongoDB Areas Of Performance Tuning Database Tuning • Collections/ Fragmentation Collections in a MongoDB database can become fragmented. This can be a particularly serious problem if data usage patterns are relatively unstructured. In the long run, this will result in databases taking up more space on disk and in RAM to hold the same amount of data, it will make many database operations noticeably slower, and it can reduce overall query capacity significantly. compactcollection: db.runCommand ( { compact: '<collection>', paddingBytes: 100 } ) Automate compaction: http://blog.parse.com/2013/03/26/always-be-compacting/ ./mongo_compact.rb -d userdata1,userdata2,userdata3
  • 14. 14 MongoDB Areas Of Performance Tuning Database Tuning Profiler db.setProfilingLevel(level, slowms) db.setProfilingLevel(1)– collects slow requests Output: system.profile.op – operation system.profile.ns – namespace system.profile.ntoreturn – documentsreturned system.profile.nscanned – documentsscanned … http://docs.mongodb.org/manual/reference/database-profiler/ Profilerdeep dive https://speakerdeck.com/kgorman/mongodb-profiler-deep-dive
  • 15. 15 MongoDB Areas Of Performance Tuning Database Tuning • Indexes • Explain db.collection.find({…}).explain() Watch for scans • Indexes + Profiler= DEX - suggest what indexesare needed https://github.com/jwilder/mongodb-tools http://architects.dzone.com/articles/mongodb-performance-tuning- dex
  • 16. 16 MongoDB Areas Of Performance Tuning Database Monitoring and performance analysisUI a) MongoDB monitoring service (MMS) b) Open Source monitoringsoftware http://docs.mongodb.org/manual/administration/monitoring/ c) Enteros High Load Capture for MongoDB
  • 17. 17 MongoDB Areas Of Performance Tuning • Replication/ Replica set tuning Watch for replicationlag Problem: a) Weaksecondary b) Write bursts c) Index build d) Secondarylocked for backup e) Secondaryoffline Measure lag: db.printSlaveReplicationInfo() db.printReplicationInfo() Get time difference MMS provides replication lag chart and alerts
  • 18. 18 MongoDB Areas Of Performance Tuning • Sharding Tuning • Shard size • Migration of chunks • Failed migrationof chunks
  • 19. 19 MongoDB Load Testing Load testing 1) Whyload testing? • Validate upgrades • Validate fixes • Validate hardware and platform changes (to / from cloud, etc) • Validate multiplesof production load
  • 20. 20 MongoDB Load Testing 2) Options for Load testing A) BenchmarkLoad Testing • Mongo-Perf - Create standard TPCC-like load on MongoDB • https://github.com/mongodb/mongo-perf B) Disk I/O load testing • Mongoperf • Iozone http://www.iozone.org/
  • 21. 21 MongoDB Load Testing C) Real traffic Load Testing Parse PCAP files and generate production-like load http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire- protocol/ Create custom tool Enteros Load2Test (pre-GA)
  • 22. Understandbusiness requirements and it’s impact on production system design Designfor performance, scalability and availability Implement monitoring and performance analysis across layers Implement reliable production-like load testing MongoDB Summary
  • 23. Enteros, Inc http://www.enteros.com/ Enteros is an innovative software company specializing in Performance Management and Load Testing Software for Production Databases - RDBMS and NOSQL/Big Data Enteros solutions enable IT professionals to identify and remediate performance problems in business-critical databases with unprecedented speed, accuracy and scope. Ron Warshawsky; ron@enteros.com 408-207-8408 MongoDB Summary