LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tool to purposely create high cpu usage

Solved!
Go to solution

I would like to demonstrate to that some code is stable and immune to high cpu usage. Is there a LabVIEW tool or vi that can hog a lot of CPU time for testing?  A simple loop with nothing in it is barely noticeable on my CPU Usage graph.

0 Kudos
Message 1 of 4
(3,833 Views)

I assume your PC is a multi-core machine. In which case have you tried throwing down several empty while loops, one for each logical core of your machine?

Kill CPU.png

There are also probably other, better ways of demonstrating limited CPU-bound activity if you can give us some more information of what you are actually doing.

Message 2 of 4
(3,829 Views)
Solution
Accepted by topic author TeraTech

I have 8 core machine and when I place down 8 while loops generating random numbers (no wait), I get 100% CPU usage and PC becomes unusable. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 3 of 4
(3,824 Views)

@TeraTech wrote:

 A simple loop with nothing in it is barely noticeable on my CPU Usage graph.


If there is nothing in the loop producing any output, the compiler might eliminate such loops, especially if debugging is off. Might be worth doing some tests....

Message 4 of 4
(3,788 Views)