# SAP ABAP Extended Memory and Heap Sizing Calculator

> Source: https://netray.co/tools/sap-abap-extended-memory-sizing-calculator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Estimate the extended memory, batch memory and physical RAM an ABAP application server needs from concurrent users, batch work processes and buffer size, and check headroom against installed RAM.

## Category

sap

## Erp

SAP NetWeaver / Basis

## Audience

- SAP Basis administrator
- Infrastructure architect

## Tool

**Kind:** calculator

**Inputs:**

#### Concurrent dialog users on this server

**Key:** users

**Type:** slider

**Default:** 150

**Min:** 10

**Max:** 1000

**Step:** 10

**Unit:** users

**Help:** Users with an open session at peak, from SM04 or AL08.

#### Average extended memory per active user

**Key:** em_user

**Type:** number

**Default:** 250

**Min:** 10

**Step:** 10

**Unit:** MB

**Help:** Read the memory column in SM04 or the user context figures in ST02 at peak.

#### Peak factor

**Key:** peak

**Type:** number

**Default:** 1.5

**Min:** 1

**Step:** 0.1

**Help:** Allowance for month-end and heavy reports above the average.

#### Background work processes (rdisp/wp_no_btc)

**Key:** btc

**Type:** number

**Default:** 8

**Min:** 0

**Step:** 1

#### Average memory per running batch job

**Key:** batch_mb

**Type:** number

**Default:** 1500

**Min:** 0

**Step:** 100

**Unit:** MB

#### Buffers and other shared memory (ST02 total)

**Key:** buffers_mb

**Type:** number

**Default:** 12000

**Min:** 0

**Step:** 500

**Unit:** MB

#### OS and other software reserve

**Key:** reserve_gb

**Type:** number

**Default:** 8

**Min:** 0

**Step:** 1

**Unit:** GB

#### Installed RAM on the server

**Key:** installed_gb

**Type:** number

**Default:** 128

**Min:** 1

**Step:** 8

**Unit:** GB

**Outputs:**

#### Dialog user memory (GB)

**Key:** dialog_gb

**Expr:** users * em_user * peak / 1024

**Format:** decimal

**Description:** Concurrent users times average memory per user times peak factor.

#### Batch memory (GB)

**Key:** batch_gb

**Expr:** btc * batch_mb / 1024

**Format:** decimal

**Description:** All background work processes running an average job at the same time.

#### Suggested em/initial_size_MB

**Key:** em_mb

**Expr:** ceil((dialog_gb + batch_gb) * 1024)

**Format:** integer

**Description:** Extended memory pool large enough for dialog and batch user contexts.

#### Total RAM needed (GB)

**Key:** total_gb

**Expr:** dialog_gb + batch_gb + buffers_mb / 1024 + reserve_gb

**Format:** decimal

**Primary:** true

**Description:** User memory plus buffers plus operating system reserve.

#### Headroom vs installed RAM

**Key:** headroom

**Expr:** (installed_gb - total_gb) / installed_gb * 100

**Format:** percent

**Description:** Negative means the server is likely to page or hit memory limits at peak.

#### Users the installed RAM supports at this profile

**Key:** max_users

**Expr:** max(0, floor((installed_gb - batch_gb - buffers_mb / 1024 - reserve_gb) * 1024 / (em_user * peak)))

**Format:** integer

**Chart:**

#### Total RAM needed vs concurrent users

**Type:** line

**X:** users

**From:** 10

**To:** 1000

**Steps:** 34

**Series:**

- total_gb

**Disclaimer:** 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.

## Content

**Intro:** 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.

**Sections:**

#### How to use it

**Body:** 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.

**Bullets:**

- 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

**Body:** 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

**Body:** 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

**Body:** 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.

**Cta:** 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.

**Faq:**

#### What does no memory available mean in SAP?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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.

## Search terms

no memory available error in sap, sap basis work process, sap basis troubleshooting issues, sap basis administration best practices, sap extended memory sizing, em/initial_size_mb calculation, tsv_tnew_page_alloc_failed

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
