SAP ABAP Extended Memory and Heap Sizing Calculator
This calculator estimates how much extended memory and physical RAM an SAP ABAP application server on Linux or Unix needs, from concurrent users, background work processes and buffer size, and shows how many users the installed RAM supports. Use it to sanity-check em/initial_size_MB and to decide when to add memory or another application server.
Your numbers
Users with an open session at peak, from SM04 or AL08.
Read the memory column in SM04 or the user context figures in ST02 at peak.
Allowance for month-end and heavy reports above the average.
Your results
Planning rule of thumb, not an SAP sizing formula. Validate with ST02, ST06 and SM04 at real peak load, use SAP Quick Sizer for new systems, and follow SAP Note 88416 and the memory management documentation for your kernel and OS.
Total RAM needed vs concurrent users
Sweeps Concurrent dialog users on this server from 10 to 1000, holding your other inputs fixed.
Send us your ST02 and SM04 figures
Share peak memory figures for one application server and we will review your memory parameters against them.
Optional. The tool and every export work without this. No spam.
How to use it
Measure before you type. In SM04 or AL08 count users at a real peak and note typical memory per user; ST02 shows the extended memory in use, its maximum, and the size of buffers. Enter the number of background work processes from rdisp/wp_no_btc and a realistic memory figure for your heavy jobs, which ST03N or the job's own memory statistics can provide. The OS reserve covers the operating system, the database client, monitoring agents and anything else on the host. Move the users slider to see where the line crosses your installed RAM.
- Use one application server per calculation; each instance has its own extended memory.
- On a central instance with the database on the same host, add the database memory to the reserve.
- Repeat with month-end figures, not an average Tuesday.
How ABAP memory is allocated on Linux and Unix
A dialog work process first uses a small part of the roll area (ztta/roll_first), then extended memory up to the per-user quota ztta/roll_extension (or ztta/roll_extension_dia where set), then the rest of the roll area, and finally heap memory, at which point the work process enters PRIV mode and stays bound to that user. Extended memory is the shared pool sized by em/initial_size_MB; heap is limited per process by abap/heap_area_dia and abap/heap_area_nondia and overall by abap/heap_area_total. Under zero administration memory management (SAP Note 88416) most of these defaults are derived from PHYS_MEMSIZE. The order for non-dialog work processes depends on kernel release and settings, so check the documentation for yours.
Formula and worked example
Dialog memory = users x memory per user x peak factor / 1024. Batch memory = background work processes x memory per job / 1024. Suggested em/initial_size_MB = dialog plus batch memory in MB. Total RAM = dialog + batch + buffers / 1024 + reserve. With the defaults: 150 x 250 x 1.5 / 1024 = 54.9 GB for dialog, 8 x 1,500 / 1024 = 11.7 GB for batch, so em/initial_size_MB of about 68,250, plus 11.7 GB of buffers and 8 GB reserve gives about 86 GB, leaving roughly 32 percent headroom on 128 GB. The basis is simple capacity arithmetic, not an SAP formula; real user contexts vary widely.
Reading memory errors
TSV_TNEW_PAGE_ALLOC_FAILED means an internal table could not grow because the user context hit its extended memory and heap limits, usually a report reading too much; fix the program or its selection first, and raise limits only if the requirement is real. SYSTEM_NO_ROLL means no roll memory was available. Many work processes in PRIV mode in SM50 point to users who exhausted their extended memory quota, which blocks dialog work processes for others. If ST02 shows extended memory maximum use close to the pool size, the pool is too small; if ST06 shows paging, the host has less RAM than the configuration assumes.
Frequently Asked Questions
What does no memory available mean in SAP?
The user context could not get more memory: extended memory quota and heap limits were reached, or the extended memory pool was full. Check ST22 for TSV_TNEW_PAGE_ALLOC_FAILED or SYSTEM_NO_ROLL, ST02 for extended memory use, and the program's selection before changing parameters.
How do I calculate em/initial_size_MB?
Estimate peak concurrent users times memory per user, plus background work processes times memory per job, and size the pool to cover both. Then confirm with ST02 maximum use under real load. Under zero administration memory management the default comes from PHYS_MEMSIZE.
What is PRIV mode in an SAP work process?
When a dialog user exhausts extended memory, the work process allocates heap and stays attached to that user until the transaction ends. SM50 shows it as PRIV. Too many PRIV processes leave fewer dialog work processes for other users and slow the system.
How many work processes should an SAP application server have?
It depends on CPU cores, workload mix and response time targets, not only memory. A common starting point is based on cores per instance, adjusted with ST03N and SM50 utilisation. This calculator covers memory; size work processes separately with your CPU data.
If your Basis team wants to ask about memory peaks, dumps and PRIV mode across all application servers in plain English, on your own servers, we can set that up.
Related Tools
SAP Basis Transaction Codes Cheat Sheet
A searchable reference of the SAP Basis, security and system administration transaction codes you use every week, grouped by area.
SAPSAP Basis Security Hardening Assessment
Answer ten questions about your SAP system security basics and get a score with the gaps to close first.
Developer ToolsSAP BW Process Chain API ABAP Generator (RSPC_API_CHAIN_START)
Generate an ABAP report that starts a process chain through the RSPC API, polls its status until green or red, interrupts a schedule, or lists scheduled chains.
Developer ToolsSAP Gateway SEGW DPC_EXT CRUD Methods Generator (ABAP)
Fill in your SEGW project, entity set and backend table and get the five redefined DPC_EXT methods for an OData V2 service, with $filter, $top, $skip and $inlinecount handled.
More SAP tools
See all- SAP Transport Return Codes Reference (tp RC 0, 4, 8, 12, 16)
- SAP Transport Request Tables Reference (E070, E071, E07T)
- How to Transport Variants, SO10 Texts, Table Entries and Layouts in SAP
- SAP Work Process Types and SM50 Status Reference
- SAP GUI Connection Error Codes Reference (88, 10054, 10061)
- SAP NetWeaver Release to SAP_BASIS and Kernel Reference
- SAP Gateway OData Transaction Codes Reference (SEGW, /IWFND/)
- SAP Kernel Upgrade Command Generator (Linux, SAPCAR)
- SAP Gateway OData Service Activation and Transport Checklist
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.
- ABAP Internal Table Memory Size CalculatorEstimate the memory an internal table needs, check it against a session limit and find the safe row count before you hit a short dump.
- 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.