STAFFCHAPTER 26

Network planning and capacity

A network is planned for its busiest hour in its busiest cell, not for its average. Learn to turn a forecast into sites, channels and core capacity, and what a virtual operator must forecast for its host

55 MINHOW MOBILE NETWORKS WORKUPDATED 2026-11-13
PREDICT

A cell has 10 voice channels. In its busy hour the callers offer it 5 erlangs: on average five calls would be in progress at any moment if none were refused. A caller who finds every channel busy gives up. About what share of call attempts is blocked?

The cells and coverage chapter asked how far a cell reaches. The radio access network chapter asked how much it carries. Planning asks both together, for a place, for a year, and for a budget. A planner’s output is a list: sites to build, carriers to switch on, channels to configure, and core capacity to buy. Its input is a forecast of how many people will want what, where, and at which hour.

Two limits and one plan

Every cell is limited twice. Coverage limits where the signal is strong enough to use. Capacity limits how much the cell can carry once the signal is there. The number of sites an area needs is the larger of the two answers.

Take the 40 km2 market town from the cells chapter, at 1800 MHz with 15 dB of building loss. coverage.py gave 4, 16 or 24 sites depending on how built-up the town is. Now ask how many sites carry the town’s busy hour. With the illustrative figures you will use in the lab, the answer is 9 for every kind of town, because capacity does not care how dense the buildings are. The two limits then compare like this.

49suburban: capacity binds169urban: coverage binds249dense: coverage bindssites for coveragesites for capacity, one 20 MHz carrier (illustrative demand)

The picture has a rule in it. Where people are few and spread out, such as a rural area, coverage binds: you build sites to reach people and most of the capacity sits unused. Where people are many, such as the market town centre, capacity binds: you add sites, carriers or small cells to carry them, long before the signal is a problem. Most real areas switch from one regime to the other as you cross them.

The unit of planning is the cell, not the town. A town total hides the market, the station and the university, each of which is one cell with a much higher load than its neighbours. Quality of service has the same trap in a different place: the quality of service chapter showed a region at 99.0% hiding one cell at 82%.

From a forecast to a busy-hour number

A forecast is useful when it can be turned into a single number per cell: how many megabits a second, how many erlangs and how many registrations a second at the busy hour. The busy hour is the hour of the day with the most traffic. ITU-T Recommendation E.500 describes how traffic intensity is measured and how the hour is chosen. E.500 describes the time-consistent busy hour: record the traffic in each quarter hour over several days, average each quarter hour across the days, and take the busiest 60 minutes of that average profile, at the same clock time every day. Averaging over many days matters, because one freak day would otherwise set the plan for the year, and a plan for the freak day buys equipment that is idle on all the others.

For data the chain is short. Take the subscribers on the cell or the town, the data each uses in a month, the share of a day’s traffic that falls in the busy hour, and divide by the seconds in an hour:

busy-hour Mbit/s = subscribers x GB a month x 8,000 / 30 x busy-hour share / 3,600

With 80,000 subscribers using 2.5 GB a month and 8% of the day’s traffic in the busy hour, that is 1,185 Mbit/s. Every figure is an assumption the planner must source: the subscribers and the GB from the operator’s own counters, the busy-hour share from a measured daily profile.

Growth is the multiplier that makes planning a forecast and not a count. Ericsson’s Mobility Report of June 2026 puts average monthly mobile data per active smartphone in Sub-Saharan Africa at about 5 GB in 2025, growing about 14% a year to about 12 GB in 2031as of 2026-11. That is a regional average over smartphones, not a Nigerian figure and not a prediction for your cell, but it is an anchor for the per-subscriber growth to argue against. Subscribers grow too. A town whose subscribers grow 10% a year and whose usage grows 14% has busy-hour traffic that grows 25% a year (1.10 times 1.14), and doubles in three years.

Voice has its own unit, the erlang, and signalling has a third: busy-hour registrations and session set-ups a second. A complete forecast has all three for each cell.

Voice and the erlang

A channel is the unit of voice capacity: a timeslot on a GSM carrier, or a guaranteed-bit-rate flow the cell will admit on 4G or 5G. A GSM carrier has eight timeslots and the broadcast and signalling channels take at least one, so a cell with one carrier has fewer than eight calls. On 4G and 5G voice is a data flow with its own quality class (5QI 1 for conversational voice, as the mobile data chapter explains), and the cell’s admission control decides how many such flows it accepts. Either way, a number of voice calls is the number the cell will carry at once, and one more is refused.

One erlang is one channel occupied continuously for one hour. Thirty calls in an hour, each lasting two minutes, is 60 channel-minutes: one erlang. Traffic offered to a cell is the call arrival rate times the mean call length, expressed in erlangs.

How many channels does an offered load need? The standard answer is Erlang B, from the Danish engineer A. K. Erlang’s work on telephone exchanges. It gives the share of call attempts that find every channel busy when the offered load is A erlangs and there are n channels. Its assumptions are plain. Calls arrive at random and independently. A call that finds no free channel is refused and gone: it does not queue and does not try again. The lab computes it with a recursion that never overflows:

B(0) = 1
B(k) = A x B(k-1) / (k + A x B(k-1))        for k = 1 ... n

The assumption that a refused caller goes away is the weak one. Real callers redial at once, so a congested cell is offered more than its forecast, which raises blocking further. Erlang B is therefore a good size for a healthy cell and an optimistic one for a cell in trouble.

Run the numbers in the lab and three results stand out. First, small groups are inefficient. One erlang needs 4 channels for 2% blocking, and 80 erlangs need 92. A large group has a trunking gain: bigger pools of channels can be run fuller, because the random peaks of many callers partly cancel. It is why a small cell with few channels is expensive per call.

Second, blocking is a steep function of load. Size a cell for 10 erlangs at 2% blocking and you get 17 channels. The cell as built blocks 1.29% at its forecast load (the channels come in whole numbers). If the busy hour is 10% above forecast the blocking is 2.45%, at 20% above it is 4.09%, and at 50% above it is 11.32%. A forecast that is 20% low triples the blocking. The planner can only buy the headroom, so the forecast error and the headroom must be discussed together.

Third, the target is a policy. The share of blocked attempts an operator accepts is its grade of service. Regulators and operators set it: the quality of service chapter showed how a regulator’s targets are written and judged by area, and the host’s agreement must say which grade applies to the virtual operator’s subscribers.

Data: sharing, not blocking

Data does not refuse anyone at the radio. Every active phone gets a share of the cell, and as more become active each share shrinks. The radio chapter’s numbers still apply. One 20 MHz carrier with two layers at a signal quality of 10 dB has a Shannon bound of 138 Mbit/s, and 40 active phones share it at 3.5 Mbit/s each at best. The bound is not reached by real equipment, so a planner multiplies by an efficiency factor (the lab uses 0.5, an assumption).

The planning question is how full the cell may be before users notice. A queue is the model. If work arrives at a rate that is a fraction ρ (the utilisation) of what the cell can finish, the average time a piece of work spends in a simple single queue is the service time divided by 1 − ρ:

Utilisation ρ Delay, as a multiple of the unloaded service time
50% 2.0
70% 3.3
80% 5.0
90% 10.0
95% 20.0

A cell’s scheduler is not a single queue with random arrivals, so do not read the numbers as a prediction. Read the shape: delay is gentle at first and then climbs without limit. That shape is the reason operators plan to a utilisation ceiling and add capacity when the busy hour crosses it. The ceiling is a choice. Each operator picks its own; the lab uses 70%, an illustrative value. 3GPP defines the counter planners read for it: the percentage of physical resource blocks used, in TS 28.552 (the “DL total PRB usage” measurement).

Nobody is refused, so no alarm rings when data capacity runs out. Users complain first. The quality of service chapter’s cell-by-cell, hour-by-hour view is how the operator sees it coming.

Sizing the radio for a town

Put the two limits together with one carrier and see what the town needs. The lab script does it in a few lines. Its steps are: demand in the busy hour, usable capacity of one site, sites for capacity, sites for coverage, and the larger of the two. Usable capacity of a site is the cell’s Shannon bound, times the efficiency (0.5), times the utilisation ceiling (0.7), times the three sectors of a site: 145 Mbit/s with one 20 MHz carrier, 291 Mbit/s with two.

Against 1,185 Mbit/s of busy-hour demand that means 9 sites with one carrier and 5 with two. Looking three years ahead with the growth above, the same town needs 17 sites on one carrier or 9 on two. The levers are visible in the arithmetic. More bandwidth (another carrier, another band) multiplies capacity at an existing site and costs no new tower, but spectrum is the host’s to hold, as the last section explains. More sectors or more antennas (higher-order MIMO) raise the capacity of each site. More sites, or small cells in the hot spots, cut the number of phones each carries, and cost the most and take the longest.

The lead time of a lever decides when you must decide. A software change to a cell can be made quickly; a new carrier needs equipment, planning and sometimes a licence; a new site needs land, permits, power and transmission, which the next chapters describe. The rule is to start each lever when the busy hour is still some way short of the ceiling, by as long as the lever takes.

An even spread is the optimistic case. Put a quarter of the town’s traffic in the one cell beside the market and that site must carry 296 Mbit/s: more than the 291 that two carriers give it, although the town as a whole looked well provided for on two. This is why the plan is per cell, and why the forecast Kolanut sends must carry places.

Sizing the core

The core is dimensioned differently, because its limits are different. A cell is limited by spectrum and a signal. A core function is limited by the transactions it finishes each second, the state it holds, and, in the user plane, the bits it moves. Each function has its own driver.

Function What drives its load Lab counter or figure
AMF Registrations and service requests a second; phones registered and connected (state) fivegs_amffunction_rm_reginitreq, ran_ue
SMF Session set-ups a second; active sessions (state) fivegs_smffunction_sm_sessionnbr{snssai}
UPF Throughput and packets a second; active sessions fivegs_upffunction_upf_sessionnbr, fivegs_ep_n3_gtp_indatapktn3upf
UDM, UDR, AUSF and the subscriber database Authentications a second; database reads one registration is a read chain AUSF to UDM to UDR
PCF Policy associations a second fivegs_pcffunction_pa_policyamassoreq
SCP and NRF Every function-to-function request in the core about a dozen per registration

The last row is easy to miss. The signalling chapter’s ladder shows one registration in the lab making a dozen requests between functions, and the session that follows makes ten more (and four PFCP messages to the UPF), all through the SCP. The rate the SCP and the subscriber database must serve is therefore a multiple of the registration rate. The user plane is a different kind of load: it grows with throughput, which follows the radio busy hour, while the signalling functions grow with how often phones wake, move and connect, which an IoT fleet or a power cut can multiply without adding a single megabit.

The planner needs a measured figure for each function, not a datasheet figure alone. The vendor’s rated capacity is a starting point (a number under test conditions). The measured one comes from your own load test with your own mix of procedures. The Google SRE book’s chapter on cascading failures makes the same point for software services: capacity planning reduces the chance of a cascading failure, but it must be paired with load testing to find the load at which the service breaks.

What the lab core measured

The lab recorded a run of 50 simulated phones switching on together. All 50 registered and opened a data session, and every function’s counter read 50: the AMF’s reginitsucc, the SMF’s sessionnbr for slice 1, the UPF’s upf_sessionnbr and the PCF’s policy associations. kpi.sh gave a registration median of 5,517 ms, a 95th percentile of 5,914 ms and a maximum of 6,248 ms; sessions took a median of 1,778 ms. One phone takes 601 ms, and the 20-phone busy hour had a median of 1,982 ms.

Three lessons are in those numbers. First, time grows faster than the crowd: 2.5 times as many phones (20 to 50) made the median 2.8 times longer. Second, a fit from one run does not hold at another. The IoT chapter fitted the busy hour to a core that finishes about 25 registrations a second after a fixed 1.6 s. That fit predicts a median of about 2.6 s for 50 phones. The recorded median is 2.1 times that. The functions share one machine and one link; as they fill, each request gets slower, which a straight line through eighteen points cannot show. Third, the spread is narrow: the maximum is 1.13 times the median. Nobody was unlucky. The whole crowd waited about the same time, which is the signature of a shared bottleneck and not of a few slow phones.

Memory is the other half of core sizing, and here the lab is gentle. With an idle core the AMF used 19 MiB, the SMF 34 MiB, the UPF 26 MiB and MongoDB 69 MiB, and the other functions 5 to 7 MiB each: about 200 MiB in all. With 50 phones the AMF used 26 MiB and the SMF 40 MiB. That is about 140 KiB more per registered phone in the AMF and 120 KiB in the SMF. It is tempting to multiply those by a million. Do not: an idle container’s memory includes buffers and runtime overhead that do not scale with phones, one run is one point, and the state a real core keeps per phone depends on the product. The measurement tells you the method: measure memory at two loads, work out the slope, then confirm at a third load before you buy memory for it.

A snapshot hides a spike. The recorded docker stats for the 50-phone run, taken about a minute after the phones switched on, showed the AMF at 0%, the SMF at 1.2% of a CPU and the SCP at 0.5%, with MongoDB at 3.4% and the cell at 5.2%, while the simulated phones were using 28% of one. An average over a minute says almost nothing about the seconds that mattered. Read counters over short intervals, and keep the peak as well as the mean.

All the lab’s times come from a virtual machine under software emulation (QEMU, no hardware acceleration). Absolute times are slower than on real hardware. Compare the lab’s runs with each other. Do not compare them with a live network.

Headroom, N+1 and the spike

Headroom is the gap between what a unit can carry and what the busy hour needs. It is what you are buying when you add capacity before it is used. Two kinds are needed.

The first is headroom for growth: the utilisation ceiling. The second is headroom for failure, expressed as N+1: if N units are needed to carry the busy hour, run N+1, so that one can fail or be taken out for maintenance without crossing the ceiling. Suppose a core function’s instances are each rated at 100 units, so 70 units is the ceiling, and the busy hour is 180 units. Three instances suffice on paper (210 at the ceiling). Lose one and the other two carry 180 of a rated 200, at 90% utilisation, and delay is ten times the unloaded figure. Four instances (N+1) carry 180 of a rated 300 after one fails, and 180 of 400 in normal running. After the failure the utilisation is 60%, under the ceiling. The Google SRE book’s production services chapter describes the same idea as N+2: provision so that a planned and an unplanned outage can coincide. N+1 and N+2 are decisions about how much a failure may cost, not rules.

Radio has its own version. When a site fails, its neighbours pick up the phones they can still reach, and their load rises. A plan with every site at its ceiling has no room for that, so planners also check the busy hour with a neighbouring site down.

Finally, plan for the spike, not only the hour. The IoT chapter showed 8,000 trackers waking at the top of the hour. A power cut can reconnect a whole district together. The load that matters then is the peak registration rate for a minute, and a core that finishes registrations at some rate has a queue that grows for as long as arrivals exceed it. Headroom for a spike is bought partly in the core and partly in the fleet’s firmware, which must spread its wake-ups.

What a virtual operator forecasts and buys

A virtual operator does not own radio. The NCC’s framework says a virtual operator does not own spectrum; a Tier 1 operator has no switching or intelligent network; and a Tier 3 operator may own core elements such as the MME and the packet gateway but relies on its host for radio accessas of 2026-11. So the cell is the host’s, and what a virtual operator plans for the rest depends on its tier.

At Tier 1, which is where Kolanut Mobile is in its launch year, the radio, the core, the numbers and the charging are Lumora’s. Kolanut’s planning job is to forecast demand and to check what it receives. The forecast is the product. The useful version has the form Adesuwa can use:

  • subscribers by cell cluster, by month, from its SIM sales by agent and market;
  • busy-hour data and voice per subscriber, from its own usage records and its host’s reports, separately for the plans it sells;
  • the calendar of things that move demand: market days, bundle promotions, festive weeks, and any fleet launch such as the tracker contract;
  • and a statement of how sure it is, so that Lumora can choose headroom.

The return flow matters as much: the host’s reports of busy-hour utilisation, blocking and session success for the cells serving Kolanut, cut to its subscribers, so it can see a promotion coming into trouble. The quality of service chapter described what to ask for. How capacity is priced and committed in the wholesale agreement is the subject of the MVNO Business course, not of this chapter.

At Tier 2, Kolanut would own its subscriber databases, so it would dimension them itself: the HSS and authentication centre by subscribers and by authentications a second, with N+1 and with the registration storm in mind. At Tier 3 it would dimension its own core elements as well, with the planning method of this chapter, and would still depend on the host’s radio. So the earlier a virtual operator’s plan is wrong, the more of it falls on the host; the further up it goes, the more it owns of the arithmetic above.

LAB Plan a town from a forecast and measure what the lab core carries ~55 MIN
YOU NEEDDocker with Compose v2 (for steps 4 and 5)Python 3.9 or laterNo live core and no SCTP are needed for steps 1 to 4: they run scripts and read traces and recorded output on any machine. Step 5 needs the live core and is optional

You will size a town twice, once for coverage and once for capacity; write Erlang B and use it to size a cell’s voice channels; combine the radio scripts into one plan; and read what the lab’s core carried when 50 phones switched on together. Work in labs/telecoms. Your own scripts go in a folder of your own, here $HOME/mywork, which you create with mkdir -p $HOME/mywork. Every traffic figure in steps 2 and 3 is illustrative.

1. Run the two radio scripts you will combine (any machine with Python).

python3 radio/coverage.py --freq 1800 --env urban --indoor-loss 15
python3 radio/capacity.py --bw 20 --scs 15 --layers 2 --mod 64qam --sinr 10 --users 40

The first gives a maximum path loss of 136.0 dB and a cell radius of 0.99 km (hexagon area about 2.5 km2), with a note that the radius is outside the fitted 1 to 20 km range: the model is stretched, so treat it as an estimate. The second prints a peak rate of 170 Mbit/s, a Shannon bound of 138 Mbit/s at 10 dB, and 3.5 Mbit/s each for 40 active phones at best. Coverage gives you a count of sites from an area. Capacity gives you a Mbit/s figure for one cell. The plan in step 3 turns the second into a count of sites and sets it beside the first.

2. Write Erlang B and size the voice channels (any machine with Python). Save this as $HOME/mywork/erlang.py and run it.

#!/usr/bin/env python3
"""Erlang B: how many channels does a cell need for an offered load?

Standard library only. The traffic figures are illustrative.
"""


def erlang_b(a, n):
    """Probability that a call is blocked: A erlangs offered to n channels,
    blocked calls cleared. Uses the recursion B(0) = 1,
    B(k) = A * B(k-1) / (k + A * B(k-1)), which never overflows."""
    b = 1.0
    for k in range(1, n + 1):
        b = a * b / (k + a * b)
    return b


def channels_needed(a, target):
    """The smallest number of channels whose blocking is at or below target."""
    n = 1
    while erlang_b(a, n) > target:
        n += 1
    return n


print("one cell, 5 erlangs offered, 10 channels:")
print(f"  blocking {erlang_b(5, 10) * 100:.2f}% although the channels are half idle on average\n")

print("channels needed for 2% blocking (illustrative loads)")
print(f"{'offered E':>10} {'channels':>9} {'carried E':>10} {'busy share':>11} {'channels per E':>15}")
for a in (1, 2, 5, 10, 20, 40, 80):
    n = channels_needed(a, 0.02)
    carried = a * (1 - erlang_b(a, n))
    print(f"{a:>10} {n:>9} {carried:>10.2f} {carried / n * 100:>10.0f}% {n / a:>15.2f}")

a, n = 10, channels_needed(10, 0.02)
print(f"\nsized for {a} E at 2%: {n} channels")
for err in (0.0, 0.1, 0.2, 0.5):
    off = a * (1 + err)
    print(f"  traffic {err * 100:>3.0f}% above forecast ({off:4.1f} E): blocking {erlang_b(off, n) * 100:5.2f}%")

# What a busy hour of voice means for a town (illustrative)
subs, milli = 2000, 25  # 2,000 subscribers on one cell, 25 milli-erlangs each
a = subs * milli / 1000
print(f"\n{subs} subscribers at {milli} mE each offer {a:.0f} E; 1% blocking needs "
      f"{channels_needed(a, 0.01)} channels, 2% needs {channels_needed(a, 0.02)}")
python3 $HOME/mywork/erlang.py
one cell, 5 erlangs offered, 10 channels:
  blocking 1.84% although the channels are half idle on average

channels needed for 2% blocking (illustrative loads)
 offered E  channels  carried E  busy share  channels per E
         1         4       0.98         25%            4.00
         2         6       1.98         33%            3.00
         5        10       4.91         49%            2.00
        10        17       9.87         58%            1.70
        20        28      19.62         70%            1.40
        40        50      39.25         79%            1.25
        80        92      78.46         85%            1.15

sized for 10 E at 2%: 17 channels
  traffic   0% above forecast (10.0 E): blocking  1.29%
  traffic  10% above forecast (11.0 E): blocking  2.45%
  traffic  20% above forecast (12.0 E): blocking  4.09%
  traffic  50% above forecast (15.0 E): blocking 11.32%

2000 subscribers at 25 mE each offer 50 E; 1% blocking needs 64 channels, 2% needs 61

Check it against the Predict question: 5 erlangs on 10 channels blocks 1.84%. The table shows the trunking gain: the busy share of each channel climbs from 25% at 1 erlang to 85% at 80 erlangs, at the same 2% target. The sensitivity rows show that a forecast 20% too low turns 1.29% blocking (the 17-channel cell at its forecast load) into 4.09%. The last line sizes a cell of 2,000 subscribers at 25 milli-erlangs each (an illustrative busy-hour figure): 50 erlangs, which needs 64 channels at 1% and 61 at 2%.

3. Combine coverage and capacity into one plan (any machine with Python). Save this as $HOME/mywork/plan.py and run it from labs/telecoms, so that it finds radio/coverage.py and radio/capacity.py.

#!/usr/bin/env python3
"""Coverage and capacity together: how many sites does a town need?

Run from labs/telecoms so that radio/coverage.py and radio/capacity.py are found.
Standard library only. Every input marked (illustrative) is an assumption.
"""
import math
import sys

sys.path.insert(0, "radio")
import capacity
import coverage

# --- the town (illustrative) ---
TOWN_KM2 = 40            # the market town of the cells chapter
SUBSCRIBERS = 80_000     # everyone on the host's network in the town
GB_PER_SUB_MONTH = 2.5   # average over smartphones and basic phones
BUSY_HOUR_SHARE = 0.08   # share of a day's traffic carried in the busiest hour
SUB_GROWTH = 1.10        # subscribers, per year
USE_GROWTH = 1.14        # data per subscriber, per year

# --- the radio (illustrative except where a source is named) ---
FREQ_MHZ = 1800
INDOOR_DB = 15
CARRIER_MHZ, SCS_KHZ, LAYERS, SINR_DB = 20, 15, 2, 10
SECTORS = 3
EFFICIENCY = 0.5         # share of the Shannon bound a real cell delivers
MAX_UTILISATION = 0.7    # add capacity before the busy hour passes this


def coverage_sites(env):
    eirp = 43 + 15 - 3                                  # coverage.py defaults
    max_loss = eirp - (-104) - 8 - INDOOR_DB
    r = coverage.radius_km(max_loss, FREQ_MHZ, 30, 1.5, env)
    return math.ceil(TOWN_KM2 / (2.6 * r * r)), r


def busy_hour_mbps(subs, gb):
    mbit_month = subs * gb * 8000
    return mbit_month / 30 * BUSY_HOUR_SHARE / 3600


def usable_per_site(carriers):
    cell = capacity.shannon_mbps(CARRIER_MHZ, LAYERS, SINR_DB)
    return cell * EFFICIENCY * MAX_UTILISATION * SECTORS * carriers


print(f"one 20 MHz carrier, 2 layers, SINR {SINR_DB} dB: Shannon bound "
      f"{capacity.shannon_mbps(CARRIER_MHZ, LAYERS, SINR_DB):.0f} Mbit/s per cell")
print(f"usable per site: x {EFFICIENCY} efficiency x {MAX_UTILISATION} utilisation x {SECTORS} sectors "
      f"= {usable_per_site(1):.0f} Mbit/s with one carrier, {usable_per_site(2):.0f} with two\n")

print("sites for coverage at 1800 MHz, 15 dB indoor loss (town of 40 km2)")
cov = {}
for env in ("suburban", "urban", "dense"):
    cov[env], r = coverage_sites(env)
    print(f"  {env:<9} radius {r:.2f} km -> {cov[env]} sites")

print(f"\n{'year':>4} {'busy hour Mbit/s':>17} {'sites, 1 carrier':>17} {'sites, 2 carriers':>18}")
for year in range(4):
    subs = SUBSCRIBERS * SUB_GROWTH ** year
    gb = GB_PER_SUB_MONTH * USE_GROWTH ** year
    d = busy_hour_mbps(subs, gb)
    print(f"{year:>4} {d:>17,.0f} {math.ceil(d / usable_per_site(1)):>17} {math.ceil(d / usable_per_site(2)):>18}")

d0 = busy_hour_mbps(SUBSCRIBERS, GB_PER_SUB_MONTH)
cap1 = math.ceil(d0 / usable_per_site(1))
print()
for env, n in cov.items():
    limit = "coverage" if n >= cap1 else "capacity"
    print(f"year 0, {env:<9}: coverage needs {n:>2}, capacity needs {cap1:>2} -> {limit} binds, build {max(n, cap1)}")
python3 $HOME/mywork/plan.py
one 20 MHz carrier, 2 layers, SINR 10 dB: Shannon bound 138 Mbit/s per cell
usable per site: x 0.5 efficiency x 0.7 utilisation x 3 sectors = 145 Mbit/s with one carrier, 291 with two

sites for coverage at 1800 MHz, 15 dB indoor loss (town of 40 km2)
  suburban  radius 2.15 km -> 4 sites
  urban     radius 0.99 km -> 16 sites
  dense     radius 0.81 km -> 24 sites

year  busy hour Mbit/s  sites, 1 carrier  sites, 2 carriers
   0             1,185                 9                  5
   1             1,486                11                  6
   2             1,864                13                  7
   3             2,337                17                  9

year 0, suburban : coverage needs  4, capacity needs  9 -> capacity binds, build 9
year 0, urban    : coverage needs 16, capacity needs  9 -> coverage binds, build 16
year 0, dense    : coverage needs 24, capacity needs  9 -> coverage binds, build 24

Read the table by row. In year 0 the busy hour is 1,185 Mbit/s and one carrier needs 9 sites; a second carrier cuts that to 5. By year 3 the same town needs 17 sites on one carrier or 9 on two, because busy-hour traffic grows 25% a year in these inputs (1.10 times 1.14). Then read the last three lines: in a suburban town capacity binds (9 against 4), in an urban or dense one coverage does (16 and 24 against 9). The script counts 3 sectors a site, an assumption. The radius for urban and dense is outside the model’s range, so the coverage counts are estimates.

4. Read what the lab core carried (any machine with Docker and Python). First re-read the twenty-phone busy hour, then the recorded fifty-phone run, then write the comparison.

scripts/kpi.sh traces/busy-hour.pcapng
signalling connections:      20 (a phone that goes idle and comes back gets a new one)
registrations:               18/20 = 90.0% accepted, 2 rejected
  time to accept:            median 1982 ms, 95th percentile 2319 ms, max 2448 ms
data sessions:               18/18 = 100.0% accepted, 0 rejected
  time to accept:            median 1245 ms, 95th percentile 1435 ms, max 1456 ms
deregistrations:             18
failures by cause:
     2  registration reject: 11 PLMN not allowed

The fifty-phone run needed the live core and cannot be rerun on every machine, so its figures were recorded on 2026-11-13: fifty subscribers provisioned with add-range from IMSI 999700000000401, fifty phones started together, and kpi.sh run on the capture. The recorded output was:

signalling connections:      50 (a phone that goes idle and comes back gets a new one)
registrations:               50/50 = 100.0% accepted, 0 rejected
  time to accept:            median 5517 ms, 95th percentile 5914 ms, max 6248 ms
data sessions:               50/50 = 100.0% accepted, 0 rejected
  time to accept:            median 1778 ms, 95th percentile 2270 ms, max 2306 ms
deregistrations:             0

Now save this as $HOME/mywork/measured.py and run it. The figures in it are copied from the recorded runs.

#!/usr/bin/env python3
"""What the lab core measured, and what a fit from a small run predicted.

Figures are copied from the recorded runs (docker stats and kpi.sh). They come
from a virtual machine under software emulation, so compare them with each
other, never with a live network. Standard library only.
"""

# registration time to accept, ms (kpi.sh): phones, median, 95th, max
# (the 20-phone busy hour had 18 provisioned phones, so 18 times)
runs = [(1, 601, 601, 601), (20, 1982, 2319, 2448), (50, 5517, 5914, 6248)]
# the module 3 fit from the busy-hour run: L fixed + S per registration
L, S = 1.60, 0.040
# memory, MiB, idle core and with 50 phones registered with a session each
mem = {"amf": (19.35, 26.38), "smf": (34.07, 39.93), "upf": (25.87, 26.76),
       "scp": (6.496, 17.3), "udm": (5.207, 9.68)}

print(f"{'phones':>6} {'median ms':>10} {'p95 ms':>7} {'max ms':>7} {'median x one phone':>19}")
for n, med, p95, mx in runs:
    print(f"{n:>6} {med:>10} {p95:>7} {mx:>7} {med / runs[0][1]:>19.1f}")

n = 50
pred_med = (L + S * (n + 1) / 2) * 1000
pred_max = (L + S * n) * 1000
print(f"\nthe busy-hour fit predicts for {n} phones: median {pred_med:.0f} ms, max {pred_max:.0f} ms")
print(f"recorded: median {runs[2][1]} ms, max {runs[2][3]} ms "
      f"({runs[2][1] / pred_med:.1f}x and {runs[2][3] / pred_max:.1f}x the prediction)")
print(f"spread: max / median = {runs[2][3] / runs[2][1]:.2f}: the whole crowd waited about the same time")

print(f"\n{'function':>8} {'idle MiB':>9} {'50 phones':>10} {'per phone KiB':>14}")
for nf, (a, b) in mem.items():
    print(f"{nf:>8} {a:>9.1f} {b:>10.1f} {(b - a) / n * 1024:>14.0f}")
amf = (mem['amf'][1] - mem['amf'][0]) / n
print(f"\nAMF alone, extrapolated (do not trust this): 100,000 phones -> {amf * 100000 / 1024:.1f} GiB more than idle")
python3 $HOME/mywork/measured.py
phones  median ms  p95 ms  max ms  median x one phone
     1        601     601     601                 1.0
    20       1982    2319    2448                 3.3
    50       5517    5914    6248                 9.2

the busy-hour fit predicts for 50 phones: median 2620 ms, max 3600 ms
recorded: median 5517 ms, max 6248 ms (2.1x and 1.7x the prediction)
spread: max / median = 1.13: the whole crowd waited about the same time

function  idle MiB  50 phones  per phone KiB
     amf      19.4       26.4            144
     smf      34.1       39.9            120
     upf      25.9       26.8             18
     scp       6.5       17.3            221
     udm       5.2        9.7             92

AMF alone, extrapolated (do not trust this): 100,000 phones -> 13.7 GiB more than idle

The fit from the busy-hour run, which the IoT chapter derived (1.6 s fixed and 40 ms a registration), predicts a median of 2,620 ms for 50 phones. The recorded median is 5,517 ms: 2.1 times higher. The maximum is 1.7 times higher. The ratio of maximum to median is 1.13, so the whole crowd waited about the same. The per-phone memory slopes are an observation from one pair of points. The last line extrapolates the AMF to 100,000 phones and gets 13.7 GiB: write down three reasons not to buy memory on that basis. The first is in the chapter; the others are for you to find.

5. Optional, with the live core: the idle footprint and the metrics. If you can run the core (see the lab README), start it without the phone and read what each function costs and counts at rest.

docker compose up -d
scripts/metrics.sh
docker stats --no-stream
docker images | grep -E "open5gs|ueransim|mongo"

Recorded on 2026-11-13. scripts/metrics.sh prints a section for each of the AMF, SMF, UPF and PCF and, at rest, shows only gnb 1 under the AMF: one cell is connected and nothing else is non-zero. docker stats --no-stream shows the AMF at about 19 MiB, the SMF at 34 MiB, the UPF at 26 MiB, MongoDB at 69 MiB, the others between 5 and 7 MiB and the web server under 1 MiB: about 200 MiB for the whole core. The images are 380 MB for gradiant/open5gs:2.7.2, 309 MB for gradiant/ueransim:3.2.6 and 1.1 GB for mongo:6.0. Your figures will differ a little. With a phone registered, scripts/metrics.sh shows fivegs_amffunction_rm_reginitsucc, fivegs_smffunction_sm_sessionnbr and fivegs_upffunction_upf_sessionnbr at 1 each, as the recorded one-phone run (2026-11-13) showed: fivegs_amffunction_rm_reginitsucc 1, fivegs_smffunction_sm_sessionnbr{plmnid="99970",snssai="1"} 1 and fivegs_upffunction_upf_sessionnbr 1 (the 50-phone run showed each at 50).

Plan for the market, not the town. Append these lines to plan.py and rerun it:

market = 0.25 * d0   # the market's site carries a quarter of the town's busy hour
print(f"\nmarket site: {market:.0f} Mbit/s against {usable_per_site(1):.0f} with one carrier"
      f" and {usable_per_site(2):.0f} with two")

You will see market site: 296 Mbit/s against 145 with one carrier and 291 with two. The town’s plan of 5 sites on two carriers looked comfortable, and the market’s site is 2% short on two. Work out what Adesuwa can do before the busy hour reaches the ceiling (a third carrier, a sector split, a small cell in the market hall), what each needs from Lumora and how long it takes, and what Ehis must have sent her three months earlier for the choice to be made in time. Then raise BUSY_HOUR_SHARE from 0.08 to 0.12, the evening peak sharpening, and rerun the original script. Year 0 on one carrier moves from 9 sites to 13, so the urban town’s 16 sites for coverage are now barely above the 13 for capacity, and in year 1 capacity (16) catches up. A change in one assumption moved the binding limit: say which assumption you would measure first.

DECIDE

All figures are illustrative. Ehis at Kolanut Mobile plans a data bundle promotion for the Saturday market in a market town, starting in six weeks. Kolanut's agents will sell it to traders, and Ehis expects busy-hour traffic in the cell beside the market to rise by 40%. Adesuwa at Lumora says that cell is at 65% busy-hour utilisation against a 70% ceiling, that a second carrier takes about two months to switch on, and that a new site takes much longer. The host agreement lets Kolanut give forecasts and request reports. What does Ehis do?

READING
  1. DOC
    ITU-T E.500: Traffic intensity measurement principles ITU-T

    How traffic intensity is measured and how a busy hour is chosen, so that two planners reading the same counters get the same figure. Read the definitions of the measurement methods and skip the annexes first time. Read: the measurement methods and the definition of the busy hour.

  2. BOOK
    Teletraffic Engineering Handbook (ITU-D Study Group 2, Question 16/2, with ITC) ITU-D and the International Teletraffic Congress

    The standard free text on the erlang and Erlang's B-formula. Read the chapters on traffic concepts and on loss systems; the rest is for specialists. Read: the chapters on traffic concepts and on Erlang's B-formula.

  3. DOC
    3GPP TS 38.306: NR user equipment radio access capabilities 3GPP

    Where radio/capacity.py gets its peak-rate formula. Read the approximate maximum data rate clause to see which assumptions a quoted peak hides. The clause numbers change between releases. Read: the approximate maximum data rate clause (4.1.2 in the version the lab used).

  4. DOC
    ETSI TS 128 552: 5G management and orchestration, performance measurements 3GPP, published by ETSI, 2024

    The standard names of the counters a planner reads: physical resource block usage, registered subscribers, session counts. Read the radio resource utilisation measurements, then compare them with what your host's report calls them. Read: the radio resource utilisation measurements (the PRB usage clauses).

  5. CODE
    Open5GS: the SMF configuration template (metrics block) Open5GS project

    Shows where a function's metrics server address and port are set, which is how the lab's core exposes its counters for a Prometheus server to scrape. The AMF, UPF and PCF have the same kind of block; check the names against your own `scripts/metrics.sh` output.

  6. BOOK
    Google SRE book: Production Services Best Practices Google SRE, 2016

    The place the book sets out N+2 provisioning: enough capacity for a planned and an unplanned outage at the same time. Read the capacity planning part and compare it with the N+1 example in this chapter. Read: the part on capacity planning and N+2.

  7. BOOK
    Google SRE book, chapter 22: Addressing Cascading Failures Mike Ulrich (ed. Betsy Beyer et al.), 2016

    The clearest account of why capacity planning needs load testing and a plan for overload. It is about software services, and it describes the registration storm of the IoT chapter in other words. Read: the sections on load testing and on capacity planning.

  8. DOC
    Ericsson Mobility Report: global and regional key figures Ericsson, 2026

    A vendor's forecast of data per smartphone by region, the anchor for a growth assumption. Read the Sub-Saharan Africa rows and treat them as one dated forecast to argue with, not a measurement of your cell.

All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.

RECALL CARDS Tap to flip. They join your review deck when you mark the lesson complete.
NEXT: Transmission, backhaul and tower sharing →