Persistent memory (PM) was once the norm when magnetic core memory was ubiquitous. These days, flash memory as main memory is common in microcontrollers, but volatile DRAM now dominates main memory for microprocessors. Non-volatile memory (NVM), in the form of hard-disk drives or solid-state drives (SSDs), is used to boot and store application code.
It would be nice to have NVM as main memory, and that’s becoming more common as modules like Micron’s 32-GB NVDIMM-N become available (Fig. 1). It combines DRAM and NAND flash on the same module. An external supercapacitor provides power to backup the DRAM contents to the NAND flash when power is lost. The supercap is recharged and the contents restored to DRAM when power is restored. This provides DRAM performance with NVM support.
The NVDIMM-N supports Micron’s PowerGEM external supercap as well as the Persistent DDR4 12-V pin. The latter is found on more server motherboards and allows for a common power source for all of the DIMM modules, simplifying installation and support.
1. Micron’s NVDIMM-N combines DRAM with NAND flash. A supercap provides power to save DRAM contents to flash if power is lost.
An FPGA manages system operation, such as power-down backups and power-up restores. It also monitors system health, including PowerGEM and the NAND flash. There’s automatic history tracking, including critical internal system parameters. The DIMM modules support data rates up to PC4-3200.
The Storage Networking Industry Association’s (SNIA) NVM programming model (NPM) defines a range of NVMs, such as the JEDEC Solid State Technology Association’s NVDIMM-F, NVDIMM-N, and NVDIMM-P standards. These DIMMs would plug into the same sockets as DRAM, but they’re NVM rather than volatile DRAM (which loses its contents if power is lost).
NVDIMM-F uses only flash memory and operates at flash-memory speeds that are significantly slower than DRAM. Higher capacity is the major benefit over and above NVM support. NVDIMM-P applies the same approach, but employs other memory technologies like MRAM or phase-change memory that perform better than flash memory, often with better write characteristics.
2. NVDIMM-N operating in direct mode provides the best performance. Block mode operates in the same fashion as DRAM backed by NVMe SSDs.
The Micron NVDIMM-N device plugs into a normal DRAM socket, but it can be used in a number of ways (Fig. 2). It can operate in block mode, like an NVMe SSD, or in direct mode. Though direct mode provides the best performance, it requires software that’s aware of NVDIMM support. In block mode, the driver knows about the NVM support, but hides this from the operating system presenting the usual block-mode device functionality. Direct mode can improve application performance by more than a factor of four.
Applications that frequently update their data, like journaling systems or transactional logging of metadata, will benefit from direct mode. Application services such as memcache or database applications fit into these categories. Creating applications will become easier as SNIA’s NPM is incorporated into operating systems and subsequently adopted by the programming community.