Question

If in-memory databases are as fast as they claim to be, why aren't they more commonly utilized?

Was it helpful?

Solution

One of the main reasons in-memory databases aren't commonly used is because of cost. As you stated, in-memory databases are usually an order of magnitude faster than disk resident databases for obvious reasons. However, RAM is also significantly more expensive than hard drives and consequently not viable for large databases. With that said, with RAM getting much cheaper in-memory databases today are more than viable for enterprise use.

Another reason is that in-memory databases are often not ACID compliant. This is because memory is volatile, and unforeseen events like power losses may result in complete loss of data. As this is unacceptable for the vast majority of use cases, most in-memory databases do end up utilizing disks to persist data. Of course, this ends up undermining some of the benefits of in-memory databases by re-introducing disk I/O as a performance bottleneck.

In any case, in-memory databases will likely become predominant as RAM becomes cheaper. The performance differences between the two are too drastic to be ignored. Knowing this, multiple vendors have thrown their hats into the in-memory space such as Oracle TimesTen, SAP Hana, and many others. Also, some companies like Altibase are offering “hybrid” DBMS systems, which contain both in-memory and disk resident components.

You may want to read up on these in-memory offerings to get a better understanding of in-memory databases.

http://www.oracle.com/technetwork/database/database-technologies/timesten/overview/index.html

http://www.saphana.com/

http://altibase.com/in-memory-database-hybrid-products/hdbtm-hybrid-dbms/

OTHER TIPS

Possibly because one or more of:

  • there often a mismatch between the data size and the available RAM size
  • when the data is small normal disk caching and OS memory/disk management may be as effective
  • when the data is large, swapping to disk is likely to void any benefit
  • fast enough to meet performance requirements and service level does not mean as fast as possible - fast enough is good enough.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top