Bad Latency Fujitsu Esprimo D756 i5 6500

More
01 Jun 2024 15:07 - 01 Jun 2024 15:19 #302063 by ErwinCNC
Hello everyone,


I would like to ask for your help in setting up Linux CNC. I have been using Estlcam for my Gantry CNC portal milling machine. Now I would like to improve the machine mechanically and electrically. I have already purchased a new control cabinet. I would like to use Linux CNC as the control system, but I am still having problems starting up. The machine runs with 4x (XYYZ) JMC Closed Loop Stepper 3Nm.

For the control PC I bought a Fujistu Esprimo D756 (i5 6500, 16GB RAM, no graphics card). For Linux I have installed a 254GB SSD and downloaded the finished ISO from the LinuxCNC homepage.
I would like to use the parallel port for the start. If everything runs smoothly and I like the control system, I may switch to a mesa card in the future.

The installation itself went smoothly but I have (from my point of view) very bad latency values. I have attached a picture of the test (BIOS with factory settings)

 

I tried different configurations in the bios but without any significant improvement. Even the installation of an old graphics card hardly brought any improvement.

What is your opinion? Is the PC completely unsuitable for Linux CNC or is it worth trying other options to optimize the RT?

Can the BIOS settings be exported somehow to display them here in the forum?

One more question:
The mainboard has a parallel port on the circuit board (Connector ribbon cable). This is also displayed in the BIOS.
Under Device Settings IO = 378h IRQ = 5
I can make settings under Device Mode. SPP Mode is currently selected there.
Unfortunately, I cannot find the parallel port in Linux CNC.
Does anyone have an idea how I can proceed here?


Thank you very much

Greetings Erwin

 
Attachments:
Last edit: 01 Jun 2024 15:19 by ErwinCNC.

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

More
02 Jun 2024 12:17 #302143 by royka
You could first try to find these settings in the BIOS and turn them off like: speedstep, turbo, Hyper Threading, onboard audio.
Then there are kernel parameters, for example these worked well on a Dell Optiplex with a 6500T cpu:
isolcpus=3 intel_pstate=disable processor.max_cstate=0 idle=poll cpufreq.default_governor=performance ahci.mobile_lpm_policy=1 irqaffinity=0 nomodeset quiet

There are many more parameters you can find on Google and this forum to try.
Sometimes a newer kernel can also help, this one I compiled a few weeks ago:
drive.google.com/drive/folders/1L28lG0zD...2XQJx?usp=drive_link

I've read that Tommylight set his LPT port at ECP mode.
The following user(s) said Thank You: ErwinCNC

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

More
02 Jun 2024 12:21 #302145 by tommylight
EPP mode is prefered, i am just used to set it to ECP from back in the IT days. Both should work with built in ports.
The following user(s) said Thank You: royka, ErwinCNC

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

More
03 Jun 2024 18:50 - 03 Jun 2024 19:21 #302258 by ErwinCNC
Many thanks for your answers

I have made the following settings in the bios (based on a reset to factory settings)

Active Prozessor Cores ALL
Intel Virtualization Technology Disable
VT-d Disable
Intel TXT Support Disable
Enhanced SpeedStep Disabled
Package C State limit C0 - Which setting should be selected here?

LAN Controller Disabled
Azalia HD Audio Disabled

Launch CSM Enabled

Unfortunately, the values in the latency test have not really changed.
 

Next Step is trying the kernel parameters.

sudo nano /etc/default/grub

and add
isolcpus=3 intel_pstate=disable processor.max_cstate=0 idle=poll cpufreq.default_governor=performance ahci.mobile_lpm_policy=1 irqaffinity=0 nomodeset quiet

save and restart is there anything else to do?

cnc@cnc:~$ sudo update-grub
[sudo] Passwort für cnc:
/usr/sbin/grub-mkconfig: 14: /etc/default/grub: cpufreq.default_governor=performance: not found
cnc@cnc:~$ sudo update-grub
/usr/sbin/grub-mkconfig: 15: /etc/default/grub: ahci.mobile_lpm_policy=1: not found
cnc@cnc:~$ sudo update-grub
/usr/sbin/grub-mkconfig: 17: /etc/default/grub: nomodeset: not found
cnc@cnc:~$ sudo update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-18-rt-amd64
Found initrd image: /boot/initrd.img-6.1.0-18-rt-amd64
done
cnc@cnc:~$

 
but it says no isolcpus ???



 
Attachments:
Last edit: 03 Jun 2024 19:21 by ErwinCNC.

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

More
03 Jun 2024 21:10 #302272 by tommylight

sudo nano /etc/default/grub

and add
isolcpus=3 intel_pstate=disable processor.max_cstate=0 idle=poll cpufreq.default_governor=performance ahci.mobile_lpm_policy=1 irqaffinity=0 nomodeset quiet

Those parameters must be added at the end an existing line containing words "quiet splash" and must be inside "

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

More
03 Jun 2024 23:06 - 04 Jun 2024 10:48 #302280 by royka
sudo update-grub
Oops see that you already did that, then it's indeed what tommylight said.
So that would be:
GRUB_CMDLINE_LINUX="isolcpus=3 intel_pstate=disable processor.max_cstate=0 idle=poll cpufreq.default_governor=performance ahci.mobile_lpm_policy=1 irqaffinity=0 nomodeset quiet"

After 'sudo update-grub' you can see if it worked at: /boot/grub/grub.cfg

You could also still try the newer kernel version
Last edit: 04 Jun 2024 10:48 by royka.
The following user(s) said Thank You: ErwinCNC

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

More
04 Jun 2024 18:44 #302335 by ErwinCNC
Thanks again for your support

The import of the parameters has now worked. The values are also better at the beginning but after a while there are still peaks of 300+
 
For me there is still one open point before I change the kernel
Package C State limit C0 - Which setting should be selected here?
www.heise.de/select/ct/2016/6/1457861953266796
Something about this is explained here (in German).
If I have understood the article correctly, the selection of C0 = active is correct and the higher the number, the more energy is saved...
Attachments:

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

More
04 Jun 2024 22:33 #302344 by royka
That's a big improvement already indeed, if it won't show big latency on the servo thread like this with "latency-histogram --nobase" it should be good for use with Mesa.
After such a big latency you can check "cat /proc/interrupts" to see if there is a device causing a latency on the isolated CPU.

Max c-state should be 0 indeed which means fully active, already set as kernel parameter, but might help if you still set it already in the BIOS.

If you don't trust the kernel I compiled, it's pretty easy to compile it yourself. Look for the newest rt patch, download that release of Linux and apply the patch and compile (after setting it at full realtime). You can find a tutorial easily online.
The following user(s) said Thank You: ErwinCNC

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

More
04 Jun 2024 23:46 #302347 by tommylight
Run the latency histogram with this
latency-histogram --nobase --sbinsize 1000 --show
Post a screenshot.
That is if you do not use the parallel port, there is no need for base period.
The following user(s) said Thank You: ErwinCNC

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

More
05 Jun 2024 16:57 #302395 by ErwinCNC
Unfortunately, a longer runtime has also shown that the servo thread has poor latency.
 

I have displayed the interrupts, but I cannot interpret the displayed values.
Maybe performance monitoring interrupts and machine check polls?
 

I have no doubts about the kernels, it's more a question of knowing how to update/change them.


I would like to use the parallel port for the first tests. In case I don't like the software after all.

 
Attachments:

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

Time to create page: 0.382 seconds
Powered by Kunena Forum