Performance Optimization
This guide describes optimizations to achieve maximum streaming performance on Red Pitaya.
Overview
For maximum streaming performance, especially at high sample rates or with multiple channels, system-level optimizations are essential. The most impactful optimization is disabling the web interface, which frees up significant CPU resources and network bandwidth.
Note
These optimizations are particularly important when:
Streaming at sample rates above 10 MS/s
Using multiple channels simultaneously
Streaming over long durations
Running on lower-spec Red Pitaya models
Approaching the 62.5 MB/s network transfer limit
Quick Start: Disable Web Interface
The fastest way to optimize for streaming:
systemctl stop redpitaya_nginx
systemctl disable redpitaya_nginx
This immediately stops the web interface and prevents it from starting on next boot.
To restore the web interface later:
systemctl enable redpitaya_nginx
systemctl start redpitaya_nginx
Note
For complete service management instructions, including starting the SCPI server, automatic boot configuration, and troubleshooting, see the Service Management Guide.
Additional Optimizations
Memory Allocation
Red Pitaya boards have 512 MB of DDR3 RAM total. Ensure adequate Deep Memory Mode (DMM) allocation for streaming buffers while leaving sufficient memory for Linux operation:
Minimum: 100 MB for basic streaming
Recommended: 256 MB for high-rate streaming
Maximum: 400 MB (leaving at least 100 MB for Linux OS operation)
Note
Always reserve at least 100 MB of RAM for the Linux operating system. Allocating too much memory to streaming can cause system instability or crashes.
Configure DMM allocation in the web interface before disabling it, or manually via SSH:
nano /root/.config/redpitaya/apps/streaming/streaming_config.json
For more information on memory allocation and limits, see Deep Memory Mode.
Network Configuration
For maximum throughput:
Use wired Ethernet (not Wi-Fi) - Gigabit Ethernet required for high-speed streaming
Use router - Direct connection to PC is currently not supported for streaming
Verify link speed is 1 Gbps:
ethtool eth0Look for
Speed: 1000Mb/sin the output. If the speed is lower (100 Mbps or 10 Mbps), check your Ethernet cable and switch/router capabilities.
System Load Reduction
Minimize background processes:
Close unnecessary SSH connections (each consumes resources)
Stop other Red Pitaya applications
Disable the web interface when not needed (see Quick Start section above)
For more details, see Service Management.
Sample Rate Limits
Be aware of the maximum achievable rates:
Theoretical maximum: 125 MB/s (1 Gbps Ethernet)
Practical network limit: ~62.5 MB/s (achievable streaming rate)
Single channel: Up to 31.25 MS/s (62.5 MB/s ÷ 2 bytes/sample)
Dual channel: Up to 15.625 MS/s per channel (31.25 MS/s combined)
Note
The absolute maximum streaming rate cannot be tested due to Red Pitaya’s decimation limits. The practical limit is approximately 62.5 MB/s for sustained network streaming. Higher speeds may be possible with modifications to the FPGA firmware and custom software, but this is beyond the scope of typical usage (users have reporeted up to 100 MB/s with custom setups).
Going beyond these limits requires:
Reducing active channels
Using local SD card storage instead of network streaming
Increasing decimation (reducing sample rate)
Workflow Recommendations
Development Phase
During development and testing:
Keep web interface enabled for easy configuration
Use web interface to:
Configure streaming parameters
Set DMM memory allocation
Test basic functionality
Monitor performance and identify bottlenecks
Production Phase
For production streaming or critical measurements:
Configure all settings via web interface
Download configuration using rpsa_client
Disable web interface for maximum performance
Verify streaming stability at target sample rates
Use command-line client for all streaming operations
See CLI Examples for command-line workflows.
Verification
After optimization, verify performance:
Check Service Status
Confirm web interface is stopped:
systemctl status redpitaya_nginx
Expected output:
● redpitaya_nginx.service - Red Pitaya Nginx Web Server
Active: inactive (dead)
Test Streaming Performance
Run a test capture at your target sample rate:
rpsa_client -h <red_pitaya_ip> -p TCP -f ./ -t wav
import streaming
client = streaming.Streaming()
# Configure and test streaming
# Monitor for data loss warnings
Monitor system resources during streaming:
top
Look for:
CPU usage <80% during streaming
No memory swapping
Stable network throughput
Troubleshooting
Data Loss Despite Optimization
If experiencing data loss after optimization:
Reduce sample rate - May be exceeding network bandwidth
Check decimation settings - Ensure correct calculation:
Sample rate = 125 MS/s ÷ decimation Network usage = sample_rate × channels × 2 bytes
Verify network quality - Run
ethtool eth0to check linkIncrease DMM memory - Provides more buffering
Check for packet loss:
netstat -s | grep -i "packet.*loss"
Can’t Re-enable Web Interface
If web interface won’t restart:
Check service status:
systemctl status redpitaya_nginx
Look for errors in logs:
journalctl -u redpitaya_nginx -n 50
Restart the service:
systemctl restart redpitaya_nginx
Reboot if necessary:
reboot
For more troubleshooting, see Service Management.
Performance Still Poor
If performance doesn’t improve:
Check hardware capabilities - Older boards may have limitations
Verify network infrastructure - Test with different switch/cable
Update Red Pitaya OS - Newer versions have performance improvements
Review configuration - Incorrect settings can limit performance
Check for thermal throttling - Ensure adequate cooling
See Streaming Limitations for detailed performance boundaries.
Additional Resources
CLI Examples - Command-line streaming workflows
Configuration Guide - Detailed parameter reference
Technical Details - How streaming works internally