From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

See what is causing CPU usage spikes MyRio

Does anyone know of a way to see the amount of CPU usage from each process running on a MyRio? I am trying to identify what is causing a low frequency spike in CPU usage. 

 

We have an application with two timed loops, each executing at 500 Hz. The rest of the block diagram is in regular while loops with 10-100ms waits in each. We are using both network streams and shared network variables to communicate with a PC host.

 

For some reason, we're seeing a square wave in CPU usage on the 1 minute scale (see screenshot) and nothing in our program runs at this frequency. Any idea what it would be? 

0 Kudos
Message 1 of 4
(925 Views)

If you are passing large amounts of data through the Network Streams or the Network Published Shared Variables, I could see this.  Otherwise, just start disabling loops (Diagram Disable Structure) to narrow it down.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(886 Views)

Ok I've distilled down to just the attached VI. All it has is the CPU read block and a plot, but I'm still seeing CPU spikes. I've attached the VI, a screenshot of the CPU usage graph, and a screenshot of the VI profiler running at the same time. 

 

Could there be any other background processes causing this? Do you think a factory reset would help? 

0 Kudos
Message 3 of 4
(872 Views)

One other note, when the CPU does spike, it is all categorized as "Normal" priority. 

0 Kudos
Message 4 of 4
(871 Views)