SAP HANA Memory Usage – What should I really monitor?

With so many memory areas of SAP HANA, What should I really Monitor with respect to Memory usage of HANA database?

Below picture is key in understanding the memory allocation sequence.

hanamemory

You can control the behaviour of total memory allocated to SAP HANA database by using allocation limit parameter (global.ini -> memorymanager -> global_allocation_limit)

Unless you have additional software running on the HANA server or the HANA licensed memory is less than you physical memory, global_allocation_limit need not be set.

Default value is 0 and most of the times this is not set assuming that the server will be only used by HANA database. This means HANA DB can use the complete memory of the server.

globallmt

Memory allocation in HANA Database implements a pool concept. That is, memory is pre-allocated (reserved) from the operating system for performance reasons. By default, the HANA database will allocate up to approximately 90% of the available physical memory.

This will be used for queries that will need additional space at once. This will be RESERVED and not released back to Operating System.

Hence the reserved memory does not indicate any memory issues with the database.

Key figure to be monitored is the active memory usage of the HANA database:

memused

Same has been clarified in below SAP Note:

2081473 – HANA Resident Memory : High Memory Usage

You can monitor the current usage of memory by each tenant by using below query:

SELECT * FROM “SYS_DATABASES”.”M_SERVICE_MEMORY”

tenmem

Total memory usage of the whole database can also be monitored with HANA_MEMORY_OVRVIEW (SAP Note 1969700 ).

memoverview

You can also monitor the history of total memory usage using _SYS_STATISTICS, like example below:

memusedgg

To check if the SAP HANA Memory parameters are set optimally, you can use HANA_Configuration_Parameters_1.00.70+ (SAP Note 1969700).

Important SAP Notes:

1969700 – SQL Statement Collection for SAP HANA

1840954 – Alerts related to HANA memory consumption

2175606 – HANA: How to set allocation limit for tenant databases

2081473 – HANA Resident Memory : High Memory Usage

1999997 – FAQ: SAP HANA Memory

1998599 – How-To: Analyzing high SAP HANA Memory Consumption due to Translation Tables

2222276 – How-To: Activating SAP HANA Memory Fencing

1898317 – How to handle HANA Alert 1: ‘Host physical memory usage’

1813020 – How to generate a runtime dump on SAP HANA

AWS Certified Solution Architect – Points to remember (RDS)

  1. Relational Database Service.
  2. Supported databases (AMMMOP – If it helps!)
    Amazon Aurora
    MariaDB
    Microsoft SQL
    MySQL
    Oracle
    PostgreSQL
  3. Contrary to DynamoDB, for RDS you can select the availability Zone for RDS in a region.
  4. There is no easy way to encrypt an all already existing unencrypted RDS instance.
    You will have to make a snapshot add and encryption key to snapshot and restore the session using this encrypted snapshot.
  5. All database backups are automatically deleted once you delete the RDS instance.
  6. Default backup retention period is 1 day and can be extended up to 35 days.
  7. Read replicas are Asynchronous and Multi-AZ is Synchronous.
  8. Anything with read performance improvement points to Read Replicas and Anything with availability points to Multi-AZ Deployments.
  9. Backups are automatically deleted if you delete the RDS instance. May be there is still a snapshot if the person who deleted selected this option.