Why would you want to do that? Suppose you have a fixed budget to buy extra memory for your system. Somewhat counterintuitively, this option involves disregarding the persistence of NVRAM and using it as a volatile extension of DRAM.
Another solution is to use prepackaged data structures and APIs, but if you are looking to create your own highly optimized data structures, you must implement your own logging and recovery or other mechanisms that protect your data similarly to transactions. One solution is to wrap memory operations in transactions however, programming transactional memory is notoriously difficult.
To make matters worse, even if the logical operation had completed before the crash, the data might have been written only to CPU caches
Upon restart, you’ll end up with corrupted data. For example, suppose you are inserting an item into a linked list, and you have set the source pointer, but the crash occurs before setting the destination pointer. Your program may crash in the middle of a logical operation on a data structure. Persistent Memory Development Kit (PMDK) provides APIs for that.Ī more difficult problem is surviving a crash.
A variable name is not sufficient, because it is not unique thus, you have to restructure your code to make sure your data has persistent identifiers. If your system crashes and you would like to be able to find your data after restart, you need to name it. Although this setup sounds simple, in practice, it is still challenging to program for this model. They are just there, even after you quit your application or if it suffers a crash. Imagine that all your data structures live in memory and that you never have to worry about saving them to files. In any case, both the price and density of NVRAM are closer to those of DRAM than to those of SSD, so using it as storage is not recommended. Using NVRAM as regular storage can deliver superior throughput (compared to SSD) for read-dominant workloads, but this approach hinders write-dominant workloads because of Optane NVRAM’s limited write throughput (see the section “Performance properties of Optane NVRAM”). The persistent memory fabric itself can be packaged as a solid-state drive (SSD), as in Optane SSDs, or as a dual-inline memory module (DIMM) that looks almost like its DRAM counterpart and lives in the same type of slot on the motherboard.Įven when NVRAM is packaged as a non-volatile DIMM (NVDIMM), we can ask the operating system to present it as a block device, put a file system on top, and use it just like regular storage.īroadly speaking, there are three ways to use NVRAM: Optane NVRAM can act as both storage and memory. In this article, we share our experience, describe the lessons learned, and evaluate the costs and benefits of this approach. , with a volatile NVRAM cache that retains frequently used file blocks. In pursuit of this goal, we extended our storage engine, It can be seen as an extension of volatile DRAM, but a denser and a cheaper one.
In certain scenarios, its access latency even approaches that of dynamic random access memory (DRAM).Īt MongoDB, we have been thinking about how to use NVRAM in the storage engine. Like memory, it sits on the memory bus and can be accessed by CPU using load/store instructions. Like storage, Optane NVRAM retains data after a crash or power outage. Intel Optane DC Persistent Memory is a non-volatile memory (NVRAM) product that resembles both storage and memory and can be used as either. Integrating Support for Non-Volatile Memory Into WiredTiger With this integration, when you connect to MongoDB and Atlas with DataGrip, you get a console/shell experience that is 100% consistent with what you get in the terminal or in the other MongoDB’s developer tools. This is the result of a close collaboration between engineering teams at MongoDB and JetBrains and we are excited to finally release it to all our users.
IntelliJ, PhpStorm, P圜harm), you can install the Database Tools plugin and work with MongoDB right inside your IDE.Īs we announced last week at MongoDB.live, the MongoDB plugin in DataGrip and in the other JetBrains IDE now includes a database console built on top of the MongoDB Shell. If you use any of the other JetBrains commercial products for development (e.g.
DataGrip is a professional DataBase IDE and is a great tool for advanced data exploration and analytical queries for your data in MongoDB and Atlas. JetBrains released a new version of DataGrip that includes support for MongoDB and ships with the MongoDB Shell out of the box.Ī few months ago, JetBrains released the first version of DataGrip that supports MongoDB.