1 © Copyright 2015 EMC Corporation. All rights reserved. MongoDB & Flash Transform MongoDB with EMC XtremIO
Jul 25, 2015
1© Copyright 2015 EMC Corporation. All rights reserved.
MongoDB & FlashTransform MongoDB with EMC XtremIO
2© Copyright 2015 EMC Corporation. All rights reserved.
• Why Flash for MongoDB
• Tuning for Flash/SSDs
• Shared Storage Flash and MongoDB
• Why XtremIO for MongoDB
• XtremIO Technical Overview
• Testing Results
• Economic Breakdown
AGENDA
3© Copyright 2015 EMC Corporation. All rights reserved.
• Performance, Scalability, and Ease-of-use are key factors for choosing MongoDB
• Flash drives provide the ability to deliver 2x-3x better performance than mechanical hard drives
• Potential to provide power, cooling and density savings
MONGODB AND FLASH
4© Copyright 2015 EMC Corporation. All rights reserved.
• OS Tuning (MongoDB Best Practices)
• Storage Tuning• R10 or R0 (replica sets)• Ext4
• External Journal on SSD
• Batched file synchs
• Reduce DRAM, allow working set paging to SSD
TUNING MONGODB WITH SSD’S
5© Copyright 2015 EMC Corporation. All rights reserved.
DAS SSD CAN DELIVER LOT OF IOPS
Node 1 Node 2 Node 3 Node 40
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
IOPS
IOPS
6© Copyright 2015 EMC Corporation. All rights reserved.
TEST RESULTS - SESSION STORE: 50/50 RW
DAS SSD GARBAGE COLLECTION
500
1000
1500
2000
2500
3000
3500
4000
4500
5000
5500
6000
6500
7000
7500
8000
8500
0
500
1000
1500
2000
2500
3000
3500
4000
Node 1
Node 2
Node 3
Node 4
IOPS
Late
ncy in m
icro
seconds
NOTE: Inconsistent Latencies Observed
7© Copyright 2015 EMC Corporation. All rights reserved.
• Disk or SSD failure can result in node failure
• Impact of node failure on MongoDB– Minute to elect new primary
• 10-30 sec to declare primary inaccessible• 10-30 for election & during election cluster is unavailable for writes
• RAID can alleviate but at what cost?– Huge capacity overhead → 30% – Write Amplification → More garbage collection, shorter SSD
lifespan– Performance limited by RAID controller – Per node management– Different RAID types different IOs
DAS RELIABILITY
8© Copyright 2015 EMC Corporation. All rights reserved.
TECHNOLOGY CHALLENGES OF DAS
MONGODB DAS ENVIRONMENT1
Inconsistent performance– Garbage collection– Limited by controller
2Compromised Availability
SSDs & servers failIndex rebuilds can take hours to days
3Lack of Enterprise Data Protection & Features
– No Snapshots – High-Performance
Encryption/Compliance
4 Poor Storage Efficiency– Multiple copies of data
5 Non-Optimized Growth– Fixed compute to storage ratio
6 Management complexity– Multiple management points
1x
2x
3x
2x
3x
1x
9© Copyright 2015 EMC Corporation. All rights reserved.
WHY XTREMIO FOR MONGODB
• Consistent Performance
at Scale
• High Resiliency
• Free High-Performance Encryption
• Cost savings by scaling compute/storage independently
• Advanced Inline Data Efficiencies
• In-memory Snapshot Services
10© Copyright 2015 EMC Corporation. All rights reserved.
XTREMIO CONSISTENT PERFORMANCEEVEN DURING GARBAGE COLLECTION!
Actual customer data | Workload: OLTP with 8KB Block Size
35TB Traditional Flash Array10TB XtremIO X-Brick
Late
ncy
• 20-40ms = Traditional Flash• Latency increases with capacity
• <1ms = XtremIO• Always Consistent & Predictable
System-Level Garbage Collection Impact
Worse than Disk Latency
11© Copyright 2015 EMC Corporation. All rights reserved.
XTREMIO CONSISTENT PERFORMANCEEVEN DURING GARBAGE COLLECTION!
• DAS hotspots and write amplification increases frequency of garbage collection
• Traditional flash arrays use system level garbage collection, leading to unpredictable performance– for flash – app performance, endurance, consistency– Users have no control over when this happens- huge SLA risk
• XtremIO uses the SSD controller for garbage collection– Controllers are dedicated to serving host I/Os– Inline deduplication, in-memory metadata, & XDP minimizes writes
– and therefore a lot of garbage collection
12© Copyright 2015 EMC Corporation. All rights reserved.
THE EVOLUTION OF ALL FLASH ARRAYSTHE WIKIBON ANALYST VIEW
Source:Wikibon.org/wiki/v/Evolution_of_All_Flash_Array_Architectures
XtremIO: The first EnterpriseGen 4 Arrayforthe Agile Data Center
HYBRID FLASH SCALE UP SCALE OUT
Gen 2 - 2008 - Now Gen 3 - 2012 to Now Gen 4 - 2014 to Now
Compromised Trade-offs
Controller
Scale
Tier 1 Workloads
Data Services
GarbageCollection
Benefit
Dual
TBs
One
Limited/Post-Processed
N/A
IOPsAcceleration
Dual
TBs
Few
System
IOPS orEfficiency
N-way Active-Active
PBs
Multiple andMixed
In Line, All the Time
Offloaded
Agile DataCenter
Limited/Post-Processed
13© Copyright 2015 EMC Corporation. All rights reserved.
Active Controller 1
Active Controller 2
Infiniband RDMA
32CPU
CORES
512GB
RAM
25eMLCSSDs
SAS 2.0SAS 2.0
2 x FC2 x iSCSI
4HOSTPORTS
2 x FC2 x iSCSI
256GBRAM
256GBRAM
XTREMIO X-BRICKCluster Building Block
14© Copyright 2015 EMC Corporation. All rights reserved.
PBs effective capacity based on 10, 20, & 40 TB X-Bricks
NO TUNINGSCALE-OUT RICH DATA SERVICES<1ms LATENCY
© Copyright 2015 EMC Corporation. All rights reserved.
Starter 5TB
PRODUCT FAMILY, ON-DEMAND LINEAR SCALE-OUT
150K mixed IOPS250K read IOPS<1ms Latency
From 2 – 16 N-way Active Controllers1.2M mixed IOPS
2M read IOPS<1ms LatencPBs Capacity
15© Copyright 2015 EMC Corporation. All rights reserved.
SUPERIOR USABLE CAPACITY
UP TO 4X BETTER PERFORMANCE
UP TO 10X BETTER ENDURANCE
BETTER THAN ANY RAID, SSDS LAST LONGER
XDP – OPTIMIZED FOR FLASH
Write I/O Overhead (stripe update)
1.222
(64%)2
(64%)3
(146%)
Read I/O Overhead (stripe update)
1.22 02
(64%)3
(146%)
XDP RAID 1 RAID 5 RAID 6
Capacity Overhead 8% 50% 25% 20%
16© Copyright 2015 EMC Corporation. All rights reserved.
AGILEWRITEABLESNAPSHOTS
INLINEDATA AT RESTENCRYPTION
XTREMIO DATAPROTECTION
INLINEDEDUPLICATION
INLINECOMPRESSION
ALWAYS-ONTHIN
PROVISIONING
XTREMIO DATA SERVICESALWAYS-ON, INLINE, ZERO PENALTY, FREE
17© Copyright 2015 EMC Corporation. All rights reserved.
HIGH PERFORMANCE AT REST ENCRYPTION – FOR FREE!
SECURE AES-256 ENCRYPTION
SSDs UNREADABLE IF NOT IN ARRAY
XtremIO at rest encryption is…
ALWAYS ON
ALWAYS INLINE
FULL PERFORMANCE
ZERO COST
18© Copyright 2015 EMC Corporation. All rights reserved.
• Baseline performance results
• Highlight DAS inefficiencies• CPU and Cache Statistics/Overhead• Inconsistent performance
• Scale out storage benefits with XtremIO• Consistent performance• Distributed architecture
• Long-term economic benefits
OBJECTIVES OF MONGODB TESTING
19© Copyright 2015 EMC Corporation. All rights reserved.
• (4) Lenovo RD650• (2) Xeon E5-2600 v3• 128GB Ram• (14) 400GB SSD• (2) 1TB SATA
• MongoDB v. 2.6.2• Replica Sets• Sharding
• YCSB v X
ENVIRONMENT DETAILS
22© Copyright 2015 EMC Corporation. All rights reserved.
XTREMIO SCALES ON-DEMAND, LINEARLY JUST LIKE MONGODB
SCALE-OUT FLASH FOR MONGODB
23© Copyright 2015 EMC Corporation. All rights reserved.
COMPARISON DIAGRAMS/CHARTSXTREMIO VS DAS
PROD TEST/DEV
10TB 10TB20TB
25© Copyright 2015 EMC Corporation. All rights reserved.
XTREMIO
MASTER COPY 1 DEV 1 DEV 2 TEST 1
MORE COPIES,
ONLY 10TB!
26© Copyright 2015 EMC Corporation. All rights reserved.
COMPARISON DIAGRAMS/CHARTSXTREMIO VS DAS
TEST/DEVPROD
10TB
28© Copyright 2015 EMC Corporation. All rights reserved.
• Consistent Performance at Scale
• High Resiliency
• Advanced Inline Data Efficiencies
• In-memory Snapshot Services
• Free High-Performance Encryption
• Cost savings by scaling compute/storage independently
WHY XTREMIO FOR MONGODB - SUMMARY
31© Copyright 2015 EMC Corporation. All rights reserved.
• MongoDB follows a distributed model allowing high scale, resiliency and flexibility.
• An all-flash distributed shared storage model is a perfect complement to MongoDB.
• Shared storage provides key benefits over traditional direct-attached storage.
SCALEOUT FLASH FOR MONGODB