Best Practice 14.4 – Consider memory as an alternative to storage - SAP Lens

Best Practice 14.4 – Consider memory as an alternative to storage

Consider the performance advantages of using memory for supported scenarios in the database or application layer. SAP HANA uses memory by default, but might benefit from options to optimize load or offload static data. Relational databases should take advantage of caching, and application servers should consider if swap is a requirement.

Suggestion 14.4.1 – Optimize memory usage for SAP HANA

Seek to understand the correlation between SAP HANA memory requirements and operating system memory indicators to help ensure that memory bottlenecks do not impact performance.

To improve database startup performance in scenarios that do not involve a host restart, consider the use of the SAP HANA Fast Restart option. The SAP HANA Fast Restart option dedicates a portion of RAM as a temporary file system (tempfs), which is treated by the operating system as persistent memory (until operating system restart) and allows placement of column store main portion in that tempfs, which remains there through an index server restart or crash. Thus, no reloading from storage (using I/O) is necessary.

Suggestion 14.4.2 – Use database caching for relational databases

For a relational database with high read IOPS requirements, database caching allows you to significantly increase throughput and lower the data retrieval latency. The cache acts as an adjacent data access layer to your database, to improve read performance.

The following documentation provides information about caching use-cases, but as most of this detail is relevant to AWS databases, consult SAP Notes for information specific to your relational database configuration.

Suggestion 14.4.3 – Evaluate swap space requirements for SAP applications

When physical memory resources are exhausted, SAP uses swap to move inactive pages to a dedicated disk-based storage area. Although having swap can prevent the application from crashing due to memory insufficient memory, we recommend applying configuration parameters and memory sizing so that swap is used infrequently.

If swap usage is expected, evaluate the characteristics of the allocated volume to avoid further performance issues. Swap can prevent out of memory situations for SAP applications, when the host runs out of physical memory.