SAP Hana - Memory Pool (global_allocation_limit)

Sap Hana Memory

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.

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

Sap Hana Studio Global Allocation Limit

Sql

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

Modification

Studio

Administration > Overview

Sap Hana Studio Global Allocation Limit Configuration

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





Discover More
Sap Hana Memory
SAP Hana - Memory

When SAP HANA starts up, the OS reserves memory for the program code (sometimes called the text), the program stack, and static data. It then dynamically reserves additional data memory upon...
Sap Hana Memory
SAP Hana - Resident Memory

Resident memory in Hana. See also: Once a temporary computation completes or a table is dropped, the freed memory is returned to the memory manager, who recycles it to its pool, usually without informing...
Sap Hana Used Memory
SAP Hana - Used memory

The total amount of memory used by SAP HANA is referred to as used memory. 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...
Sap Hana Memory
Sap Hana - Memory Manager (mm)

When more memory is required for table growth or temporary computations, the SAP HANA memory manager obtains it from the pool.
Hana Column Store Write Read Operations
Sap Hana - Table Column - Column Store

Table column. Data Structure Access Pattern Compression Main Storage Optimized for read access Advanced Delta Storage Optimized for write access Basic Read operations are performed on...



Share this page:
Follow us:
Task Runner