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
ABAP app server, second HANA instance or other software on the same host.
0 = not set.
Your results
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.
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.
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.
Related Tools
SAP HANA Memory Sizing Calculator
First-pass SAP HANA memory and disk estimate from source database size, compression ratio, growth and work space, with a growth-by-year chart.
SAPSAP HANA Disk Sizing Calculator (/hana/data, /hana/log, /hana/shared)
Work out the size of the HANA data, log and shared file systems from host RAM, net data size and growth, using the formulas in SAP's storage requirements white paper.
SAPSAP HANA Table Partition Calculator (2 Billion Row Limit)
Project a HANA column table's row count, see how many years remain before the 2^31 rows per partition limit, and get a partition count for your horizon.
SAPSAP Business One HANA Server Memory Sizing Calculator
Estimate the RAM a SAP Business One version for SAP HANA server needs from company database sizes, growth, compression and concurrent users.
More SAP tools
See all- SAP HANA Monitoring Views Reference (M_ System Views)
- SAP HANA SQL Error Codes Reference
- SAP HANA Memory Usage SQL Generator (Used, Resident, Heap)
- SAP HANA Table Load, Unload and Preload SQL Generator
- SAP HANA Backup SQL Statement Generator (Data, Delta, Catalog)
- SAP HANA Backup Storage and Retention Calculator
- SAP HANA Log Volume Full Time Calculator (Log Backup Outage)
- SAP HANA Revision and SPS Upgrade Checklist (hdblcm)
- SAP HANA Performance Health Checklist (Memory, CPU, Locks, Merges)
Keep exploring
Free tools
- SAP Business One HANA Server Memory Sizing CalculatorEstimate the RAM a SAP Business One version for SAP HANA server needs from company database sizes, growth, compression and concurrent users.
- SAP HANA Memory Usage SQL Generator (Used, Resident, Heap)Builds five monitoring queries for a HANA tenant: used memory against the allocation limit per service, host resident memory, top heap allocators, top column tables and daily used-memory history.
- SAP HANA Memory Sizing CalculatorFirst-pass SAP HANA memory and disk estimate from source database size, compression ratio, growth and work space, with a growth-by-year chart.
ERP fixes and how-tos
- Private AI for SAP Business One: Service Layer, a read replica and a local modelAdd a private AI assistant to SAP Business One: Service Layer reads, SQL Server or HANA replica, document index, local LLM, permissions and approvals.
- SAP S/4HANA API Guide: Business Hub, OData, Public Cloud and Business PartnerA guide to SAP S/4HANA APIs: the Business Accelerator Hub, A2X OData, the Business Partner API, public cloud communication arrangements, PI/PO and Digital Manufacturing.
AI on your ERP
- AI for SAP Business One, Without Sending Your Books to a Public APIAdd AI to SAP Business One without sending customer data or financials to a public API. Service Layer and DI API integration, sized for an SMB budget.
- AI for ERP Credit Management: Limits, Holds and Exposure Without SpreadsheetsAI on your ERP for credit limit reviews, order hold triage and exposure questions. Read-only by default, role-aware and deployable on-prem.
Integrations
- How to connect Power BI to SAP Business OneConnect Power BI to SAP Business One: SQL Server or HANA direct, Service Layer OData, gateway setup, key manufacturing dashboards and natural-language Q&A.
- How to connect Power BI to SAP S/4HANAConnect Power BI to SAP S/4HANA using the HANA connector, OData or a warehouse, set up the on-prem gateway, and build manufacturing dashboards with AI Q&A.