Skip to Content
Technical Articles

What is HANA persistent memory or NVRAM (Available since SAP HANA 2.00.035)

SAP HANA Persistent memory (NVRAM):

1.What is NVRAM?

NVRAM is an emerging class of memory storage devices offering a DIMM form-factor. Hence, it can be treated by the CPU as RAM, not as a block device: it is byte-addressable, directly accessible using load/store instructions, and covered by CPU cache-line handling, including cross-socket cache coherency. The device latency is expected to be close to that of DRAM and its bandwidth lower than that of DRAM. The density, durability and economic characteristics however match that of existing blockbased storage media. Due to these attributes, NVRAM can potentially benefit applications that deal with big data analytics, in-memory databases, high availability systems, etc

2.How does data in HANA gets distributed if we use SAP HANA persistent memory?

SAP HANA knows which data structures benefit most from persistent memory. SAP HANA automatically detects persistent memory hardware and adjusts itself by automatically placing these data structures on persistent memory, while all others remain in DRAM.

SOURCE PICTURE:

https://blogs.sap.com/wp-content/uploads/2018/12/blog2_pic2_v2.png

3.How does column store table takes advantage of SAP HANA persistent memory?

As SAP HANA Persistent Memory(NVM) is heavily optimized in terms of compression, HANA column store tables which does not  get modified frequently (less than once per day) are excellent candidates for HANA persistent memory.

It is also a very stable – non-volatile – data structure. The main store typically contains well over 90% of the data footprint in most SAP HANA databases, which means it offers a lot of potential. Furthermore, it is reconstructed rarely during the delta merge. A process that is only triggered after a certain threshold of changes to the database table was reached. For most tables, a delta merge does not happen more than once a day.

4.How does a column store table gets distributed in case if NVRAM?

The large memory allocations of Main Column Fragments are placed directly in NVRAM, notably the dictionary and column vector backing arrays. Each Main Column Fragment has an associated NVRAM block containing them. As illustrated below, smaller intermediate data structures of Main Column Fragments are still allocated in DRAM. Likewise, all Delta and MVCC data structures are allocated in DRAM. The intermediate results of query processing also continue to be allocated in DRAM. When a Main Column Fragment is loaded into memory, its large data structures are not allocated in DRAM and initialized from disk anymore. Instead, each Main Column

SOURCE:http://www.vldb.org/pvldb/vol10/p1754-andrei.pdf

Fragment locates its associated NVRAM block and points directly to its column vector and dictionary backing arrays

5.How does usage of HANA NVM helps start up time?How is it advantageous over DRAM?

With pure DRAM, this initial load happens every time the database is started, which means also after planned or unplanned outages. Systems that cannot tolerate the impact on performance often use system replication to circumvent this With persistent memory, the initial load of the column store is no longer necessary. Column store data is retained across database and even server restarts, which decreases the loading time significantly.

https://blogs.sap.com/2020/01/30/sap-hana-and-persistent-memory/

6.With the usage of persistent memory , does the memory requirement increases ?

Data in persistent memory isn’t redundant to data in DRAM. Column store main storages stored in persistent memory aren’t stored in DRAM. So the overall amount of required memory doesn’t change when using persistent memory.

7. What are the prerequisite for using persistent memory?

Persistent memory is supported with SAP HANA 2.00.035 and higher. We need to have the appropriate underlying hardware in place in order to take advantage.

For more prerequisites like supported operating systems see SAP Note 2618154.

8.Does the parameter global_allocation_limit affects persistent memory usage in HANA ?

No. This parameter only covers the DRAM part of the memory, not the persistent memory part. So compared to an installation without persistent memory lower values are used

9.What are the advantages and disadvantages that can be used while using NVRAM against DRAM?

In the DIMM form-factor, the next-generation of NVRAM  will have impressive qualities.

-It will provide performance that is close to what only DRAM can achieve today.

-It will exceed the capacity of DRAM devices at a lower price per GB.

– Attached to a CPU socket memory channel, its use is transparent (except for its persistency): it is directly accessible using load/store instructions, byte-addressable, and covered by CPU cache line handling, including cross-socket cache coherency.

-Applications can access it directly without additional copies in DRAM.

-Likewise, the NVRAM data transfers, similar to DRAM data transfers, are fine-grained at the size of a cache line instead of blocks.

– NVRAM being non-volatile, its contents will not be lost on system restart.

-HANA’s memory-oriented algorithms simply work as such, without the need for substantial changes to obtain an NVRAM-enabled binary

However, there are several limitations of this new type of memory.

-The access latency is expected to be higher than that of DRAM, while the bandwidth is expected to be lower.

-An asymmetry is expected between reading and writing, i.e. writing will be slower than reading.

 

Thanks for reading!
Follow for more such posts!
Like and leave a comment or suggestion if any!

 

 

 

Be the first to leave a comment
You must be Logged on to comment or reply to a post.