SAPFree calculatorPDF, Excel, Word exportSAP HANAAll SAP HANA and Basis tools

SAP HANA Global Allocation Limit Calculator

The global allocation limit caps how much memory an SAP HANA instance may allocate on a host. This calculator shows the HANA 2.0 default for your RAM, the MB value to set if other software shares the host, a tenant allocationlimit and how much memory concurrent statements could claim under statement_memory_limit.

Your numbers

512 GB
%
GB

ABAP app server, second HANA instance or other software on the same host.

GB

0 = not set.

Your results

Default allocation limit
492.16
GB. HANA 2.0 default when global_allocation_limit = 0: 90% of the first 64 GB plus 97% of the rest.
Allocation limit with reserve
492.16
GB.
global_allocation_limit value to set
503,972
MB, global.ini [memorymanager]. Only set it if you need less than the default.
Main tenant allocationlimit
453,575
MB.
Memory exposure of heavy statements
0
GB if all heavy statements reach statement_memory_limit at once.
Share of tenant limit
0%

Default formula as documented for SAP HANA 2.0 (see SAP Note 1999997 and the Administration Guide topic on the memory allocation limit). Older revisions used a different default. Confirm for your revision.

Save results:

Default allocation limit vs RAM

Sweeps Physical RAM of the host from 32 to 2048, holding your other inputs fixed.

Get your HANA memory settings reviewed

Send your host RAM, tenants and current memorymanager parameters and we will check limits against your workload.

Optional. The tool and every export work without this. No spam.

Was this tool useful?

How to use it

Enter the physical RAM of the host. If an ABAP application server, a second HANA instance or anything else runs on the same host, enter the memory it needs as the reserve. The primary output is the default limit HANA uses when global_allocation_limit is 0. If the reserve pushes the limit below that default, set global_allocation_limit to the MB value shown. For multitenant systems enter the share the main tenant should get. Finally enter statement_memory_limit and how many heavy statements may run at once to see whether those statements alone could exhaust the tenant.

  • Leave global_allocation_limit at 0 on a dedicated host
  • Limits of co-located instances must add up below physical RAM
  • Check the effective value in M_HOST_RESOURCE_UTILIZATION (ALLOCATION_LIMIT)

Where the parameters live

global_allocation_limit is in the [memorymanager] section of global.ini and is set in MB. With the default value 0, HANA 2.0 uses 90 percent of the first 64 GB of physical memory plus 97 percent of the remaining memory. A tenant limit is the allocationlimit parameter in the same section at DATABASE layer, for example ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'DATABASE', 'PRD') SET ('memorymanager', 'allocationlimit') = '427622' WITH RECONFIGURE; run from SYSTEMDB. statement_memory_limit (GB) caps memory per statement, and statement_memory_limit_threshold (percent of the global limit) makes it apply only when total memory use is above that threshold. All of these are online changes.

  • global_allocation_limit: MB, [memorymanager]
  • allocationlimit: MB, per tenant, DATABASE layer
  • statement_memory_limit: GB; statement_memory_limit_threshold: percent

Worked example

A 512 GB host: 0.9 x 64 = 57.6 GB plus 0.97 x 448 = 434.6 GB, a default limit of about 492 GB. If an ABAP app server on the same host needs 48 GB, the limit must not exceed 464 GB, so set global_allocation_limit = 475136 MB. Give the main tenant 90 percent: about 427,622 MB. With statement_memory_limit = 50 GB and five heavy statements, those statements alone could take 250 GB, more than half the tenant, which is a sign to lower the per-statement limit or control concurrency with workload classes.

Out-of-memory errors and gotchas

When a request cannot be satisfied within the limit, HANA returns SQL error 4, cannot allocate enough memory, and writes an OOM dump trace. A statement hitting statement_memory_limit is cancelled with a memory limit error rather than crashing others. Raising the global limit above physical memory does not create memory, it invites operating system swapping. Remember that the limit includes code, stack and shared memory, not only table data, so the column store must fit inside the limit with room for working memory. Use M_SERVICE_MEMORY and M_HEAP_MEMORY to see where memory goes before changing limits.

Frequently Asked Questions

What is the default SAP HANA memory allocation limit?

In HANA 2.0, with global_allocation_limit = 0, the default is 90 percent of the first 64 GB of physical memory plus 97 percent of the rest. On a 1 TB host that is roughly 989 GB. Older revisions used a simpler percentage, so check the documentation for your revision.

Is global_allocation_limit in GB or MB?

MB. Set it in the [memorymanager] section of global.ini, normally at SYSTEM layer, for example 475136 for 464 GB. The tenant allocationlimit is also MB. statement_memory_limit, by contrast, is in GB, which is a common source of mistakes.

How does hana statement memory limit work?

statement_memory_limit caps the memory a single statement may use on a host. If statement_memory_limit_threshold is set, the cap only applies when total memory use exceeds that percentage of the global limit. A statement that exceeds it is cancelled. Workload classes can set per-class limits instead.

Can two HANA instances share one host?

Yes, if supported for your scenario, but set global_allocation_limit on each instance so the total stays below physical memory with room for the OS. Otherwise both instances assume they can use most of the RAM and the host will swap or hit OOM.

If you want your Basis team to ask why HANA ran out of memory and which statements caused it, in plain English on your own servers, we can set that up.

ArchRay builder
Design the on-prem AI stack for SAP HANA and Basis: model, GPUs, RAG pipeline, guardrails
See memory, speed and cost as you swap parts, then export the diagram. Free, in your browser.
Open the builder

Keep exploring

Free tools

ERP fixes and how-tos

AI on your ERP

Integrations

Comparisons