Tip

Storage design for in-memory databases should focus on low latency, flash

What you will learn in this tip: SearchStorage senior writer Carol Sliwa asked David Floyer, co-founder and chief technology officer at Marlborough, Mass.-based research and analysis firm Wikibon, to explain the critical design principles to keep in mind when plotting the database infrastructure

Requires Free Membership to View

, including storage of in-memory databases.

The reason you want to put the database in memory is quite simply to have levels of latency and variability as low as possible, but to have the principle of all databases the same.

If you have a throughput issue to the database, the cheapest and easiest way to increase the throughput is to lower the latency, or average response time, and to lower the variance of the individual response times. The best way to lower the latency and variance is to design the I/O subsystem and the key parts of the database, such as the log file and high-activity components, with capacitance-protected dynamic RAM (for small amounts of data) or NAND flash. You can do other things, but usually flash is the fastest. If you're a storage administrator and you do not want to be accused of being the bottleneck on the database, put in the fastest storage you can and monitor the latency and variance. If you do that, you will almost always be able to say that it's not an I/O problem -- it's a database problem or an application problem.

At the moment, many databases put everything into capacitor-protected dynamic RAM (DRAM). Another approach is to use a mixture of DRAM and flash. For example, the Aerospike in-memory database has a flash architecture whereby it writes everything to flash first and then reads it into DRAM if required. There are multiple copies of the data on different servers and a remote copy in a different place for data protection. But the flash itself is the master copy of data.

Often, when purchasing an in-memory database such as SAP HANA, you will buy an appliance. That appliance has DRAM with capacitors to hold a charge in the event of a power failure. The appliance also has hard disk drives, solid-state drives or PCI Express cards for functions such as page swaps and system recovery.

From the storage point of view, DRAM is a read-only buffer for in-memory databases. That has nothing to do with the storage. You want to have large amounts of persistent storage, and you want an array or a set of flash cards that will provide low latency and low variance. The closer you have the persistent storage to the database, the better the results will usually be because you'll have less network overhead. The guaranteed point-to-point architecture of Fibre Channel (or even InfiniBand) is always better for high-performance databases than iSCSI or NFS. Another way of getting higher bandwidth (and indirectly reducing latency) on the writes is to use wide striping; of course, you can use wide striping for reloading the database.

You don't need to have the flash in the processor. It's quicker and easier to do it that way, but you just want it as close as possible. You might have a clustered database, and you have to use an array because there are 10 servers connected. If the flash is on the array, you want to ensure that it is dedicated to that particular application, and you want to make sure it has as few hops as possible on the storage network.

This was first published in February 2014

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.