Raspberry Pi 4B: LinuxCNC Max Jitter or Latency Test
I conducted the LinuxCNC Max Jitter or Latency Test on my Raspberry Pi 4 Model B Rev 1.5, equipped with 8GB of RAM and running Debian GNU/Linux 12 (Bookworm) 6.12.11. The results are rather erratic, and Iām not sure how to interpret them. In this post, I present the results and describe the tests.
š§ Index of the Complete Series.
![]() |
---|
Raspberry Pi 4B: LinuxCNC Max Jitter or Latency Test |
I use the following official image: https://linuxcnc.org/iso/rpi-4-debian-bookworm-6.12.11-arm64-ext4-2025-01-27-0404.img.xz. Then, I enabled WiFi, installed Samba, and set up remote desktop access. For more information on these official images, please refer to this forum post: Linuxcnc & the Rpasberry Pi (4 & 5).
The command:
C:\Users\behai>ssh cnc@192.168.0.45
reports the following information:
cnc@192.168.0.45's password:
Debian GNU/Linux 12 (bookworm) 6.12.11 #1_RT Mon Jan 27 02:47:25 AEDT 2025
aarch64
Raspberry Pi 4 Model B Rev 1.5
āā DISK
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 29G 4.8G 23G 18% /
/dev/mmcblk0p1 508M 97M 411M 20% /boot/broadcom
āā NETWORK
Hostname: picnc
Wired: eth0 DOWN 10.10.10.100
Wireless: wlan0 UP 192.168.0.45
āā SYSTEM
Processor: Cortex-A72 @ 1800MHz 43Ā°C
Frequency: 1800MHz
Online: 0-3
Governor: performance
Memory: 7.6G 370M
Entropy: 256
Uptime: 14:08:00 up 4 min, 0 user, load average: 0.03, 0.18, 0.09
Last login: Fri Feb 7 01:22:37 2025 from 192.168.0.2
And the kernel information:
$ uname -a
reports:
Linux picnc 6.12.11 #1 SMP PREEMPT_RT Mon Jan 27 02:47:25 AEDT 2025 aarch64 GNU/Linux
- The Raspberry Pi 4B was enclosed in a heat sink, but the fans were not running.
- WiFi is enabled.
- A USB wireless keyboard and mouse were used.
- A USB stick was plugged in, but it was not accessed during any tests.
- The Geany editor was running and used during the tests.
ā· Test Results and Description
āµ Test 1, Duration: 111 Minutes
Max Jitter recorded at the end of this test:
-
Servo Thread: 164,463 nanoseconds (164.463 microseconds).
This was reached at the
41st
minute. -
Base Thread: 210,589 nanoseconds (210.589 microseconds).
This was reached at the
66th
minute.
While the test was running, I carried out the following activities:
- From the start to the end of the test, Firefox was trying to load a 350MB MP4 file, but it never loaded and played.
- From the 1st to the 17th minutes: āµ Used the file explorer application to copy and delete the 350MB MP4 once. ā¶ Opened a terminal window. ā· Switched windows and edited a text file.
-
From the 17th to the 41st minutes: āµ Used the file explorer application. ā¶ Opened another Firefox tab to download a 28MB file. ā· Opened a third Firefox tab to search. āø Ran glxgears. ā¹ Switched windows and edited a text file.
š Please note: The Max Jitter for the Servo Thread reached
164,463 nanoseconds
and remained constant until the end of the test.š At this point, the heat sink felt really hot, so I wrapped a wet cloth around it. Eventually, the heat sink temperature came down, and it just felt warm to the touch.
-
From the 41st to the 66th minutes: āµ Had 3 glxgears instances running. ā¶ Used the terminal windows. ā· Used an existing Firefox tab to search. āø Did a screen capture. ā¹ Switched windows and edited a text file.
š Please note: The Max Jitter for the Base Thread reached
210,589 nanoseconds
and remained constant until the end of the test. - From the 66th to the 93rd minutes: āµ Progressively had 6 glxgears instances running. ā¶ Used Ristretto Image Viewer to view an image, then terminated it. ā· Switched windows and edited a text file.
- From the 93rd to the 111th minutes: Progressively stopped applications. āµ Closed the Firefox tab which was still trying to load a 350MB MP4 file. ā¶ Then terminated all 6 glxgears instances at some minute intervals. ā· Switched windows, edited a text file, etc.
-
Shut down the
HAL Latency Test
application.
The screenshot below shows the result of this test:
ā¶ Test 2, Duration: 109 Minutes
Max Jitter recorded at the end of this test:
-
Servo Thread: 175,368 nanoseconds (175.368 microseconds).
This was reached at the
60th
minute. -
Base Thread: 127,312 nanoseconds (127.312 microseconds).
This was reached at the
60th
minute.
š Throughout this test, the temperature of the heat sink felt warm to the touch. It was not too hot.
For this test, only the Geany editor was running initially. Then, I started the
HAL Latency Test
application. To start off, the
Servo Thread jitter was 68,997 nanoseconds
,
and the Base Thread jitter was 67,054 nanoseconds
.
While the test was running, I carried out the following activities:
- From the 1st to the 43rd minutes: āµ Started Firefox and used Google to search for various things. ā¶ From the 26th minute, a total of 6 glxgears instances were running. ā· Switched windows and edited a text file.
-
From the 43rd to the 60th minutes: No activities other than switching windows
and editing a text file. Both the Servo Thread and the
Base Thread jitters increased.
š At the 60th minute, the Max Jitter for the Servo Thread reached
175,368 nanoseconds
, and for the Base Thread reached127,312 nanoseconds
. These values remained constant until the end of the test. -
From the 60th to the 109th minutes: āµ I progressively started a total of 12 glxgears instances. ā¶ Then, I progressively shut them down 3 at a time until there were none. ā· Switched windows and edited a text file in between.
The Max Jitter for both threads remained unchanged from the 60th minute.
The screenshot below shows the result of this test:
ā· Test 3, Duration: 30 Minutes
Continuing from Test 02 above, except for the Geany editor, all other applications were terminated. With only the Geany editor running, I clicked the Reset Statistics
button and let the test run.
Max Jitter recorded at the end of this test:
- Servo Thread: 67,333 nanoseconds (67.333 microseconds).
- Base Thread: 94,072 nanoseconds (94.072 microseconds).
āø According to the official page on Latency Testing, the results reported by the first two tests indicate that this computer is not a good candidate for running LinuxCNC. However, people have successfully run LinuxCNC on similar hardware and software, so I might conduct some more tests.
I am using the 7I96S STEP/IO Step & dir plus I/O card for LinuxCNC. Since the setup uses hardware step generation, kernel latency is somewhat less critical. However, I still want to determine the latency as accurately as possible. I will revisit this issue in the future as needed.
If you happen to read this post, thank you for your time, and I hope I did not waste it. Stay safe, as always.
āæāæāæ
Feature image source:
- https://commons.wikimedia.org/wiki/File:Debian_12_%28Bookworm%29_-_GNOME_desktop.png
- https://www.instructables.com/Easy-Raspberry-Pi-Based-ScreensaverSlideshow-for-E/
- https://forum.linuxcnc.org/show-your-stuff/32672-linuxcnc-logo?start=20#gallery-6