ODroid as raplacement for Raspberry Pi

More
28 Feb 2023 09:08 #265540 by alangibson
Running
# Run a stress-ng CPU stressor on each reserved CPU
seq 2 5 | xargs -i -P 4 taskset -c {} stress-ng --cpu 1 --cpu-method all -t 10m &
# then find worst-case latency numbers
sudo cyclictest --mainaffinity=1 --affinity=2-5 --priority=99 --threads --interval=10000

I end up with
root@odroidn2:~# cyclictest --mainaffinity=1 --affinity=2-5 --priority=99 --threads --interval=1000
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 8.79 5.94 2.70 5/185 2507          

T: 0 ( 2366) P:99 I:1000 C: 297743 Min:      2 Act:    3 Avg:    3 Max:      69
T: 1 ( 2367) P:99 I:1500 C: 198495 Min:      2 Act:    3 Avg:    4 Max:      78
T: 2 ( 2368) P:99 I:2000 C: 148871 Min:      2 Act:    4 Avg:    4 Max:      47
T: 3 ( 2369) P:99 I:2500 C: 119097 Min:      2 Act:    4 Avg:    5 Max:      51

The max latency numbers are interesting because they are significantly higher than I was seeing before. I'm going to dig deeper because I'm not sure what would cause that.
 
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
28 Feb 2023 09:50 #265547 by rodw
I'm not really familiar with cyclictest but I see the average is very close to the min.
Do you see any 2 digit actual numbers flashing up?
I think the max figures are one off outliers otherwise the averages (3, 4 or 5) would be a lot higher.
maybe at startup or something.
 

Please Log in or Create an account to join the conversation.

More
28 Feb 2023 09:56 #265548 by alangibson
> I see the average is very close to the min.

I noticed the same thing. The max is > 10x the avg which seems odd. The max does climb slightly over time, so it's not related to startup.

I'm going to do some reading and try to figure out how to capture some data on whatever may be causing these spikes.

Please Log in or Create an account to join the conversation.

More
28 Feb 2023 10:07 #265550 by rodw
you could try old school
sudo apt install linuxcnc-uspace
latency-histogram --nobase --sbins 1000
and see where the spikes are...

Please Log in or Create an account to join the conversation.

More
28 Feb 2023 11:35 #265553 by alangibson
The numbers from latency-histogram are basically the same. I started just running cyclictest because there's usually not much difference.

It may be worth building the kernel with ftrace enabled. Apparently cyclictest will record a trace of what the kernel was doing when there is a latency spike if you add `--breaktrace= 50 --tracemark`

stackoverflow.com/questions/52033624/ena...acteristic-of-system

Please Log in or Create an account to join the conversation.

More
28 Feb 2023 15:25 - 28 Feb 2023 15:26 #265571 by alangibson
Apparently we can also look for latency introduced by things happening within ARM TrustZones by enabling the Hardware Latency Tracer:
CONFIG_HWLAT_TRACER=y

access.redhat.com/documentation/en-us/re...ow-latency-operation
Last edit: 28 Feb 2023 15:26 by alangibson.

Please Log in or Create an account to join the conversation.

More
03 Mar 2023 03:43 #265756 by CarterKraft

We got an early result!
The PREEMPT_RT kernel has been kept seperate from the image as its quicker to just build the kernel at this stage when trying
Go to my drive
drive.google.com/drive/folders/1yZJ1_14W...CekVJOER?usp=sharing
download the image and install it to an SD card (not eMMC at this stage) with Balena Etcher
Download and install the 4 debs with: sudo dpkg -i kernel-name.deb
Install linuxcnc with:
sudo apt install linuxcnc-uspace linuxcnc-uspace-dev mesaflash

Optionally play with isolcpus as thats not optimised yet.
Edit /boot/armbianEnv.txt
Enter: extraargs=isolcpus=2,3,4,5

Let us know how you got on
 

I am getting my butt kicked. I got the image burned to SD with Balena, SD installed and I can SSH in to the odroid and get it configured however it doesn't launch the desktop and I can't get it to. 
I get this

ckcplasmaodroid@odroidn2:~$ startxfce4
/usr/bin/startxfce4: Starting X server
/usr/bin/startxfce4: 122: exec: xinit: not found

Secondly when I try to install the 4x debs I have them  on a USB but I can't figure out via command line how to move them, then install them. 
If I could get the desktop to work I won't be so helpless. 
 

Please Log in or Create an account to join the conversation.

More
03 Mar 2023 04:22 #265757 by rodw
Something is odd here.

Did you use my image or one from the Armbian site?
Maybe I had the wrong image in drive.
Try this image of mine.
drive.google.com/file/d/1QyaiQRC5UeyPJix...vQk/view?usp=sharing
It should give you the xfce desktop
The USB will just open in the file explorer.

You can make  a new top level folder on the SD card while its on the host (reinsert after burning) and copy the debs there. You might need to use Sudo on the droid.
I've also created the user and put the SD back into the host and copy files to the home directory

you can install the debs with sudo  dpkg -i mydeb.deb
this is where the tab auto complete is useful

eg. sudo dpkg -i linux-header(tab)
I'll have a look tonight.


 
The following user(s) said Thank You: CarterKraft

Please Log in or Create an account to join the conversation.

More
05 Mar 2023 23:12 #265942 by CarterKraft

Something is odd here.

Did you use my image or one from the Armbian site?
Maybe I had the wrong image in drive.
Try this image of mine.
drive.google.com/file/d/1QyaiQRC5UeyPJix...vQk/view?usp=sharing
It should give you the xfce desktop
The USB will just open in the file explorer.

You can make  a new top level folder on the SD card while its on the host (reinsert after burning) and copy the debs there. You might need to use Sudo on the droid.
I've also created the user and put the SD back into the host and copy files to the home directory

you can install the debs with sudo  dpkg -i mydeb.deb
this is where the tab auto complete is useful

eg. sudo dpkg -i linux-header(tab)
I'll have a look tonight.


 

The image I used was "Armbian_23.02.0-trunk_Odroidn2_bookworm_edge_6.2.0_xfce_desktop.img"  
It has the desktop in the file name like it should?

I am going to try the new one now. 
Thanks for looking into this. 

Please Log in or Create an account to join the conversation.

More
06 Mar 2023 16:19 #265959 by CarterKraft
I can't get the desktop to load on this image either, it says "loading desktop environment" but nothing I do gets it to load.

I don't really have the skills to do ALL that it takes via terminal..

I am using ssh to log in, that shouldn't matter right?
I create a root password and a user, startxfce4 gives me the no init file error same as I posted above..

Please Log in or Create an account to join the conversation.

Time to create page: 0.631 seconds
Powered by Kunena Forum