Amazon Web Services

Public cloud IaaS providers such as Amazon Web Services (AWS) offer enterprise grade infrastructure to run new age, distributed scale out databases such as MongoDB. While AWS can be cost effective for small deployments, rental costs can become quite expensive for production scale deployments especially for a cost conscious organization. In the case of MongoDB, most of the I/O is random. Therefore, if your working set is much larger than memory, with random access patterns you may need many thousands of IOPS from your storage layer to satisfy demand. AWS offers two broad choices for customers: Amazon Elastic Block Store (EBS) and Amazon EC2 instance store.

An Amazon AMI (Amazon Machine Image) for MongoDB can be provisioned to deliver up to 4,000 IOPS per EBS volume, but there can be very high recurring monthly costs associated with this option.  An instance store, on the other hand, provides temporary block-level storage, which depicts very good random I/O property like flash and comes free with most of the latest Amazon instance types. The  instance store can be efficiently leveraged for I/O optimization to provide a better user experience, especially for data that is replicated across a fleet of instances, such as a MongoDB shared cluster.

Figure 2 AWS SB

Figure 2 above depicts a lab experiment comparing the performance and TCO of a MongoDB based AMI versus a MongoDB AWS deployment optimized with PrimaryIO APA. In this use case, MongoDB is used to run analytics on a web server log repository to get answers for various business intelligence questions. The data load phase includes importing the data into the MongoDB database while the run phase includes running analytics on the job on the latest inserted data set.

The results show that the PrimaryIO APA technology for MongoDB improved TPS of the load phase by 38% and latency by 27%, as well as the run phase TPS by 15% and latency by 12%. What is even more compelling is that the PrimaryIO solution was able to reduce the monthly rental cost per node by 45% through more intelligent and efficient utilization of the EC2 flash instance stores vs. relying entirely on the much more costly Amazon AMI for MongoDB provisioned to deliver up to 4,000 IOPS per EBS volume.

Specs & Requirements

Components PrimaryIO Core, Web GUI and APA plug-in for MongoDB, MySQL, Oracle and MS SQL Server

Cache Type Fully Associative Cache

Cache Mode Write-through, Write-back, Write-around, Read-around Maximum 1 TB

Cache Size Maximum 1 TB

Management GUI, CLI

Operating System 64 bit x86 Linux, Microsoft Windows 2008/2012

Environment Bare metal, VMWare, KVM, Xen, AWS/EC2

Ram 40MB minimum for optimal performance

Processor Two dual-cores Processor 2.2 GHz or more SSD supporting PCIe, SAS or SATA interface

Supported SSDs SSD supporting PCIe, SAS or SATA interface