unexpected realtime delay on task 0
- thang
- Offline
- Elite Member
Less
More
- Posts: 196
- Thank you received: 11
28 Oct 2017 04:09 #100909
by thang
unexpected realtime delay on task 0 was created by thang
Hi guys,
Today i try install linuxcnc on ubuntu 16.04 with preempt rt kernel. everything work ok except i always get the bug when i run latency-test:
"Unexpected realtime delay on task 0" then the base-thread spike up to more than 200us after 10-40s everytime i run latency-test.following this wiki.linuxcnc.org/cgi-bin/wiki.pl?Troubl...ck_dmesg_for_details, i tried to solve it but it doesn't work. exactly i did:
1st: open /etc/default/grub and change the line GRUB_CMDLINE_LINUX_DEFAULT = "quiet splash isolcpu=1" then " quiet splash radeon.modeset=0" --> update grub --> nothing change after reboot
2nd: going to BIOS setting, disable speedsptep , virtualization technology,hardware power management, USB legacy support. --> nothing change.
There is a section about SMI fixing but i dont understand how to try it.
This is my system info:
Today i try install linuxcnc on ubuntu 16.04 with preempt rt kernel. everything work ok except i always get the bug when i run latency-test:
"Unexpected realtime delay on task 0" then the base-thread spike up to more than 200us after 10-40s everytime i run latency-test.following this wiki.linuxcnc.org/cgi-bin/wiki.pl?Troubl...ck_dmesg_for_details, i tried to solve it but it doesn't work. exactly i did:
1st: open /etc/default/grub and change the line GRUB_CMDLINE_LINUX_DEFAULT = "quiet splash isolcpu=1" then " quiet splash radeon.modeset=0" --> update grub --> nothing change after reboot
2nd: going to BIOS setting, disable speedsptep , virtualization technology,hardware power management, USB legacy support. --> nothing change.
There is a section about SMI fixing but i dont understand how to try it.
This is my system info:
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17971
- Thank you received: 4829
28 Oct 2017 17:37 - 28 Oct 2017 17:37 #100946
by PCW
Replied by PCW on topic unexpected realtime delay on task 0
Sometimes adding idle=poll in the grub command line helps
Also Preempt-RT very often has worse latency than RTAI and cannot run the base thread as
fast as the default latency test runs ( 25 usec )
If you dont need a base thread, you might try:
latency-test 1ms
or with a slower base thread:
latency-test 100us 1ms
Also Preempt-RT very often has worse latency than RTAI and cannot run the base thread as
fast as the default latency test runs ( 25 usec )
If you dont need a base thread, you might try:
latency-test 1ms
or with a slower base thread:
latency-test 100us 1ms
Last edit: 28 Oct 2017 17:37 by PCW.
The following user(s) said Thank You: thang
Please Log in or Create an account to join the conversation.
- thang
- Offline
- Elite Member
Less
More
- Posts: 196
- Thank you received: 11
30 Oct 2017 08:31 #101002
by thang
Replied by thang on topic unexpected realtime delay on task 0
after try fixing SMI, only latency in ubuntu 14.04 on my laptop better with 50us but still showing unexpected realtime delay ... Adding idle=poll in etc/default/grub not effect. My application needs step/dir so i cant skip base thread. Did anyone success with preempt-rt on ubuntu16.04? if not, is there any guide to build linuxcnc with RTAI on ubuntu ?
Please Log in or Create an account to join the conversation.
- thang
- Offline
- Elite Member
Less
More
- Posts: 196
- Thank you received: 11
30 Oct 2017 10:46 #101009
by thang
Replied by thang on topic unexpected realtime delay on task 0
mhm, i tried install linuxcnc by live/install CD use rtai kernel. The latency-test still spike up to same before. There is a problem while i install linuxcnc(by live/install CD) that is missing firmware rtl_nic/rtl8168e-2.fw but i skip it.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17971
- Thank you received: 4829
30 Oct 2017 14:55 #101018
by PCW
Replied by PCW on topic unexpected realtime delay on task 0
It may be the you simply cannot get good latency from your laptop
This is why Laptops are not suggested as good LinuxCNC hosts
They often have power management systems that cause and that cannot be disabled
This is why Laptops are not suggested as good LinuxCNC hosts
They often have power management systems that cause and that cannot be disabled
The following user(s) said Thank You: thang
Please Log in or Create an account to join the conversation.
- thang
- Offline
- Elite Member
Less
More
- Posts: 196
- Thank you received: 11
30 Oct 2017 15:30 #101020
by thang
Replied by thang on topic unexpected realtime delay on task 0
no, i mean with laptop after fix SMI the latency make it better(around 50us base thread) but with 2 desktop computers they give me bad latecytest( with core i3 give me 130us and core i5 give me 260us,weird).
The difference between laptop and desktop is laptop using ubuntu 14.04 and desktop using 16.04
after that i tried install linuxcnc CD package(rtai kernel for desktop but still give bad latency . So do this problem happen because of my hardware?
The difference between laptop and desktop is laptop using ubuntu 14.04 and desktop using 16.04
after that i tried install linuxcnc CD package(rtai kernel for desktop but still give bad latency . So do this problem happen because of my hardware?
Please Log in or Create an account to join the conversation.
- Ozzyrob
- Visitor
31 Oct 2017 00:18 - 31 Oct 2017 00:22 #101037
by Ozzyrob
Replied by Ozzyrob on topic unexpected realtime delay on task 0
Have you read wiki.linuxcnc.org/cgi-bin/wiki.pl?The_Is...results_for_isolcpus
It mentions other options for isolcpus than the one you said you have tried. Something to investigate if you have 4 or more cores.
If you can state what motherboard or desktop you are trying to use, someone may chime in.
There are one or two threads regarding latency issues and the methods take to resolve the issue on the forum. Maybe worth trying a search or just browsing through the forums.
Here is one forum.linuxcnc.org/18-computer/25927-red...lticore-pc-s-success
It mentions other options for isolcpus than the one you said you have tried. Something to investigate if you have 4 or more cores.
If you can state what motherboard or desktop you are trying to use, someone may chime in.
There are one or two threads regarding latency issues and the methods take to resolve the issue on the forum. Maybe worth trying a search or just browsing through the forums.
Here is one forum.linuxcnc.org/18-computer/25927-red...lticore-pc-s-success
Last edit: 31 Oct 2017 00:22 by Ozzyrob.
Please Log in or Create an account to join the conversation.
- thang
- Offline
- Elite Member
Less
More
- Posts: 196
- Thank you received: 11
31 Oct 2017 03:52 #101041
by thang
Replied by thang on topic unexpected realtime delay on task 0
i tried these solutions but it's just decrease latency a bit when i start, after around 30-50s latency still spikes up from 8us to 260us. On ubuntu 16.04 with preempt rt kernel the terminal show: Unexpected realtime delay.... On debian 3.4.55-4 (rtai kernel) show nothing but still spike up to from 11us to 130us(core i3)
Please Log in or Create an account to join the conversation.
- thang
- Offline
- Elite Member
Less
More
- Posts: 196
- Thank you received: 11
31 Oct 2017 15:35 #101069
by thang
Replied by thang on topic unexpected realtime delay on task 0
so, now i 'm testing on 3 pc include: dual core, core i3, core i5. The list what i tried are:
+ Setting BIOS:
- Turn off HT technology, multicore,speedstep, USB legacy support, Virtualization, power saving.
+ Edit grub:
- Add isolcpus= 1; 1,2,3; 2,3 at GRUB_CMDLINE_LINUX_DEFAULT="there is something else here" --> update grub
- Replace isolcpus=1 by radeon.modeset=0 --> update grub
+ following this solotions forum.linuxcnc.org/18-computer/25927-red...success?limitstart=0
+ fixing SMI.
+result: i use this way to test: cd /usr//testsuite/kern/latency then ./run
- with dual core(use liveCD): the latency (lat max) is around 60us with no overrun
- with core i3(use liveCD) : the latency is around 130k with some overruns
- with core i5(use ubuntu 16.04 and preempt-rt): didnt try new solution yet but last result give around 260us
=> these solutions didnt work.
+ next i think i will try change graphic card and disable onboard card. I will update my mainboard soon, hope someone give me some advices
+ Setting BIOS:
- Turn off HT technology, multicore,speedstep, USB legacy support, Virtualization, power saving.
+ Edit grub:
- Add isolcpus= 1; 1,2,3; 2,3 at GRUB_CMDLINE_LINUX_DEFAULT="there is something else here" --> update grub
- Replace isolcpus=1 by radeon.modeset=0 --> update grub
+ following this solotions forum.linuxcnc.org/18-computer/25927-red...success?limitstart=0
+ fixing SMI.
+result: i use this way to test: cd /usr//testsuite/kern/latency then ./run
- with dual core(use liveCD): the latency (lat max) is around 60us with no overrun
- with core i3(use liveCD) : the latency is around 130k with some overruns
- with core i5(use ubuntu 16.04 and preempt-rt): didnt try new solution yet but last result give around 260us
=> these solutions didnt work.
+ next i think i will try change graphic card and disable onboard card. I will update my mainboard soon, hope someone give me some advices
Please Log in or Create an account to join the conversation.
- Ozzyrob
- Visitor
31 Oct 2017 23:32 - 31 Oct 2017 23:51 #101090
by Ozzyrob
Replied by Ozzyrob on topic unexpected realtime delay on task 0
As I mentioned before details (model\manufacturer) of PC's and motherboards will help.
I experimented with a P4 3.0Ghz dell (can't recall the model), I used the Linuxcnc supplied cd, Linuxcnc running on slackware and linuxcnc running on a base built following Linux From Scratch & Beyond Linux From Scratch......from memory the best results I got was from the slackware\linuxcnc combo. I did notice spikes on all 3 combos when using IDE drive interface, not so with SATA.
I eventually got fed up trying to get decent results and opted for a BeagleBone Black and using the PRU for step generation...yeah graphics aren't the best, takes a couple of extra seconds to load......but the programmable realtime units and hardware quadrature encoders are pretty cool. Keeping the HDMI I still have 16 outputs and 18 inputs (as I have the system configured) plus one extra that I can use as either Input or Output.
The above is no way a slight on Linuxcnc, the Developers and of course the forum and it's members. I have learnt far more on this from this forum, wiki & members than anywhere else. It was more a comment on the access to hardware and personal funds available to myself.....I'd bought a BBB a few years ago.
Some people have reported ok results using on board graphics on certain boards.
I experimented with a P4 3.0Ghz dell (can't recall the model), I used the Linuxcnc supplied cd, Linuxcnc running on slackware and linuxcnc running on a base built following Linux From Scratch & Beyond Linux From Scratch......from memory the best results I got was from the slackware\linuxcnc combo. I did notice spikes on all 3 combos when using IDE drive interface, not so with SATA.
I eventually got fed up trying to get decent results and opted for a BeagleBone Black and using the PRU for step generation...yeah graphics aren't the best, takes a couple of extra seconds to load......but the programmable realtime units and hardware quadrature encoders are pretty cool. Keeping the HDMI I still have 16 outputs and 18 inputs (as I have the system configured) plus one extra that I can use as either Input or Output.
The above is no way a slight on Linuxcnc, the Developers and of course the forum and it's members. I have learnt far more on this from this forum, wiki & members than anywhere else. It was more a comment on the access to hardware and personal funds available to myself.....I'd bought a BBB a few years ago.
Some people have reported ok results using on board graphics on certain boards.
Last edit: 31 Oct 2017 23:51 by Ozzyrob.
Please Log in or Create an account to join the conversation.
Time to create page: 0.067 seconds