Latency problem after upgrading to Trixie

More
1 month 4 weeks ago #349313 by rodw
"Unexpected realtime delay on task" means that linuxcnc did not get everything done in the allotted 1ms time of the servo thread. This is nothing to do with the LinuxCNC application.

In kernel traces I did a long time ago on an i5 machine with Bookworm, Linuxcnc typically took 200 us to execute the servo thread and sleeps for the remaining 800 us. That 800 us is the safety buffer for real time tasks. Sometimes there is a Linux task that consumes a lot of the  CPU time which impacts on the servo thread and LinuxCNC does not have enough time to get everything done in time. Then the system reports the realtime delay and generally disables linuxcnc (so long since I have experienced this myself I can't remember). There are many possible tasks that can cause this.

One new source I found this week is that if the wifi has poor signal strength, a NetworkManager task fires looking for any stronger wifi signals every 30 seconds or so and causes a latency spike every 34-36 seconds. Because CNC machines are not generally wandering the aisles of a corpporate workspace, its a no brainer (and safe)  to disable this service. Linux obligingly provides an obscure process to do that.... Don't ask me what it is, I've forgotten already.

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

More
1 month 4 weeks ago #349314 by tuxcnc
Code:
void RtapiApp::unexpected_realtime_delay(rtapi_task *task, int nperiod) {     static int printed = 0;     if(!printed)     {         rtapi_print_msg(RTAPI_MSG_ERR,                 "Unexpected realtime delay on task %d with period %ld\n"                 "This Message will only display once per session.\n"                 "Run the Latency Test and resolve before continuing.\n",                 task->id, task->period);         printed = 1;     } }
The code above displays message only once.
This may mean either a serious problem or a one-off event with no impact on further work.
This, in turn, means that this message says nothing, warns against nothing and is unnecessary.
The right thing to do is to run latency-test or latency-plot for a few hours immediately after installation, which will clearly answer the question whether the hardware and software can be used safely.

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

More
1 month 4 weeks ago #349315 by rodw
Where is it called from and what does the code around it do? send a URL into github
I don't think it can simply be  ignored.

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

Time to create page: 0.305 seconds
Powered by Kunena Forum