Userspace Config

Video Acceleration

This one is very important and has the biggest impact by far on a RPI4.
This enables the video acceleration for the display.

# Within /boot/config.txt
dtoverlay=vc4-fkms-v3d

Turbo Boost

It's possible to get some additional performance with some overlocking.
So far I've mostly avoided that to avoid over heating the RPI, although I have enabled.

# Within /boot/config.txt
force_turbo=1

Disable Audio

Make sure to disable audio within /boot/config.txt

# Within /boot/config.txt
dtparam=audio=off

Next launch dietpi-config
Under Audio Options select the option to disable the Audio completely

Display Overscan

I don't believe this has any impact on latency.
But if you're display has a black border, then setting this to 1 can get rid of that.
If the screen is flickering try setting it to 0

# Within /boot/config.txt
disable_overscan=1

Scaling Govenor

Using dietpi-config

  • Go to Performance Options
  • Select CPU Govenor
  • Select Performance

The default is schedutil the current setting can also be seen via

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Disable Swap

One thing to make sure of is to make sure any swap partitions are disabled
To make this persistent comment out the swap line within /etc/fstab

# List the swap partitions that are setup
cat /proc/swaps

# Switch off all swaps
swapoff -a