Performance Tuning
Optimizing AthenaBNG for high-scale deployments.
Session Scaling
Increase VLAN Interface Limits
demux:
max_interfaces: 100000 # Default: 50000
creation_rate_limit: 500 # Default: 100
Tune Cleanup Parameters
demux:
idle_timeout: 7200 # Increase for longer idle sessions
CAKE QoS Tuning
Adjust RTT Estimate
qos:
overhead_profiles:
pppoe_ethernet:
overhead: 34
mpu: 64
rtt: 50ms # Increase for high-latency networks
Disable ACK Filter for Low-Latency
tc qdisc change dev ppp0 root cake \
bandwidth 100Mbit \
rtt 5ms \
no-ack-filter
RADIUS Optimization
Connection Pooling
Configure multiple RADIUS servers for load balancing:
radius:
servers:
- host: "10.255.0.10"
port: 1812
- host: "10.255.0.11"
port: 1812
Increase Timeout for Slow Networks
radius:
timeout: 5 # seconds
retries: 3
Network Tuning
Increase Socket Buffer Sizes
sudo sysctl -w net.core.rmem_max=134217728
sudo sysctl -w net.core.wmem_max=134217728
sudo sysctl -w net.ipv4.tcp_rmem="4096 87380 67108864"
sudo sysctl -w net.ipv4.tcp_wmem="4096 65536 67108864"
Increase File Descriptor Limits
sudo sysctl -w fs.file-max=2097152
Tune TCP Parameters
sudo sysctl -w net.ipv4.tcp_tw_reuse=1
sudo sysctl -w net.ipv4.tcp_fin_timeout=30
Kernel Tuning
Disable VLAN Offload
sudo ethtool -K eth1 rxvlan off txvlan off
Enable Hardware Offload (if supported)
sudo ethtool -K eth1 tso on gso on
Increase Netlink Buffer
sudo sysctl -w net.core.netlink_max_socket_size=16777216
Monitoring Performance
Check CPU Usage
top -p $(pgrep -f abngd)
Check Memory Usage
ps aux | grep abngd | grep -v grep
Check Network Throughput
iftop -i eth1
Check CAKE Stats
tc -s qdisc show
Scaling Guidelines
| Sessions | CPU Cores | Memory | Notes |
|---|---|---|---|
| 1,000 | 1 | 2GB | Development/testing |
| 10,000 | 2 | 4GB | Small ISP |
| 50,000 | 4 | 8GB | Medium ISP |
| 100,000+ | 8+ | 16GB+ | Large ISP |
Next Steps
- Backup & Restore — Configuration backup
- Monitoring — Monitoring and observability