Scenario
You are operating an OPNsense edge under load. The following symptoms appear:
- Throughput falls well below the link capacity; latency spikes
top -SHJon the firewall shows a single core at 100% in user or system- Ping latency to the firewall increases under load
Available evidence:
top:suricataorcharonorunboundconsuming 95–100% of one CPUnetstat -w 1shows packet drops on the WAN interfacesysctl hw.modelreports a CPU without AES-NI or with a low core count
Your task
Determine the cause, recover, document, and validate.
Investigation
The investigation follows the discipline taught in Part XXXV:
- Form hypothesis, find evidence, test, validate.
- Use the available evidence above to bound the search.
- Reach one of the likely root causes.
Recovery procedure
(Do not reveal until you have reasoned through the problem.)
- Identify the failing component.
- Apply the remediation pathway.
- Validate with the verification step.
- Document the incident.
Remediation
- Identify the top consumer via
top -SHJand correlate with the symptom (Suricata, charon, unbound). 2. Apply targeted relief: Suricata → enable Hyperscan and run workers equal to cores minus one; IPsec → enable AES-NI in System → Settings → Tunables; Unbound → tune num-threads and cache-size. 3. If hardware is the bottleneck, plan a CPU refresh that supports AES-NI and modern SIMD.
Verification
CPU utilisation distributes across cores; throughput reaches the planned budget; ping latency returns to baseline.
Rollback
Revert the tuning values; expect performance to return to the pre-change baseline.
Prevention
Right-size hardware for the workload: AES-NI is mandatory for IPsec at any meaningful throughput; Suricata needs cores or Hyperscan; DNS scales with QPS. Monitor per-core CPU usage and alert on sustained 80%+ on a single core. Test the planned workload against the hardware before deploying.