How does SAP HANA benefit from Virtual Persistent Memory?
IBM Senior Software Developer Jim Nugen on how SAP HANA benefits from Virtual Persistent Memory
By Jim Nugen05/04/2020
Q: How Does SAP HANA benefit from Virtual Persistent Memory?
On POWER9TM servers, SAP HANA can use Virtual Persistent Memory (vPMEM) to add data persistence and increase resilience, significantly reducing downtime during planned and unplanned maintenance periods.
SAP HANA is an in-memory database that achieves high performance by loading and maintaining a significant amount of hot table data into system dynamic random-access memory (DRAM). Depending on the database size, this may range from hundreds of gigabytes to tens of terabytes. Starting such a large in-memory database can add a significant amount of startup time to load data from volumes on disk storage to be operational. Multiterabyte databases can take well over an hour to start up, which impacts availability of customer applications.
Recourses to this include the SAP HANA Fast Restart option. This SAP HANA feature retains the HANA column store main data in memory between a database shutdown and startup using OS capabilities. This represents 95% of hot table data in an SAP HANA instance. Time-consuming data loading is therefore avoided and allows simple maintenance to be performed rather quickly. However, if the OS is rebooted as part of maintenance, the memory contents are lost and data must again be reloaded at the next HANA startup.
SAP HANA also supports the use of power-resilient hardware persistent memory. In this case, the data is retained across HANA restarts, OS restarts and even system power cycles. However, as this is hardware-based, additional costs are associated and careful planning and sizing are required. Current hardware persistent memory technologies are generally also associated with higher memory latency, which may impact normal operating performance.
IBM introduced Virtual Persistent Memory with IBM POWER9* System Firmware 940 to provide DRAM-based persistence to LPARs in a PowerVM* environment. This feature allows clients to use a portion of DRAM already existing in a system to create DRAM backed persistent memory volumes. These can then be assigned to LPARs and appear to the OS just like hardware persistent memory.
vPMEM volumes maintain data persistence across HANA, OS and LPAR restarts. They will lose contents when the physical system is power cycled. However, in a PowerVM virtualized environment with hot-pluggable devices, concurrent firmware updates and other RAS features, powering off an entire managed system is very rare.
vPMEM is a no-cost feature available on every POWER9 server and doesn’t require new hardware investment because existing system DRAM is utilized. For existing SAP HANA instances, clients would simply reduce the amount of DRAM memory assigned to an LPAR and instead create and add vPMEM volumes to the LPAR. Hot table data would be shifted from volatile DRAM to LPAR persistent vPMEM volumes. The impact on SAP HANA startup time and availability when data is maintained in vPMEM volumes is significant (see Figure 1, above).
Because this feature is based on system DRAM, accessing data in LPAR vPMEM volumes has the same performance characteristics as accessing data in LPAR DRAM. For SAP HANA support, database performance impact of less than 3% was required and demonstrated.
vPMEM persistence also offers flexibility over hardware implementations. Over time as a database grows, vPMEM volumes can be easily reapportioned from DRAM. Hardware-based persistent memory are fixed in size.
The ability to quickly and easily create and manage vPMEM volumes through the Power Systems* HMC also provides significant ease of use. vPMEM volumes are part of LPAR configuration profiles just like other resources like CPU allocation, DRAM memory and adapter resources.
Jim Nugen is a senior software developer at IBM.More →