Skip to content
Tech

Thanks for the memory: How cheap RAM changes computing

In-memory data processing brings huge speed boosts, but the future looks non-volatile.

Adam Banks – | 79
Credit: Blake Patterson
Credit: Blake Patterson
Story text
An early Micron DRAM die, with a capacity of around 1 megabit.
A completed 1-megabit Carl Zeiss DRAM chip.

RAM (random access memory) is a component of every computer system, from tiny embedded controllers to enterprise servers. In the form of SRAM (static RAM) or DRAM (dynamic RAM), it’s where data is held temporarily while some kind of processor operates on it. But as the price of RAM falls, the model of shuttling data to and from big persistent storage and RAM may no longer hold.

RAM is highly susceptible to market fluctuations, but the long-term price trend is steadily downward. Historically, as recently as 2000 a gigabyte of memory cost over $1,000 (£800 in those days); today, it’s just under $5 (~£5). That opens up very different ways of thinking about system architecture.

A big pile of modern’ish DRAM boards. Credit: Blake Patterson
Databases are traditionally held on disk, from where the required information is read into memory as needed, and then processed in some way. Memory size is usually assumed to differ from disk size by several orders of magnitude—say, gigabytes vs. terabytes. But as memory size increases, it becomes more efficient to load more data into memory, reducing the number of disk reads and writes. As RAM prices continued to fall, we began to see whole databases loaded from disk into memory, operations performed, and then written back to persistent storage. Now, however, we’re at the point where some databases are never written back to persistent storage, existing entirely in volatile RAM.

Memory access speeds are measured in nanoseconds (billionths of a second), and disk seek time is usually measured in milliseconds, making memory about a million times faster. RAM transfer speeds aren’t a million times faster, of course—gigabytes per second versus a few hundred megs per second for a quick hard drive—but RAM clearly has persistent storage beat by at least an order of magnitude.

In real-world applications the differences aren’t quite that dramatic, but reading data from disk into RAM and writing it back is a huge bottleneck, as well as introducing the potential for inconsistency. Removing this step could also permit a reduced instruction set, increasing simplicity and efficiency.

As RAM prices fall, it’s already commonplace in high-end enterprise and data centre contexts to see terabytes of memory available to a server. Besides size, however, an obvious objection to keeping a database in RAM is durability. RAM is volatile, losing its contents instantly when the power goes off or the system is compromised. That presents a challenge when meeting the standard “ACID” requirements (atomicity, consistency, isolation, durability) of a reliable database.

This can be mitigated by snapshots and logs. Just as a disk-based database may be backed up periodically, an in-memory database can be copied to storage. Creating a snapshot means competing with other processes to read data, so the frequency of checkpoints will be a trade-off between performance and resiliency. This in turn can be mitigated by transaction logging, also known as journalling, which records changes made to data so that a later state can be reconstructed from an earlier copy. Still, with the live database in volatile memory, a degree of redundancy is lost.

Inside a Google data centre.

Database management software designed for in-memory applications (IMDBS) can also enable hybrid systems, where some tables within a database are designated in-memory while the rest lives on disk. This goes beyond caching, yet is possible even where it wouldn’t be feasible to keep the entire database in RAM.

Databases can also be compressed to make the most of the available RAM capacity, especially in column-oriented systems, which store tables as collections of columns rather than rows. Most compression techniques like it when adjacent data is of the same type (binary, string, integer, etc.), and table columns are nearly always uniform in type. While compression introduces computational overheads, columnar storage is well suited to complex queries of very large data sets, which is why big data and data science users are interested in it.

At the largest scales, companies like Google have moved to RAM to enable vast searches to be carried out at acceptable speeds. Challenges remain, though, in making really big amounts of memory available to a task, because only so much RAM can be connected to a single motherboard, and sharing brings additional latencies.

Life after RAM

It’s far from clear that volatile in-memory implementations are the future of data processing, though. A rival model is the use of non-volatile RAM (NVRAM), already familiar to PC users in the form of SSDs, which present an architecture compatible with existing disk systems. These are currently based on NAND flash memory, which offers much faster reads and writes than mechanical hard disks but comes with its own problems. Essentially a kludge to maintain electrical charge, flash requires relatively high voltages to write and gradually wears out, a process managed by wear-levelling algorithms that are subject to diminishing returns.

Memory and storage price per megabyte, over time. Credit: J.C. McCallum

Over time, as seen in a long-term chart by former computer science professor John C McCallum, the price of storage decreases at a roughly similar rate to that of RAM. The falling cost of SSDs has brought widespread adoption in data centres as well as on-premises systems, but it’s not clear what future the technology has there. In February 2016, a research paper based on six years of deployment by Google found that flash drives were significantly less reliable than hard drives—producing more uncorrectable errors, for example—even though they required less frequent replacement, and that enterprise-grade SSDs were no more reliable than consumer versions, despite industry metrics claiming the contrary.

But other forms of NVRAM are emerging. Ferroelectric RAM (FRAM) was once seen as a potential replacement for RAM and flash in mobile devices, but attention has now shifted to magnetoresistive RAM (MRAM). This gets closer to the read/write speeds of volatile RAM and has an access latency of around 50 nanoseconds—slower than DRAM’s ~10ns access time, but about a thousand times faster than the microsecond range of NAND flash.

A diagram of Everspin’s MRAM memory cell (a magnetic tunnel junction, MTJ).

MRAM stores information as magnetic orientation rather than electrical charge, using a thin-film structure called a magnetic tunnel junction. “Toggle” MRAM is already used in products such as Dell’s EqualLogic storage arrays, but only in small capacities for journalling.

Spin-torque transfer MRAM (ST-MRAM) uses a more sophisticated structure with greater potential for increased density. It’s currently marketed by Everspin, which recently became a NASDAQ-traded public company under the ticker “MRAM,” while other players include Crocus, Micron, Qualcomm, Samsung, Spin Transfer Technologies (STT), and Toshiba.

A glorious wafer of 3D XPoint dies.
Two 3D XPoint dies, rated at 128Gb each.
A diagram of the Intel/Micron 3D XPoint technology; sadly, HP/SanDisk hasn’t provided a similar diagram for its new memory tech. In reality, though, the HP/SanDisk tech is probably going to be quite similar to this—but until we have some more details, it’s just an educated guess.
Comparison of different storage types and their access latencies

Intel, meanwhile, has been working with Micron on a form of NVRAM called 3D XPoint (pronounced “crosspoint”). Introduced in 2015, this is a form of phase-change memory (PCM) known as resistive RAM (ReRAM) which can be constructed in multiple layers, hence “3D.”Intel has projected that XPoint could achieve 1,000x the speed and endurance of NAND flash at 10x the density, although these claims seem to have been dialled back recently. Whatever the exact performance, the price is expected to settle between those of flash and DRAM. That would make consumer or desktop adoption unlikely, but at scale, it could outperform in-memory and SSD.

IBM is also working on phase-change memory. Like Intel, its technology is based on chalcogenide glass, as used in rewritable optical media. By using an electrical to transform the material not only from an amorphous to a crystalline state, but to three distinct states, IBM says it’s made a breakthrough in density that will bring the cost below that of DRAM.

The RAM race will affect computing at all levels. For consumers, increasing the memory available to a typical desktop system from 8GB to 16GB will speed up everyday multitasking, while more demanding applications such as high-res photo and video editing will benefit from more again.

SSDs are already the norm in ultrabooks, and rising capacity is making them viable as replacements, rather than companions, to mechanical hard disks. The incoming generation of 3D layered NAND or “V-NAND” (vertical NAND) brings higher density and efficiency, leading Samsung to predict it can deliver a 512GB consumer SSD in 2020 for the price of a 1TB HDD today.

For medium-sized businesses and institutions, faster, cheaper, and larger quantities of RAM should result in quicker, deeper, more insightful analysis of in-memory data sets—as long as the software keeps up, anyway. SAP HANA, for example, is an in-memory columnar RDBMS that provides the platform for a wide range of cloud and on-premises business solutions, bringing “big data” techniques to smaller enterprises. IBM and Oracle, too, have similar in-memory columnar databases.

RAM is also a factor in the democratisation effect of technology: as tech gets cheaper and more plentiful, the gap between smaller and larger organisations diminishes, especially if those smaller orgs collaborate.

Or, alternatively, you can just use a dedicated supercomputer to chomp through your big data. Pictured here is Lawrence Livermore’s Sequoia, which was the fastest supercomputer in the world but has since been overtaken by China’s Tianhe and Sunway TaihuLight.
Sunway TaihuLight, the current world’s fastest computer, with an rmax of 93 petaflops.

And, of course, last but not least, the next generation of supercomputers will want as much memory as physically possible. China’s currently world-leading Sunway TaihuLight has 1,300 terabytes (1.3 petabytes) of DDR3 DRAM in total, a relatively small amount for its 93 petaflops (quadrillion floating point operations per second) of processing power; this contributes to its relatively low electricity usage (just 15.3 megawatts), but could prove limiting.

Everyone’s goal now is exascale—an exaflop, or 1,000 petaflops. Japan’s “post-K” computer, designed by the Riken research institution with Fujitsu and scheduled to be up and running in 2020, will incorporate Micron’s Hybrid Memory Cube, a multi-die-stacked adaptation of DRAM, and seems likely to use 3D XPoint NVRAM as well. The EU-funded NEXTGenIO project, coordinated from the Edinburgh Supercomputing Centre, has also announced that its prototype system, a step on the road to an exascale system slated for 2022, will use 3D XPoint.

In the US the Exascale Computing Project, a product of President Obama’s National Strategic Computing Initiative (NSCI), is expected to deliver at least two new exascale supercomputers by 2023. Decisions on architecture are still in the future, but with practical performance and energy-efficiency among its priorities, RAM is bound to play a central role.

Adam Banks is a freelance writer, designer, and editorial producer. He was previously editor-in-chief at MacUser magazine. Adam lives in Newcastle upon Tyne.

79 Comments