High Performance MongoDB on Storage-Optimized AWS EC2

9,716 views

Published on

Published in: Technology, Business
1 Comment
20 Likes
Statistics
Notes
No Downloads
Views
Total views
9,716
On SlideShare
0
From Embeds
0
Number of Embeds
3,012
Actions
Shares
0
Downloads
125
Comments
1
Likes
20
Embeds 0
No embeds

No notes for slide
  • Run through of the new instance types.
  • General instance features that are relevant to the MongoDB crowd.
  • From a single option to many!

    Talk through network differences.
  • Even more choices!

    Network interface is why the 8xl’s stay together.
  • Review of storage flavors to make sure there are not confused customers in the crowd.
  • Push that EBS is a network based service and will be limited by interface size and type.
  • This is only one dimension to consider! (I know, but time is short, and this is a big one.) Extreme example to hammer in the importance of understanding your storage!
    EBS Optimized can handle about 24K IOPS

    8 drives at 3K IOPS for standard. This will saturate the EBS Optimized instanes.

    6 drives at 4K IOPS will saturate the EBS Optimized instance. Still need 6 of them.

    4 1TB General SSDs will catch the data for backup.on a low priority replica. This is the general architecture recommended in the whitepaper.


    Calc is wrong right now. 35% IOP reduction
  • Parentheses represent (annual cost + One-Ttime)/Term.
  • Mini-recap and handoff to Sandeep.
  • High Performance MongoDB on Storage-Optimized AWS EC2

    1. 1. Partner Technical Solutions, MongoDB Sandeep Parikh #MongoDBWorld High Performance MongoDB on Amazon EC2 Solutions Architect, Amazon Web Services Kyle Lichtenberg
    2. 2. Wait, isn’t there a whitepaper on this? • Much has changed since March 2013! – (and an update is in the works!)
    3. 3. New EC2 Instances Types • I2 released in December 2013 – Next generation High I/O Instance Family – 4-32 vCPUs – 30-244 GiB of Memory – 800-6,400 GB of SSD Storage (up to 315,000+ IOPS) • R3 released in April 2014 – Next Generation Memory Optimized Instance Family – 2-32 vCPUs – 15-244 GiB of Memory
    4. 4. Latest Generation Instance Features • Enhanced Networking (SR-IOV) – Improved packet per second (PPS) performance – Lower inter-instance latencies – Very low network jitter • SSDs – No mechanical seeking! – Higher I/O than magnetic • Updated Hardware Architecture – Ivy Bridge Intel Xeon E5-2670 v2 – Higher sustained memory bandwidth (up to 63,000 MB/s)
    5. 5. Storage I/O Optimized Instance Evolution hi1.4xlarge Memor y 60.5 GiB Storage 2x 1,024GB SSD Networ k 10 Gigabit i2.8xlarge Memory 244 GiB Storage 8x 800GB SSD Network 10 Gigabit i2.4xlarge Memory 122 GiB Storage 4x 800GB SSD Network High i2.2xlarge Memory 61 GiB Storage 2x 800GB SSD Network High i2.xlarge Memory 30.5 GiB Storage 800GB SSD Network Moderate
    6. 6. Memory Optimized Instance Evolution cr1.8xlarge Memory 244 GiB Storage 2x 120GB SSD Network 10 Gigabit m2.4xlarge Memory 68.4 GiB Storage 2x 840GB Network High m2.2xlarge Memory 34.2 GiB Storage 850GB Network High m2.xlarge Memory 17.1 GiB Storage 420GB Network Moderate r3.8xlarge Memory 244 GiB Storage 2x 320GB SSD Network 10 Gigabit r3.4xlarge Memory 122 GiB Storage 320GB SSD Network High r3.2xlarge Memory 61 GiB Storage 160GB SSD Network High r3.xlarge Memory 30.5 GiB Storage 80GB SSD Network Moderate r3.large Memory 15.25 GiB Storage 32GB SSD Network Moderate
    7. 7. AWS Block Storage Review • Amazon Elastic Block Store (“EBS”) – Network attached – Durable – Snapshot backups to S3 • Amazon EBS Provisioned IOPS (“PIOPS”) – Standard EBS + definable, consistent performance • Instance Storage (“Ephemeral Storage”) – Lowest latency – Included in instance cost – Volatile!
    8. 8. Storage Considerations EBS EBS PIOPS Instance Store ~100 IOPS Magnetic 3 IOPS/GB General Purpose (SSD) Up to 1TB/Volume Linear performance increases up to 12 volumes on 8xlarge instances Max 36,000 IOPS/Instance Snapshots! Up to 30 IOPS/GB (max 4,000/volume) Up to 1TB/Volume Linear performance increases up to 12 volumes on 8xlarge instances Max 48,000 IOPS/Instance Snapshots! Up to 365,000 IOPS/instance Up to 6.4TB Fewer IOPS on smaller instance sizes Max 365,000 IOPS/Instance No built-in backup functionality
    9. 9. Storage Considerations • When using EBS – Use EBS Optimized Instances! – Use PIOPS for consistent performance – Use snapshots for backups • When using Instance Storage – Replicate! Replicate! Replicate! – Use a replica with EBS volumes for backups
    10. 10. Cost Considerations All EBS All EBS PIOPS Hybrid Instance Store 47x 1TB General Purpose (SSD) 6x r3.2xlarge (EBS Optimized) Volumes: $4,700.00 Compute: $3,294.00 Total: $7,994.00/mo 35x 134GB @ 4K IOPS 6 r3.2xlarge (EBS Optimized) Volumes: $586.25 EBS IOPS: $9,100.00 Compute: $3,294.00 Total: $12,394.25/mo 4x 800GB SSD 2x i2.2xlarge 4x 1TB General Purpose (SSD) 1x i2.2xlarge (EBS Optimized) Volumes: $400.00 Compute: $3780.78 Total: $4,180.78/mo Assuming a performance target of 140,000 IOPS: All costs are estimations and are based on published pricing as of 6/18/2014.
    11. 11. Cost is an important performance metric! • Reserved Instances – Pricing model designed for steady state workloads – Pay a small upfront fee for a reduced hourly rate – Light, Medium, and Heavy utilization – 1 and 3 year terms
    12. 12. Pricing Models Hybrid Instance Store 4x 800GB SSD 2x i2.2xlarge 4x 1TB General SSD 1x i2.2xlarge (EBS Optimized) Volumes: $400.00 • On-Demand – One-time fee: $0.00 – Monthly Cost: $4,180.78 – Annual Cost: $50,169.36 • 1 YR Heavy Reserved – One-time fee: $10,920 – Monthly Cost: $1,119.58 – Annual Cost: $13,434.96 ($24,354.96) • 3 YR Heavy Reserved – One-time fee: $16,440.00 – Monthly Cost: $965.86 – Annual Cost: $11,590.32 ($17,070.32) All costs are estimations and are based on published pricing as of 6/18/2014.
    13. 13. Functional Deployment Patterns • Proper instance type and storage selections play a huge part in price and performance. • Not all storage architectures are created equal, but neither are all environments!
    14. 14. High Performance MongoDB
    15. 15. Instance Storage Ephemeral Set number of volumes per instance RAID with LVM Snapshots via LVM EBS Volumes Persistent Multiple volumes per instance RAID with LVM or MD Snapshots MongoDB Storage Considerations
    16. 16. Storage Differences PIOPS EBS Instance SSDs Highest durability Highest performance Requires EBS-optimized instances Available on new generation instances Higher price per IOP Included in instance pricing
    17. 17. Development, Testing MongoDB App MongoDB Primary App MongoDB Secondary MongoDB Secondary Single Node Replica Set
    18. 18. Production, High Performance MongoDB Primary App MongoDB Secondary MongoDB Secondary Replica Set MongoDB Primary MongoDB Secondary MongoDB Secondary Sharding MongoDB Primary App MongoDB Secondary MongoDB Secondary MongoDB Primary MongoDB Secondary MongoDB Secondary mongos App mongos App mongos
    19. 19. Deployment Strategies: SSDs • SSD deployments – Replica Sets and – MMS Backup • High performance • Highly available • Continuous backup MongoDB Primary MongoDB Secondar y MongoDB Secondar y MMS Backup Agent
    20. 20. MongoDB Management Service: Backup Fully-managed, agent-based, continuous backup Custom snapshot scheduling and retention Point in-time recovery Performance impact similar to Secondary Encrypted data transfer Restores require 2-factor authentication
    21. 21. Deployment Strategies: Hybrid Mixed SSD/EBS deployment Secondary with PIOPS EBS Powerful, high-bandwidth instance Aggregate multiple volumes for max IOPS ex. r3.8xlarge with 12 PIOPS EBS volumes Key is avoiding replication lag Monitor with MMS
    22. 22. Measuring Performance MMS Monitoring MongoDB metrics Visualizations Dashboards Alerts System stats tools iostat mpstat sar mongoperf MongoDB ops/second Set threads, fileSize, caching
    23. 23. Partner Technical Solutions, MongoDB Sandeep Parikh #MongoDBWorld Thank You! Solutions Architect, Amazon Web Services Kyle Lichtenberg

    ×