- LinuxCNC
- Installing LinuxCNC
- The case for Debian Bookworm and the 6.1 kernel (including installation notes)
The case for Debian Bookworm and the 6.1 kernel (including installation notes)
18 Mar 2023 11:47 - 18 Mar 2023 11:48 #266983
by rodw
This screen dump is from a fairly old Gigabyte Celeron N3160 USFF that was the first PC I used on my plasma cutter when I started with linuxcnc about 7 years ago. Back then, the latency was around 130,000 and now its down to 20,000 after 5 hours or so. That's the power of Debian Bookworm and isolcpus!
I find htop interesting to observe the CPU load on individual cores. We have isolates cores 2 & 3 of this four core device exclusively for real time PREEMPT_RT. You can see that cores 1 & 2 are hovering around 100% CPU utilisation yet the real time cores are barely doing anything. We even have an ethercat master installed talking to two slave devices during this test.
I think the added performance is due to the decision by Debian to include the non-free drivers in ther Bookworm alpha2 release and the continual improvement in PREEMPT_RT. A lot of the patches have been ported to the main line kernel code so the patch is a lot smaller than it was with Buster which is used by the linuxcnc ISO.
You to can enjoy this level of performance by following these installation steps I have put together.
docs.google.com/document/d/1jeV_4VKzVmOI...diY/edit?usp=sharing
This method obsoletes a number of installation threads, so mods may give consideration to making this a sticky and unstickying some of the other stickied installation threads. Just be careful to follow the instructions, particularly the ethercat section if you use it.
I find htop interesting to observe the CPU load on individual cores. We have isolates cores 2 & 3 of this four core device exclusively for real time PREEMPT_RT. You can see that cores 1 & 2 are hovering around 100% CPU utilisation yet the real time cores are barely doing anything. We even have an ethercat master installed talking to two slave devices during this test.
I think the added performance is due to the decision by Debian to include the non-free drivers in ther Bookworm alpha2 release and the continual improvement in PREEMPT_RT. A lot of the patches have been ported to the main line kernel code so the patch is a lot smaller than it was with Buster which is used by the linuxcnc ISO.
You to can enjoy this level of performance by following these installation steps I have put together.
docs.google.com/document/d/1jeV_4VKzVmOI...diY/edit?usp=sharing
This method obsoletes a number of installation threads, so mods may give consideration to making this a sticky and unstickying some of the other stickied installation threads. Just be careful to follow the instructions, particularly the ethercat section if you use it.
Attachments:
Last edit: 18 Mar 2023 11:48 by rodw.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18500
- Thank you received: 6176
18 Mar 2023 12:14 #266985
by tommylight
I suspect that is how the kernel avoids assigning work to isolated cores, if they are busy, no use in giving them more work.
Replied by tommylight on topic The case for Debian Bookworm and the 6.1 kernel (including installation notes)
Do they stay at 100% even when idle?You can see that cores 1 & 2 are hovering around 100% CPU utilisation yet the real time cores are barely doing anything.
I suspect that is how the kernel avoids assigning work to isolated cores, if they are busy, no use in giving them more work.
Please Log in or Create an account to join the conversation.
18 Mar 2023 12:43 - 18 Mar 2023 12:46 #266992
by rodw
Replied by rodw on topic The case for Debian Bookworm and the 6.1 kernel (including installation notes)
Tommy, the cores are isolated so they are only for use by real time threads which have to be instantiated differently to a normal thread. (eg our sevo thread). If they are not doing anything, there is no load. So user space only runs on the non isoated cores.
Core 0 by default gets a lot of routine housekeeping interupts from the Linux operating system so never isolate core 0.
With an Odroid N2+ 6 core ARM PC using isolcpus=2,3,4,5 I could see CPU load on the user cores (0 & 1) with every instance of glxgears I added. At about 8 instances, the CPU was at around 90% utilisation and latency went out the window if I added more. In similar testing, the latency was around 70,000, still a lot better than what this PC used to get on Mint 17.3 back in the day..
Also back then it was not possible to use the internal wifi as latency blew out to >300,000. now I'm using it with no ill affects to latency.
Core 0 by default gets a lot of routine housekeeping interupts from the Linux operating system so never isolate core 0.
With an Odroid N2+ 6 core ARM PC using isolcpus=2,3,4,5 I could see CPU load on the user cores (0 & 1) with every instance of glxgears I added. At about 8 instances, the CPU was at around 90% utilisation and latency went out the window if I added more. In similar testing, the latency was around 70,000, still a lot better than what this PC used to get on Mint 17.3 back in the day..
Also back then it was not possible to use the internal wifi as latency blew out to >300,000. now I'm using it with no ill affects to latency.
Last edit: 18 Mar 2023 12:46 by rodw.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
19 Mar 2023 16:49 #267089
by scotth
Replied by scotth on topic The case for Debian Bookworm and the 6.1 kernel (including installation notes)
Rod,
Trying to install Bookworm on HP Elitedesk 800-G1-SFF
Core I5 5490 with Mesa Intel HD Graphics 4600 HSW GT2.
It comes up with can't ID graphics card and installing in blind mode and fails there.
Any ideas on how to get around this. Graphics are built in and not worth the cost of a half height graphics card.
Trying to install Bookworm on HP Elitedesk 800-G1-SFF
Core I5 5490 with Mesa Intel HD Graphics 4600 HSW GT2.
It comes up with can't ID graphics card and installing in blind mode and fails there.
Any ideas on how to get around this. Graphics are built in and not worth the cost of a half height graphics card.
Please Log in or Create an account to join the conversation.
20 Mar 2023 07:25 #267116
by rodw
Replied by rodw on topic The case for Debian Bookworm and the 6.1 kernel (including installation notes)
Scott, Sorry, I have no idea on how to troubleshoot graphics driver issues. I have noticed messgaes about the Intel i915 driver being missing with dkms drivers or playing with kernel upgrades. Also Intel have been working on a new driver as reported from December 2022. Maybe something has been broken on a 20 year old driver...
The following user(s) said Thank You: scotth
Please Log in or Create an account to join the conversation.
- my1987toyota
-
- Offline
- Platinum Member
-
Less
More
- Posts: 787
- Thank you received: 309
21 Mar 2023 00:22 #267194
by my1987toyota
Replied by my1987toyota on topic The case for Debian Bookworm and the 6.1 kernel (including installation notes)
hey Rodw why do you only recommend XFCE? I ask because I like using Mate and was curious if their was
some issue I should be aware of.
some issue I should be aware of.
Please Log in or Create an account to join the conversation.
21 Mar 2023 00:49 #267195
by rodw
A lot of GUIs etc (like probe-basic ) assume XFCE. The New Probe-Basic installation does not install the required desktop shortcuts if installed on Gnome.
The default Gnome Debian default are based on Wayland unless the Xorg version is selected on the logon screen.
Linuxcnc has had a lot of issues with Wayland as until recently it would not open GUIs including Axis. Some workarounds are now included in the recent Bookworm debs.
.
So all in all its easier to just stick to XFCE, If mate is an Xorg gui (which I think it is), you are probably OK.
Try installing both Mate and XFCE and then you can select the environment to use on the logon screen. It should remember your choice...
Replied by rodw on topic The case for Debian Bookworm and the 6.1 kernel (including installation notes)
Xfce is what the official Linuxcnc ISO uses. It is based on Xorg Xwindows.hey Rodw why do you only recommend XFCE? I ask because I like using Mate and was curious if their was
some issue I should be aware of.
A lot of GUIs etc (like probe-basic ) assume XFCE. The New Probe-Basic installation does not install the required desktop shortcuts if installed on Gnome.
The default Gnome Debian default are based on Wayland unless the Xorg version is selected on the logon screen.
Linuxcnc has had a lot of issues with Wayland as until recently it would not open GUIs including Axis. Some workarounds are now included in the recent Bookworm debs.
.
So all in all its easier to just stick to XFCE, If mate is an Xorg gui (which I think it is), you are probably OK.
Try installing both Mate and XFCE and then you can select the environment to use on the logon screen. It should remember your choice...
The following user(s) said Thank You: my1987toyota
Please Log in or Create an account to join the conversation.
22 Mar 2023 06:42 #267275
by song_gy
Hello Rodw
I don't know what I did wrong with that step.
It shows above error when I start Probe Basic Lathe/Mill.
Can you help me see where is the problem?
Thank you so much!
Replied by song_gy on topic The case for Debian Bookworm and the 6.1 kernel (including installation notes)
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.0~pre1+git20230208.f1270d6ed7
Machine configuration directory is '/home/song/dev/probe_basic/configs/probe_basic_lathe'
Machine configuration file is 'probe_basic_lathe.ini'
INIFILE=/home/song/dev/probe_basic/configs/probe_basic_lathe/probe_basic_lathe.ini
VERSION=1.1
PARAMETER_FILE=sim-lathe.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=halui
DISPLAY=probe_basic_lathe
COORDINATES=X Z
KINEMATICS=trivkins coordinates=xz
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./hallib/core_sim_2.hal
Found file(REL): ./hallib/simulated_home_xz.hal
Found file(REL): ./hallib/simulated_lathe.hal
Starting TASK program: milltask
Starting DISPLAY program: probe_basic_lathe
Shutting down and cleaning up LinuxCNC...
task: 83 cycles, min=0.000014, max=0.023906, avg=0.009772, 0 latency excursions (> 10x expected cycle time of 0.010000s)
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
Note: Using POSIX realtime
Unexpected realtime delay on task 0 with period 100000
This Message will only display once per session.
Run the Latency Test and resolve before continuing.
Traceback (most recent call last):
File "/home/song/dev/venv/bin/probe_basic_lathe", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/song/dev/probe_basic/src/probe_basic_lathe/__init__.py", line 19, in main
qtpyvcp.run_vcp(opts, VCP_CONFIG_FILE)
File "/home/song/dev/qtpyvcp/qtpyvcp/__init__.py", line 26, in run_vcp
run(*args, **kwargs)
File "/home/song/dev/qtpyvcp/qtpyvcp/app/__init__.py", line 97, in run
apply_opts(opts)
File "/home/song/dev/qtpyvcp/qtpyvcp/utilities/opt_parser.py", line 202, in apply_opts
from qtpyvcp.utilities import logger
File "/home/song/dev/qtpyvcp/qtpyvcp/utilities/logger.py", line 27, in <module>
from qtpyvcp.lib.logger import TTYHandler
File "/home/song/dev/qtpyvcp/qtpyvcp/lib/logger.py", line 2, in <module>
import serial
ModuleNotFoundError: No module named 'serial'
1485
1529
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
Hello Rodw
I don't know what I did wrong with that step.
It shows above error when I start Probe Basic Lathe/Mill.
Can you help me see where is the problem?
Thank you so much!
Please Log in or Create an account to join the conversation.
22 Mar 2023 06:47 - 22 Mar 2023 06:47 #267276
by rodw
Replied by rodw on topic The case for Debian Bookworm and the 6.1 kernel (including installation notes)
Please ask for help in the qtpyvcp section. This appears to be the error. I don't think its part of qtpyvcp
ModuleNotFoundError: No module named 'serial'
ModuleNotFoundError: No module named 'serial'
Last edit: 22 Mar 2023 06:47 by rodw.
Please Log in or Create an account to join the conversation.
02 May 2023 22:40 #270514
by JPL
Replied by JPL on topic The case for Debian Bookworm and the 6.1 kernel (including installation notes)
Ohh! I see that your document is growing! Last time I've checked there was about 25 points, now over 60. Hummm, I'm very tempted to try this given the results you had. Are you still as enthusiast by this release as you where before ? Also, did you find any major issues since then?...You to can enjoy this level of performance by following these installation steps I have put together.
docs.google.com/document/d/1jeV_4VKzVmOI...diY/edit?usp=sharing
Please Log in or Create an account to join the conversation.
- LinuxCNC
- Installing LinuxCNC
- The case for Debian Bookworm and the 6.1 kernel (including installation notes)
Time to create page: 0.296 seconds