Node Performance and Resource Budgets
Migrated from Original Docs/Node/Node-ResourceBudgets.md
Node Performance and Resource Budgets
1. CPU Allocation
| Component | Cores | Allocation | Notes |
|---|---|---|---|
| FastAPI Control Server | 1 | 5% | Low latency, non-blocking I/O |
| Antenna Control Daemon | 1 | 5% | GPIO polling, motor control, ~10 Hz updates |
| DSP Pipeline (demod, sync, decode) | 2-4 | 60-70% | Highest priority; real-time constraint |
| Telemetry Router | 1 | 10% | Frame extraction, JSON serialization |
| Health Monitor | 1 | 5% | Metrics collection, background thread |
| System/Other | 1 | 10% | Kernel, disk I/O, other services |
Target: 4-8 core SBC (e.g., ARM A72 or Intel N3350)
2. Memory Allocation
| Component | Usage | Notes |
|---|---|---|
| FastAPI + Python runtime | 200 MB | Baseline framework |
| Antenna control + drivers | 50 MB | Configuration + feedback |
| DSP pipeline buffers | 1-2 GB | Ring buffers for raw IQ |
| Frame decode state machines | 50 MB | Multiple sync word states |
| Prometheus metrics + status cache | 100 MB | In-memory histograms |
| Telemetry router ringbuffer | 500 MB | ~50k frame capacity |
| Total target | 2.5 GB | Recommend 4 GB system RAM |
3. Network Bandwidth Budget
| Port | Rate | Notes |
|---|---|---|
| 8080 | <1 Mbps (control) | REST API commands |
| 9001 | variable (see IQ data-rate examples) | IQ sample transport; depends on sample rate and bytes/sample |
| 9002 | 10-50 Mbps (telemetry) | Typical, ~1000 frames/sec |
| 9003 | <1 Mbps (metrics) | Prometheus scrape |
| 9004 | <10 Mbps (gRPC status) | If enabled (optional) |
Uplink to central: 10-50 Mbps (telemetry) + 1 Mbps (control) = ~51 Mbps peak
Downlink from central: <1 Mbps (commands)
4. FPGA Resource Usage (Phased-Array)
| Resource | Usage | Notes |
|---|---|---|
| LUTs (Logic) | 60% | Beamforming, filter banks |
| Block RAM | 50% | Sample buffers |
| DSP slices | 40% | Multipliers, FIR filters |
| I/O pins | 30% | RF, timing, antenna drives |
Headroom: 40% for future features (heatmap, spectrum, multi-beam)
Related: See Node-Testing-Validation for benchmark procedures.
IQ data-rate examples
For complex I/Q samples the bandwidth required is:
- Formula:
samples/sec × bytes/complex-sample = bytes/sec.
Examples at 40 MSPS (samples = complex I+Q):
- 16-bit I + 16-bit Q (4 bytes/sample): 40,000,000 × 4 = 160,000,000 B/s ≈ 160 MB/s ≈ 1,280 Mbps (raw)
- 8-bit I + 8-bit Q (2 bytes/sample): 40,000,000 × 2 = 80,000,000 B/s ≈ 80 MB/s ≈ 640 Mbps
- 1 byte/complex (packed/compressed): 40,000,000 × 1 = 40,000,000 B/s ≈ 40 MB/s ≈ 320 Mbps
Note: practical deployments typically reduce on-wire bandwidth using lower bitdepth, packing, compression, or sub-sampling. Always calculate capacity from the chosen sample format and add headroom for protocol overhead and metadata.