↓ Skip to main content
What One 4-vCPU FreeSBC Carries

What One 4-vCPU FreeSBC Carries

·11 mins·

The first post in this series ended with a promise: FreeSBC’s capacity numbers would get their own post, with the setup next to them. Here they are. On one 4 vCPU cloud VM, FreeSBC v0.5.0 relayed 5000 concurrent G.711 calls with both media legs anchored, set up 3500 calls per second from a carrier without loss, added less than 1 ms to call setup, and ran 8 hours at 3500 concurrent calls with no growth in goroutines, memory, file descriptors or ports.

FreeSBC is a pure-Go SIP/WebRTC edge proxy: one binary, one YAML file. It anchors RTP, does no transcoding, and terminates ICE-Lite and DTLS-SRTP for browsers. Every number below comes from one formal three-host run on 2026-10-18 and 2026-10-19, and the harness that produced them is in the repository.

I have not run Kamailio, OpenSIPS, rtpengine or a commercial SBC on the same rig, so this post does not say FreeSBC is faster than any of them. It gives numbers in units you can hold against your own: calls per vCPU, call setups per second on 4 vCPU, added latency, and drift over 8 hours. It also re-runs one commercial SBC’s own published test.

The numbers
#

WhatResult on 4 vCPUKind
Concurrent G.711 calls, both legs anchored5000, CPU 310 of 400knee at the 80% CPU line
Call setup, carrier to switch3500 CPS, loss-freeknee
Call setup, switch to carrier3250 CPSknee
Call setup, client to switch2250 CPS or morelower bound
Latency added to INVITE → 200below 1 msmeasured
8 h soak at 3500 concurrent calls432,000 calls, 0 failed, no growthmeasured
Registrations held / refreshed19,000 / 20,000 REGISTER/s or morelower bound
WebRTC, DTLS-SRTP100 handshakes/s, 600 calls, or morelower bound
FreeSWITCH 1.10.0 as the switch3000 calls, 1500 CPS, or morelower bound

A knee is the last step before the first one that failed the pass line. A lower bound means the generator, the switch or the test range ran out before FreeSBC did.

The rig
#

Three cloud VMs on Alibaba Cloud, all Ubuntu 24.04 on kernel 6.8, with real NICs on two subnets of one private network. One subnet plays the public side, the other the private side. The instance types and CPUs:

Topology: a load generator on the public-side subnet sends SIP over UDP and G.711 RTP to FreeSBC (4 vCPU, Xeon 6982P-C), which relays signaling and media to a switch on the private-side subnet; below it, the pass line every figure must meet

Signaling is UDP. Media is G.711 at 20 ms, in both directions, with both legs anchored by FreeSBC, so every RTP packet enters and leaves FreeSBC on each leg. FreeSBC was restarted before each ladder value.

A figure only counts if its run had under 0.1% failed calls, FreeSBC under 80% of its cores, RTP sent over received of at least 0.999 with zero kernel receive-buffer errors, and the generator and the switch each under 90% of a core. CPU is quoted with 100 meaning one vCPU, so the line on this box is 320 of 400. The last check matters most. SIPp is mostly single-threaded per instance, and a fast proxy measured with a saturated generator looks like a slow proxy.

Media: about 1600 calls per vCPU
#

The concurrent-call ladder stepped from 250 to 5500 calls, each with a 60 s ramp and two 60 s holds. CPU grew in a straight line: 20 at 250 calls, 130 at 2000, 251 at 4000. At 5000 calls it was 310 average and 338 peak, with 500,588 RTP packets per second each way, 373 MB of RSS and 0 failed calls. That is 668 Mbit/s each way. At 5500 the CPU crossed the line and the generator’s SIPp was at 94% of a core, so the figure is 5000, or slightly more, generator-bound above.

Divided out, that is about 1600 concurrent calls per vCPU, and about 0.07 MB of RSS per call, baseline included. The per-vCPU figure is arithmetic: only the 4 vCPU size ran this ladder.

The profile at 5000 calls shows where the CPU goes: 85% cumulative in the forward loop, and about 66 to 70% flat in the sendto and recvfrom syscalls. One packet in, one packet out, one syscall each. GC is not among the top entries. Batching the syscalls per socket would save few of them, so that issue was closed as not worth it at this architecture.

Signaling: thousands of setups per second, under 5 ms
#

The call-setup ladders run without media, with 2 s calls, in 40 s steps from 250 CPS, one per direction. Each knee then got a confirm run at 90% of it for 120 s.

Bar chart of the highest passing call setup rate on 4 vCPU: carrier to switch 3500 CPS loss-free, first failing step 5000; switch to carrier 3250 CPS, first failing step 3500; client to switch at least 2250 CPS, a lower bound, first failing step 2500 on the per-source cap

None of the three knees is a CPU limit: FreeSBC averaged 33 to 48% of its CPU at all of them. The confirm runs passed every call: 243,000 at 2025 CPS, 378,000 at 3150 and 351,000 at 2925, with INVITE-to-200 p95 under 5 ms at the knees.

FreeSBC’s own share of that latency was measured separately at 1000 concurrent calls. INVITE to 200 averaged 3.0 ms through FreeSBC and 3.0 ms straight to the switch. The difference is below SIPp’s 1 ms resolution.

It doesn’t drift
#

A proxy that leaks a little per call passes every ladder and fails a week later. The soak held 3500 concurrent calls, 70% of the media maximum, for 8 hours: 15 new calls per second, each held 240 s. The results:

  • 432,000 calls, 0 failed, 0 retransmissions.
  • CPU 235 average, 245 peak, out of 400.
  • From the first quarter of the run to the last: goroutines +0.0%, RSS −0.3%, open file descriptors +0.0%, ports in use +0.0%. RSS peaked at 240 MB.
  • 10.37 billion RTP packets each way, sent over received 1.0000.
  • After the load stopped: 33 goroutines, 13 file descriptors, 0 media ports.

The soak report has the raw medians: 22,113 goroutines in the first quarter and 22,113 in the last. No host was reclaimed or rebooted during the 8 hours.

A commercial SBC’s own test, on one vCPU
#

One commercial SBC vendor publishes a load test of its own product: 50 calls per second up to 1000 concurrent calls, each held 600 s, on a Xeon X5670 with 6 cores and 12 threads, 8 GB of RAM and Debian 10. The published result is “Used Memory 1730M, CPU Load 26%”. I am not naming the vendor. The test is the useful part.

The harness reproduces that test: 2000 calls, G.711 both ways on both legs, a plateau of about 1180 s. It ran on all four vCPU, then with FreeSBC limited to two, then to one. The results:

FreeSBC coresFailedCPU avg / peak (100 = one vCPU)RSS maxVerdict
4 vCPU0 of 200064 / 70120 MBPASS
20 of 200052 / 57117 MBPASS
10 of 200040 / 44115 MBPASS

Probe calls inside the plateau measured 0.000% loss and 0.47 ms mean jitter. So one vCPU of this box carries the vendor’s test at 40% of that vCPU. CPU is lower on one core than on four because with one core the Go runtime has no idle processors spinning.

Four caveats before reading more into it:

The 32-second goroutine
#

The earliest numbers had a problem the three-host run no longer shows. The first run was a single host, Docker on a laptop, with sipgo v1.4.3. At 2500 CPS FreeSBC had 189,159 goroutines, and 159,195 of them (84%) sat in one stack: sipgo’s TerminateGracefully, waiting about 32 s for each finished transaction’s timers. That cost about 76 goroutines and 2.3 MB of RSS per sustained call per second, and at 3500 CPS the process was killed at its 8 GiB limit.

Two changes removed it. sipgo v1.6.0 returns from TerminateGracefully at once for a finished UDP transaction and leaves the rest to its timers. PR #232 stopped ended dialogs from staying reachable through OnCancel, watch2xx and backstop timers (#228).

On the three-host rig, RSS came out at 1.22 to 1.31 MB per sustained CPS, and goroutines at 43.7 to 46.5, flat from 1000 to 3500 CPS. Flat is the point: the cost is per call, held for a fixed time, and goroutines fall back to about 33 after each run. It is not a leak. The before and after come from different rigs, one laptop against three VMs, so this is not a controlled comparison.

Two bar pairs: RSS per sustained call per second fell from about 2.3 MB on the single-host rig with sipgo v1.4.3 to about 1.25 MB on the three-host rig with sipgo v1.6.0 and PR 232; goroutines per sustained call per second fell from about 76 to about 44

What remains is mostly heap. sipgo keeps each UDP transaction, with its request and response, for 32 s after a 2xx: Timer L, RFC 6026’s Accepted state. I left that alone on purpose; it is sipgo’s to change. Of the 44 goroutines per CPS, 31.7 were FreeSBC’s own drainAcks, waiting the same 32 s for an ACK that follows a 2xx by one round trip. PR #243 bounds that wait at 8 s, which cut goroutines per CPS from 32.1 to 8.1 in a local in-process test. It landed after the run, so every figure in this post predates it. The next three-host run will measure it.

What I am not claiming
#

Sizing, and how to rerun it
#

A rule of thumb for this hardware class, from the sizing guide:

The kit is in test/perf/hosts/. MEASURE.md defines each step, its ladder and its pass line, and the harness README shows how run.sh drives three real hosts. From the generator host, the commercial SBC’s test, the carrier-in ladder, the concurrent-call ladder and the soak:

cd /opt/freesbc && . test/perf/hosts/env.sh sipp
test/perf/hosts/m03.sh all sipp
test/perf/run.sh -n -s 250:8000:250:40 -H 2 carrier-in
test/perf/hosts/ladder.sh m02 "-c @N@ -H 60 -t 180 -u @N@ call" 250 500 750 1000 1250 1500 2000 2500 3000 4000
test/perf/hosts/m08.sh 3500 8

MEASURE.md runs each one detached with nohup and judges every run with runcheck.sh and rigcheck.sh. For a quick look on a laptop, the single-host Docker scenarios still work. Their numbers do not compare with these.

Code: FreeSBC · docs/performance.md · issue #109