Performance Optimization#
Display Side Optimizations#
Exclusive Display Mode#
Use Exclusive Display: This removes the display manager from the pipeline, allowing the application to directly own and control the display
Reduces Compositor Overhead: Eliminates window manager and compositor latency
Display Interface Selection#
Prefer DisplayPort over HDMI: DisplayPort generally provides higher bandwidth and lower latency than HDMI
Match Bandwidth Requirements: Ensure the display interface can handle your data throughput requirements
Cable Quality: Use high-quality, short cables to minimize signal degradation
Display Settings Configuration#
Disable Variable Backlight: Variable backlight can introduce up to one frame worth of delay
Set Higher Refresh Rate: Display refresh rate should be at least double the camera frame rate
Example: 60fps camera → minimum 120Hz display refresh rate
G-Sync Configuration: For systems with discrete GPU and G-Sync monitors:
Ensure G-Sync is properly enabled
Verify refresh rate is correctly configured
Skip this step if no discrete GPU is attached
Display Resolution Matching#
Native Resolution: Use the display’s native resolution to avoid scaling overhead
Consistent Timing: Maintain consistent pixel clock and timing parameters
Application Side Optimizations#
Holoscan Application Configuration#
Use Fullscreen Mode:
# Always use --fullscreen option for latency measurements
python3 examples/e2e_imx274_latency.py --fullscreen
python3 examples/e2e_vb1940_latency.py --fullscreen
HolovizOp Display Resolution:
# Configure HolovizOp to match display resolution exactly
holoviz_op = HolovizOp(
name="display",
width=display_width, # Match your display width (e.g., 1920, 2560)
height=display_height, # Match your display height (e.g., 1080, 1440)
enable_render_buffer_input=False, # Direct rendering
fullscreen=True
)
System Tuning#
CPU Optimization#
# Set CPU governor to performance mode
sudo cpufreq-set -g performance
# Disable CPU frequency scaling
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
GPU Optimization#
# Set GPU to maximum performance
sudo nvidia-smi -pm 1
sudo nvidia-smi -ac 5001,1590 # Memory,Graphics clocks
# Enable persistence mode
sudo nvidia-smi -pm ENABLED
Memory Optimization#
# Increase shared memory
echo 'kernel.shmmax = 68719476736' | sudo tee -a /etc/sysctl.conf
# Optimize memory allocation
echo 'vm.swappiness = 1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p