SAP Hana - Memory Pool (global_allocation_limit)

About

memory pool in Hana.

SAP HANA preallocates and manages its own memory pool, used for storing:

  • in-memory data and system table ,
  • code and thread stacks (~=6 Gb),
  • temporary (results|computation),
  • and other system data structures.

SAP HANA manages its own data memory pool by requesting memory from the OS, possibly in advance of using it.

At any given point, only parts of the memory pool are really in use. SAP refers to the total amount of memory actually in use as the SAP HANA Used Memory.

_

This is the amount used for licensing. If You have a server with 512GB, but purchased an SAP HANA license for only 384 GB. You set the global_allocation_limit to 393216 (384 * 1024 MB).

Limit

When more memory is required for table growth or temporary computations, the SAP HANA memory manager obtains it from the pool. When the pool cannot satisfy the request, the memory manager increases the pool size by requesting more memory from the operating system, up to a predefined allocation limit.

Exhaustion

Once the allocation limit has been reached and the pool is exhausted, the memory manager can no longer allocate memory for internal operations without first giving up something else:

  • Buffers and caches are released,
  • Column store tables are unloaded, column by column, based on a least-recently-used order, up to a preset lower limit. See the view: M_CS_UNLOADS

Example: number of unloads during a particular one-hour time-slot:

select count(*) from M_CS_UNLOADS where UNLOAD_TIME between '19.08.2013 09:00:00' and '19.08.2013 10:00:00'

global_allocation_limit

By default, the allocation limit is set to 90% of the first 64 GB of physical memory on the host plus 97% of each further GB.

Display

Studio

_

Sql

select HOST, round(ALLOCATION_LIMIT/1024/1024/1024, 2) as "Allocation Limit GB" from PUBLIC.M_HOST_RESOURCE_UTILIZATION

Modification

Studio

Administration > Overview

_

Sql

Change the Global Memory Allocation Limit

The global_allocation_limit parameter is used to limit the amount of memory that can be used by the database.

The value is the maximum allocation limit in MB.

Default:

  • A missing entry or a value of 0 results in the system using the default settings. The global allocation limit is calculated by default as follows:
    • > 64 Gb: 90% of the first 64 GB of available physical memory on the host plus 97% of each further GB.
    • < 64 Gb: Physical memory minus 1 GB.

Example:

ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('memorymanager', 'global_allocation_limit') = '8192' WITH RECONFIGURE;

Documentation / Reference


Powered by ComboStrap