SAP HANA, across its different processes, reserves a pool of memory before actual use. This pool of allocated memory is preallocated from the operating system over time, up to a predefined global allocation limit, and is then efficiently used by SAP HANA as needed.
SAP HANA preallocates and manages its own memory pool, used for storing in-memory table data, thread stacks, temporary results, and other system data structures. 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.
By default, the allocation limit is calculated as follows: 90% of the first 64 GB of available physical memory on the host plus 97% of each further GB.
There is normally no reason to change the value of this variable, unless you purchased a license for less than the total amount of physical memory. In this case, you need to change the global allocation limit to remain in compliance with the license.
Another case in which you may want to limit the size of the memory pool is on development systems with more than one SAP HANA system installed on a single host. This will avoid resource contentions or conflicts.
Service Allocation Limit
In addition to the global allocation limit, each service running on the host has an allocation limit, the service allocation limit. Given that collectively, all services cannot consume more memory than the global allocation limit, each service has what is called an effective allocation limit. The effective allocation limit of a service specifies how much physical memory a service can in reality consume given the current memory consumption of other services.
What happens when the allocation limit is reached?
Memory is a finite resource. 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, and column store tables are unloaded, column by column, based on a least-recently-used order, up to a preset lower limit. When tables are partitioned over several hosts, this is managed on a host-by-host basis; that is, column partitions are unloaded only on hosts with an acute memory shortage.
Table (column or partition) unloading is generally not a good situation since it leads to performance degradation later when the data will have to be reloaded for queries that need them. You can identify pool exhaustion by examining the M_CS_UNLOADS system view.
However, it is still possible that the memory manager needs more memory that it is available. For example, when too many concurrent transactions use up all memory, or when a particularly complex query performs a cross join on very large tables and creates a huge intermediate result that exceeds the available memory. Such situations can potentially lead to an out-of-memory failure.
- Join Engine
- OLAP Engine
- Calculation Engine
- ROW Engine
- SQL Engines
1)JOIN Engine:
2)OLAP Engine:
3) CALCULATION Engine:
Task:
How to Enable or Disable Automatic Log Backup in SAP HANASolution:
By default SAP HANA creates redo log backups. You can enable or disable from HANA studio.There are two ways to disable or enable Automatic Log backup.
a. from Backup console
b. from Configuration tab in HANA studio.
1. Backup Console
a. go to HANA STUDIO
b. Double click on
c. You will see below screen
d. Click on “Configuration”
e. You will see below screen
f. You will have to check or uncheck “Enable Automatic Log Backup” option to enable or disable
Automatic Log backup.
g.Now we see other way to enable or disable automatic Log backup.
2. From configuration tab in HANA studio.
a. Go to HANA studio
b. Double click on HANA server SID.
c. You will see below screen
d. Click on “Configuration” tab
e. You will see below screen
f. Type “enable_auto_log_backup” in Filter Filed
g. You will see below screen
h. Double click on “enable_auto_log_backup” in the above screen. You will see below screen.
i. Now you need to specify Yes or NO to enable or disable automatic log backup.
j. And click on “SAVE” to save the option.
SAP HANA DB restart is not required. Changes takes effect immediately.