# SAP RFC Connection Pool Sizing Calculator

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

## Short answer

Calculate the concurrent RFC connections an external application needs and compare them with gateway and destination limits.

## Category

sap

## Erp

SAP ECC / S/4HANA

## Audience

- SAP Basis admin
- SAP integration developer
- Java and .NET integration developer

## Tool

**Kind:** calculator

**Inputs:**

#### Average RFC calls per second

**Key:** calls_per_sec

**Type:** number

**Default:** 40

**Min:** 0

**Step:** 5

**Unit:** calls/s

#### Average call duration

**Key:** avg_call_sec

**Type:** slider

**Default:** 0.8

**Min:** 0.1

**Max:** 10

**Step:** 0.1

**Unit:** sec

**Help:** Time the connection is held, including network and the function module runtime.

#### Peak to average factor

**Key:** peak_factor

**Type:** number

**Default:** 2.5

**Min:** 1

**Step:** 0.1

#### Safety headroom

**Key:** headroom_pct

**Type:** number

**Default:** 25

**Min:** 0

**Max:** 200

**Step:** 5

**Unit:** %

#### Connection limit you can use

**Key:** max_conn

**Type:** number

**Default:** 200

**Min:** 1

**Step:** 10

**Unit:** connections

**Help:** Remaining capacity on the gateway and application servers for this client, from your Basis team.

#### Application servers the load is spread across

**Key:** app_servers

**Type:** number

**Default:** 3

**Min:** 1

**Step:** 1

**Unit:** servers

**Outputs:**

#### Average concurrent connections

**Key:** avg_conc

**Expr:** calls_per_sec * avg_call_sec

**Format:** decimal

**Description:** Little's law: arrival rate times time in system.

#### Peak concurrent connections

**Key:** peak_conc

**Expr:** avg_conc * peak_factor

**Format:** decimal

#### Recommended pool size

**Key:** pool_size

**Expr:** ceil(peak_conc * (1 + headroom_pct / 100))

**Format:** integer

**Primary:** true

#### Connections per application server

**Key:** per_server

**Expr:** ceil(pool_size / app_servers)

**Format:** integer

#### Share of your connection limit used

**Key:** util_limit

**Expr:** pool_size / max_conn * 100

**Format:** percent

**Primary:** true

#### Spare connections

**Key:** spare

**Expr:** max_conn - pool_size

**Format:** integer

**Description:** Negative means the pool would exceed the limit.

**Chart:**

#### Recommended pool size vs call duration

**Type:** line

**X:** avg_call_sec

**From:** 0.1

**To:** 5

**Steps:** 25

**Series:**

- pool_size

**Disclaimer:** First-order sizing. Confirm gateway parameters such as gw/max_conn and gw/max_sys with your Basis team, and load test.

## Content

**Intro:** External applications calling SAP through RFC or JCo often fail not in the code but at the connection limit. This calculator estimates how many concurrent connections you need and whether the gateway can carry them.

**Sections:**

#### How to use it

**Body:** Enter the average number of RFC calls per second from the client application, the average time each call holds a connection, and a peak factor from your busiest period. Add a headroom percentage for retries and bursts. Then enter the number of connections your Basis team can allocate and how many application servers share the load. The result is a pool size for the client and a utilization figure against the SAP side.

#### The formula

**Body:** By Little's law, concurrent connections equal arrival rate multiplied by the time each call occupies a connection. Multiplying by the peak factor and headroom gives a pool size. The chart sweeps call duration, which usually matters most: if a function module slows from 0.5 to 2 seconds because of a database problem, the same call rate suddenly needs four times as many connections, which is how a small slowdown becomes a full outage.

#### Reading the result

**Body:** If pool size is well under your limit, set it as the maximum pool in the client and keep a lower idle size. If utilization is above 70 to 80 percent, talk to Basis about gateway parameters and logon groups defined in SMLG, or reduce call duration with bulk function modules instead of many small calls. Use SMGW to watch live gateway connections, and SM59 to confirm the destination settings, including load balancing mode.

#### Common mistakes

**Body:** Setting an unlimited client pool is the classic error, because a slow backend then consumes every connection and dialog work process. Another is calling one function module per record when a table-based interface exists. A third is forgetting that each connection also uses a dialog work process while a call runs, so limits in SM50 or SM66 matter as well as the gateway.

**Cta:** If you are moving from point-to-point RFC calls to a governed integration layer, Netray can help design the interface and the limits around it.

**Faq:**

#### What does a JCo or NCo pool size do?

**Answer:** It caps how many connections the client opens to SAP at the same time. Requests above the cap wait or fail, which protects SAP but can stall your application if sized too low.

#### Which gateway parameters matter?

**Answer:** Parameters such as gw/max_conn (maximum connections) and gw/max_sys (maximum connected systems) limit the gateway. Ask your Basis team for the current values and what is already used.

#### Is RFC call duration the function module runtime?

**Answer:** It is the whole time the connection is held: network, authentication on first use, function module runtime and result transfer. Measure it from the client side to be safe.

#### Should I use tRFC or qRFC instead?

**Answer:** For asynchronous, guaranteed-delivery scenarios, yes. They decouple the sender from the load and are monitored in SM58 and SMQ1 or SMQ2. Synchronous RFC suits request-response needs.

## Search terms

sap rfc connection pool size, sap jco connection pool sizing, rfc concurrent connections, sap gateway max connections, sm59 destination capacity, rfc call rate calculator, sap nco connection pool, rfc performance sizing

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