You’ve probably heard similar confusing technical terms from various sources, such as nonvolatile memory, persistent memory, proud persistent memory, Even the English nouns Optane SSD, Optane Persistent Memory, PMEM, DCPMM, AEP and so on…… What exactly are these terms? What’s the connection? What’s the use? This article from the popular science Angle, help you answer these questions. Hopefully, whether you are a programmer or a related professional, you have at least a good idea of what persistent memory is and what it can do.


What exactly is persistent memory?

To answer the confusing nomenclature question, let’s put aside the evolutionary relationship between these names for a moment, and simply assume that most of them refer to the same thing (not exactly). At present, Intel Chinese official name is “Intel Ao persistent memory”, abbreviated as “persistent memory”. The English official name is Intel Optane Persistent Memory, or PMEM for short. Therefore, in this article, the term “persistent memory” or “PMEM” will be used.

So for the record… At the end of the day, persistent memory is actually a new type of memory, we can take a look at it, it looks like this, and ordinary memory is actually not very different, and it is inserted into the server’s memory slot.



So in a nutshell, you can buy it yourself, plug it into a memory slot on your server, and you can use persistent memory. Of course, persistent memory has certain requirements for hardware, AMD CPU is not to think about, persistent memory is Intel’s exclusive magic weapon, naturally will not be left to competitors to do support. Specific CPU support models can be found by themselves, here is not much detail. Of course, if you want to play the maximum advantages of persistent memory, there are certain details in the hardware configuration interpolation, which will be detailed later.

Then we look at where persistence resides in the overall computer architecture. If you have studied computer, you must be very familiar with the structure of the storage pyramid of computer. So if we put persistent memory into this pyramid, where would it be? Let’s look at it in detail. In the storage pyramid shown below, we can see that persistent memory is in the middle between external memory (HDD or SSD) and memory DRAM, which is in the middle of the two in terms of capacity, performance, and price. Other than that, functionally, it’s a complete DRAM/memory hybrid (which is why PMEM is marked half sea water, usually fire). That is, it can be used either as memory or as a persistent external memory device, or both, depending on how you use persistent memory.



If you still don’t understand what I’m describing, the three most important characteristics of persistent memory are: large, fast, and persistent:

  1. Large: The current maximum memory capacity of a single persistent memory can be up to 512 GB, while the current maximum memory capacity of a single server memory is 32/64 GB. That is, a single server can easily reach terabytes of memory using persistent memory. Persistent memory, on the other hand, is about half the price per unit of regular memory.
  2. Fast: since also known as the memory, it must not slow. As you can see, persistent memory has a latency performance advantage of 1-2 orders of magnitude over regular SSDs, which is even greater than the advantage over hard disks. Of course, compared with DRAM, there will be a certain performance gap. But in practice, because the performance bottleneck is not necessarily in memory, there is generally not a particularly significant gap (performance degradation is generally within a factor of one).
  3. Persistence: In general, persistent memory has the same characteristics as hard disk. After power off, the data in memory will still exist. This feature can be described as seckill memory, the memory of the data we all know when the power or program exit no longer exist. This feature allows persistent memory to be used both as a high-speed persistence device and to meet the need for fast recovery in certain scenarios of memory applications. The following table summarizes a typical configuration for a single server in a data center, along with approximate performance numbers for reference. Rough Performance Performance of Common Memory and Persistent Devices on a Single Server What are the main scenarios for the advantage of persistent memory? Having said persistent memory features, you can also imagine that it has unique advantages in some application scenarios. Specifically, persistent persistence may actually have the following gameplay in the landing. The following are some examples of specific scenarios, and the advantages and problems of using persistent memory are presented dialectically. Scenario 1: Large memory and low cost solution If your application’s memory consumption is critical and is a resource bottleneck for the entire system, then using persistent memory will be your best solution to reduce your cost. There are two situations in which your system generally has special requirements for the larger system
  4. For memory performance considerations, you must use a memory based solution rather than a disk-based solution such as an in-memory database (Redis, MemSQL).
  5. While your application can accept the performance penalty of being disk-based, it is clear that your application can run faster and save time if you have more memory, such as an application built on Spark. In this scenario, you can consider using persistent memory to provide a large memory and low cost solution. Pros: Persistent memory is about half the price per unit of normal memory, and can easily reach 1.5TB or even 3TB on a single machine. So for example, if you’re aiming for a total memory capacity of 20 terabytes, persistent memory might only be available on 10 machines, but a cluster based on DDR memory might need 40 or more. Considering the machine input and operational costs, the advantages of a low-cost solution provided by persistent memory are obvious. Possible problems: The introduction of persistent memory, compared to memory, may lead to some performance degradation. The degradation may be caused by persistent memory itself, or by the reduction in the number of machines and other hardware resources (such as CPU cores or network bandwidth). Therefore, in the actual project implementation, as a decision maker, it must be carefully evaluated to quantify the benefits of persistent memory. Scenario 2: Application of High Performance Persistence Requirements Persistent memory, as a hybrid of memory and external memory, has high-speed persistence characteristics that are a game-breaker in some scenarios where disk IO is a performance bottleneck. While SSDs can alleviate disk IO bottlenecks to some extent, PMEM is revolutionary compared to a persistence device that can achieve two orders of magnitude of throughput and latency improvements. Here are a few scenarios where disk IO is a performance bottleneck.
  6. Message Queuing: The familiar open source message queue, Kafka, ends up getting stuck on hard disk IO due to its message persistence logic. The current solution is to stack machines to expand the throughput of the entire Kafka cluster.
  7. Search system: Similar to Kafka, Elasticsearch, a popular open source search system, also stores parts of its data structure on disk. What ultimately affects the overall latency and throughput is disk I/O performance.
  8. Databases or KV storage engines, such as MySQL or RocksDB, have significant data persistence logic for external storage.
  9. Distributed file systems: In artificial intelligence scenarios, there are often a large number of small files. For example, in the Ceph file system, managing a large number of small files on the Metadata Server often causes performance problems due to the presence of a large number of random reads and writes. Advantages: Clearly, for scenarios where high-speed persistent reads and writes are required, the introduction of persistent memory directly improves performance by an order of magnitude. In terms of throughput, due to the increase of single machine throughput, the total number of machines can be greatly reduced. In terms of latency, it provides another dimension of advantage. For specific performance comparisons, refer to the performance comparison table at the end of the previous section. Possible Problems: As a pure persistence device, PMEM can be a double-edged sword. The main problem is that its capacity is still small compared to traditional hard disks, and it also has a high unit cost. Therefore, in some scenarios where there are high requirements for capacity in addition to performance, the use of PMEM may lead to a performance improvement, but it may also lead to a cost increase. Scenario 3: In-memory data persistence application In this scenario, the PMEM is essentially used as a memory, similar to but different from the previous high-performance persistence scenario. The previous scenario is mainly for the original software architecture design has persistence logic (for example, the file system needs to be stored on the hard disk), then we can move the persistence logic to PMEM. It may not involve complex data structure modifications per se, because it is designed with persistence logic in mind. However, in scenario 3, the in-memory data persistence scenario, the design of the in-memory data structure of the software itself does not take persistence logic into account. So you need to redesign the persistence data structure and logic for the in-memory data structure. This kind of application is the most demanding for development, and it can give full play to the characteristics of PMEM. Such scenarios tend to be purely memory-based applications that want to add data persistence. The most common requirement is for fast data recovery. Such demand generally comes from online service system (such as database Redis, or parameter server, feature engineering database, etc.). Once the online service node goes offline, the service quality will be affected. Since the system is based on the memory data structure, the data recovery after offline often requires hourly time to recapture the data and reconstruct the data structure in memory. With persistent memory, such a service can not only reduce the cost of large memory, but also increase the quick recovery capability and ensure the quality of service online. Advantages: As mentioned above, the advantages of persistent memory can be fully exploited in this mode. First of all, the large memory brings the hardware cost down. Secondly, through the persistence, the original memory application is endowed with new persistence characteristics, which can support the rapid recovery of data and ensure the quality of online service. Possible problems: The only problem with such an application might be that it involves a lot of additional development effort. The general memory data structure does not have the persistence logic, generally requires the programmer to use PMDK to redesign the persistence data structure and logic, to achieve the expected memory data persistence. How to do persistent memory development? The first thing to understand is that if memory mode is a cheap way to expand memory capacity to meet your business needs, then you don’t need development costs at all. But if it doesn’t meet your needs and there are several problems, then you might want to think about how you might need to modify your existing scene. • Memory mode performance degradation is too obvious, want to use large memory capacity while maintaining the performance close to DRAM • Want to use persistent memory to replace (or part of the replacement) the traditional external memory device, take advantage of its high-speed persistence characteristics • Want to persist the in-memory data Persistent memory development is a very large topic, and depending on what you are trying to achieve, it will be completely different. We will not expand on it here. Based on the above introduction, I believe you have a preliminary understanding of persistent memory. So do you want to know more? Do you want to experience the technology firsthand? If you want to experience the further exploration of persistent persistence AI applications, we have a great opportunity for you! The fourth paradigm and Intel jointly organized the AI Applications and Heterogeneous Memory Programming Challenge, which is based on artificial intelligence applications, using heterogeneous memory architecture as the hardware base, and exploring cutting-edge applications and core programming challenge based on Intel ® Ault ™ persistent memory. Through the contest, you will gain a new understanding of how artificial intelligence can benefit from heterogeneous memory architectures and enter a new technological realm. There will be technical experts to guide and explain the competition. At the same time, there is also a track award of up to 200,000 yuan, as well as the Intel& Fourth Paraparadigm joint laboratory internship opportunities for college students. Anyone with any technical background or interest in this technology is welcome to sign up. High reward, double track, low threshold, good experience environment and technical support, don’t hurry up to register!

Official website:https://opensource.4paradigm….

Registration link:http://openaios.4paradigm.com