Which kernel is the fastest running Machinekit on BBB?

303 views
Skip to first unread message

Simon S

unread,
Aug 6, 2019, 5:07:44 AM8/6/19
to Machinekit
Hi!

My old machinekit installation runs on a BBB under debian jessie with a xenomai kernel.
I start the axis gui via an SSH session using indirect OpenGL rendering.
For normal CAM jobs this is reasonable fast and the gui is responsive.
Only huge jobs with e.g. 3D cam operations take some time to load but then they are fine as well.
I want to switch to a more recent version because I can not get the XHC-HB04 pendant working under jessie

So I  configured a second BBB using debian stretch.
I tested various kernels but all seem to be way slower than the old kernel
coming with my debian jessie image.
Some kernels export the wrong cpu frequency settings and do not use the
maximum clock but even those who do are still slow.
Opening a very basic CAM jobs in axis loads for a minute or more.

Something seems wrong... When I open a second console via ssh
while axis is running the console is laggy and unresponsive as well.

Any hints?

Regards,
Simon

ce...@tuta.io

unread,
Aug 6, 2019, 12:19:40 PM8/6/19
to Simon S, Machinekit
Hello,
Aug 6, 2019, 11:07 AM by fishp...@gmail.com <mailto:fishp...@gmail.com>:
I am not completely sure if you are talking about the latency of HAL instance or the general responsiveness of Linux OS. However, to use Debian Buster/Stretch with modern kernel version, you pretty much have to use Preempt_RT or Vanilla. The Xenomai currently in Machinekit is EOLed 2.6.something version running in tandem with 3.something Linux kernel. To use 4.19.something or 5.2.something kernel, you would need the Xenomai3 or EVL Core, for which support is currently not finished.

Cern.


Simon S

unread,
Aug 6, 2019, 2:05:39 PM8/6/19
to Machinekit
Hi!

Sorry about beeing unclear. I know that I switched the underlaying RT os.

The jessie box runs:
Linux beaglebone 3.8.13-xenomai-r83 #1 Thu Jan 5 01:32:32 UTC 2017 armv7l GNU/Linux

And on stretch:
Linux beaglebone 4.19.37-bone-rt-r33 #1stretch PREEMPT RT Wed Jun 5 11:22:07 UTC 2019 armv7l GNU/Linux

I switched all driver/config stuff to use the preempt rt stuff.

The jessie box is perfectly fine. The stretch based one is unusable.
I am wondering how others use a stretch based image and if I am doing something wrong
and there is a "magic" kernel version that is fast enough to be used.

I did a simple benchmark opening a text engraving gcode file from fusion360.
On the Jessie box it takes ~20s from clicking load to display.
On the stretch base box takes around 4 minutes...

Or could it have something to do with the fact that the stretch image runs
from SD and the jessie from internal flash?
Is there so much disk I/O involved?

Regards,
Simon

ce...@tuta.io

unread,
Aug 7, 2019, 11:41:08 AM8/7/19
to Simon S, Machinekit
Aug 6, 2019, 8:05 PM by fishp...@gmail.com:
Well, it pretty well could be. To reach some verdict, the inputs should be the same. Difference of 3.40 minutes seems little too excessive for just change in kernel and distribution versions. However, you can test it all (if you have the time and incentive). You can install the 3.8 Linux Kernel with 2.x Xenomai patch on Debian Stretch and vice versa. (But you will - probably - have to do the compiling yourself.)

Cern.

Alexander Rössler

unread,
Aug 8, 2019, 6:15:55 AM8/8/19
to ce...@tuta.io, Simon S, Machinekit
We had to do some to get Machinekit working on Stretch without a problem. The verdict is that 4.9.108-bone-rt-r10 kernel works fine.

Alex

From: machi...@googlegroups.com <machi...@googlegroups.com> on behalf of ce...@tuta.io <ce...@tuta.io>
Sent: Wednesday, August 7, 2019 17:41
To: Simon S <fishp...@gmail.com>
Cc: Machinekit <machi...@googlegroups.com>
Subject: Re: [Machinekit] Which kernel is the fastest running Machinekit on BBB?
 
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/machinekit/LlgjPzb--3-1%40tuta.io.

Simon S

unread,
Aug 8, 2019, 3:39:45 PM8/8/19
to Machinekit
Thanks thats something I will investigate.
I am currently trying to build the 3.8.13 xenomai kernel and machinekit under
a plain stretch based debian image.
The kernel feels much more responsive already, however I struggle building or
more exactly running machinekit from source.

I will try your kernel revision once I am done with that.

Regards,
Simon

Simon S

unread,
Aug 11, 2019, 7:42:29 AM8/11/19
to Machinekit
I successfully compiled the 3.8.13 kernel with xenomai on debian stretch.
I am using the same xenomai userspace libs as on jessie (2.6.3)
and i compiled the latest machinekit from source directly on the BBB.
(Note: you will need a swap device during compilation, I used a swap file on the SD)

Interestingly I get the same speed and a really responsive GUI with this kernel.
The same file that loads within 4 minutes on the exact same hardware and the same SD card using the 4.19.37 kernel does load now within 20s!
The same performance as my old jessie box.

So my recommendation is kernel 3.8.13 ;)

I do not know why I see such a massive performance issue when using the 4.19 kernel but for now I will stay with the 3.8.13 kernel.
If anyone has an idea what might cause the performance issue I would be happy to learn about it :)

Regards,
Simon

Alan Thomason

unread,
Mar 19, 2022, 3:53:10 PM3/19/22
to Machinekit
Hi there Simon...I realize it has been almost 3years since you posted this, but are you still using 3.8.13?  

For Simon or anyone else comfortable with compiling machine kit on BBB from source...it would be very helpful to those new to machinekit if you could
  1. Indicate the source of the starting image.
  2. output a history of your work on the BBB from that image installation (for instance 'history -w history.txt')
I see the instructions on the development portion of the website here, but it's the early steps that I'm struggling with.  I'm hoping for a more 'dumbed down' set of instructions.

Thanks so much, 
Alan

Reply all
Reply to author
Forward
0 new messages