Debunking DRAM vs. Flash Controversy vis-a-vis In-Memory Processing

Wikibon produced an interesting material (looks like paid by Aerospike, NoSQL database recently emerged by resurrecting failed CitrusLeaf and acquihiring AlchemyDB, which product, of course, was recommended in the end) that compares NoSQL databases based on storing data in flash-based SSD vs. storing data in DRAM.

There are number of factual problems with that paper and I want to point them out.

Note that Wikibon doesn't mention GridGain in this study (we are not a NoSQL datastore per-se after all) so I don't have any bone in this game other than annoyance with biased and factually incorrect writing.

"Minimal" Performance Advantage of DRAM vs SSD


The paper starts with a simple statement "The minimal performance disadvantage of flash, relative to main memory…". Minimal? I've seen number of studies where performance difference between SSDs and DRAM range form 100 to 10,000 times. For example, this University of California, Berkeley study claims that SSD bring almost no advantage to the Facebook Hadoop cluster and DRAM pre-caching is the way forward.

Let me provide even shorter explanation. Assuming we are dealing with Java - SSD devices are visible to Java application as typical block devices, and therefore accessed as such. It means that a typical object read from such device involves the same steps as reading this object from a file: hardware I/O subsystem, OS I/O subsystem, OS buffering, Java I/O subsystem & buffering, Java deserialization and induced GC. And... if you read the same object from DRAM - it involves few bytecode instructions - and that's it.

Native C/C++ apps (like MongoDB) can take a slightly quicker route with memory mapped files (or various other IPC methods) - but the performance increase will not be significant (for obvious reason of needing to read/swap the entire pages vs. single object access pattern in DRAM).

Yet another recent technical explanation of the disadvantages of SSD storage can be found here (talking about Oracle's "in-memory" strategy).

MongoDB, Cassandra, CouchDB DRAM-based?


Amid all the confusion on this topic it's no wonder the author got it wrong. Neither MongoDB, Cassandra or CouchDB are in-memory systems. They are disk-based systems with support for memory caching. There's nothing wrong with that and nothing new - every database developed in the last 25 years naturally provides in-memory caching to augment it's main disk storage.

The fundamental difference here is that in-memory data systems like GridGain, SAP HAHA, GigaSpaces, GemFire, SqlFire, MemSQL, VoltDB, etc. use DRAM (memory) as the main storage medium and use disk for optional durability and overflow. This focus on RAM-based storage allows to completely re-optimized all main algorithms used in these systems.

For example, ACID implementation in GridGain that provides support for full-featured distributed ACID transactions beats every NoSQL database (EC-based) out there in read and even write performance: there are no single key limitations, no consistency trade offs to make, no application-side MVCC, no user-based conflict resolutions or other crutches - it just works the same way as it works in Oracle or DB2 - but faster.

2TB Cluster for $1.2M :)


If there was on piece in the original paper that was completely made up to fit the predefined narrative it was a price comparison. If the author thinks that 2TB RAM cluster costs $1.2M today - I have not one but two Golden Gate bridges to sell just for him…

Let's see. A typical Dell/HP/IBM/Cisco blade with 256GB of DRAM will cost below $20K if you just buy on the list prices (Cisco seems to offer the best prices starting at around $15K for 256GB blades). That brings the total cost of 2TB cluster well below $200K (with all network and power equipment included and 100s TBs of disk storage).

Is this more expensive that SSD only cluster? Yes, by 2.5-3x times more expensive. But you are getting dramatic performance increase with the right software that more than justifies that price increase.

Conclusion


2-3x times price difference is nonetheless important and it provides our customers a very clear choice. If price is an issue and high performance is not - there are disk-based systems of wide varieties. If high performance and sub-second response on processing TBs of data is required - the hardware will be proportionally more expensive.



However, with 1GB of DRAM costing less than 10 USD and DRAM prices dropping 30% every 18 months - the era of disks (flash or spinning) is clearly coming to its logical end. It's normal... it's a progress and we all need to learn how to adapt.




Has anyone seen tape drives lately?