Bad Latency Fujitsu Esprimo D756 i5 6500
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:
Please Log in or Create an account to join the conversation.
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.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19217
- Thank you received: 6439
Please Log in or Create an account to join the conversation.
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:
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19217
- Thank you received: 6439
Those parameters must be added at the end an existing line containing words "quiet splash" and must be inside "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
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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.
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.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19217
- Thank you received: 6439
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.
Please Log in or Create an account to join the conversation.
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.