guysoft / RealtimePi

An out-of-the-box raspebrrypi/raspbian distro with a realtime kernel
GNU General Public License v3.0
163 stars 25 forks source link

cyclictest results #31

Closed jk987 closed 2 years ago

jk987 commented 2 years ago

Hi,

I downloaded RealtimePi 0.5.0 to sd card, put it into RaspberryPi3, "apt install rt-tests" and ran "cyclictest".

According to various web sites I expected maximum latency about 100-200 microseconds but I got thousands.

Is there any explanation for this? Shall I try something? Have you ever tried to run cyclictest?

guysoft commented 2 years ago

Hey, what is the output of

uname -a

? That would confirm the realtime kernel is running.

jk987 commented 2 years ago

I can't tell you exact output right now but I remember there was some "-rt" in the kernel version number.

guysoft commented 2 years ago

It would help to see what kernel is running, because otherwise I am not 100% sure what you have there. I have never used cyclictest and I don't know what values to expect neither.

jk987 commented 2 years ago

First, sorry for the delay. I have only one SD card and switching distributions takes some time and I also have to work.

Second, I have to apologize for not reading cyclictest man-page and other websites carefully.

From my experiments cyclictest should be run with parameters "-p 90 -n" at least. And the result values should be low. :) More precisely, with realtime system they should always be below some level (let's say 100 microseconds) and NEVER ABOVE. (Technically it is not very important if is 100 us or 200 us but it must be ALWAYS below regardless what the computer is doing.)

My results (cyclictest -p 90 -l 200000 -h 2000 -m -S -q): Standard kernel (Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux)

(Meanwhile I was running tasks like "apt update" and "updatedb".)

image

Min Latencies: 00006 00006 00005 00005 Avg Latencies: 00016 00015 00015 00016 Max Latencies: 07131 04467 06836 04404 Histogram Overflows: 00014 00005 00008 00002

image

Min Latencies: 00006 00006 00006 00006 Avg Latencies: 00017 00016 00015 00016 Max Latencies: 15502 06202 00710 00287 Histogram Overflows: 00014 00001 00000 00000

Realtime kernel (Linux realtimepi 5.10.35-rt39-v7l+ #8 SMP PREEMPT_RT Mon May 24 16:06:59 PDT 2021 armv7l GNU/Linux)

image

Min Latencies: 00009 00008 00009 00008 Avg Latencies: 00021 00020 00019 00022 Max Latencies: 00101 00079 00074 00075 Histogram Overflows: 00000 00000 00000 00000

So it looks like your kernel is fine and I thank you for your time.

jk987 commented 2 years ago

I'm still testing and while connecting and disconnecting various devices and reading SD card of my phone connected via USB latency got up to 180 microseconds but it is still great for me.

guysoft commented 2 years ago

Thanks for sharing! Rarely people update here results of tests, and this can help others understand what RealtimePi could do.

It might even constitute opening a wiki page with results, but only if you feel like posting there of course.

jk987 commented 2 years ago

Something like that already exists: https://www.osadl.org/Boards-and-distros.qa-farm-boards-distros.0.html

They have racks full of boards and test realtime linux latency on them.

https://www.osadl.org/Thumbnails-of-all-default-latency-plots.qa-latencyplot-thumbnails.0.html

I've heard that if you pay them then you can get 3D charts like on page 34 of the following presentation: https://installfest.cz/if15/slides/pisa_rpi.pdf

guysoft commented 2 years ago

ok, great. should I close the issue or is there anything else worth adding?

jk987 commented 2 years ago

You close it, or maybe I'll try the "Close with comment" button myself. I've never done it. :)