LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fully utilizing all CPU's for a LabVIEW application

Hi All,
 
Have any of you figured out how to harness all of the CPU's in modern machines?
 
Backgroud:
 
I have an application that does a lot of signal processing and it was pegging the CPU of the machine it was originally deployed on for many minutes.
 
As a quick first step we suggested the customer try the application on a new high-end machine. THey did and the preformance improved ...
 
BUT...
 
When we look at the
 
Task Manager >>> Perfomance tab
 
it appears we are not not utilizing all of the available CPU's.
 
This observation is based on the 8 CPU graphs displayed in the Task Manager.
 
The first 4 graphs show very heavy CPU useage but the reamining four graphs show little or no loads.
 
I am guessing that this may be due to LV (8.X) using a default of 4 threads for each execution system.
 
Since the last time we were on-site, I have looked at
 
...\LabVIEW\vi.lib\utility\sysinfo.llb\threadconfig.vi
 
and it appears all I have to do is run that utility one time and save the config as 8 threads for each execution system.
 
Now before I send someone back to site, I'd like to find out if someone has traveled this road before me and would like to share their wisdom.
 
Thank you,
 
Ben
 
"Mommy, I want to go FAST!" (Daughter of one of my old girl friends)
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 1 of 7
(6,815 Views)
Bumping the threads via the utility will work. We intended to automatically take advantage of the additional processors, but in the meantime, manually bumping the thread count for the priority you are using will work.
 
This was reported to R&D (#41DGI1R0) for further investigation.
 
Roy
Message 2 of 7
(6,761 Views)

WOW!

Thank you Roy!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 7
(6,727 Views)

I received a couple of questions concerning this post, so a bit more information to clear things up.

  • LabVIEW's Logic
    LabVIEW's default thread creation logic is to create the max of (number of cores, 4). The bug we had is that we inadvertently limited this to four (no humorous comments please :)).

  • What does the utility do?
    The utility writes some settings to your ini file if different than default. When you run the utility, it displays the number of processors you have in a field at the top. It displays the number of threads being used for each priority in a section below. For a machine with 1-4 cores, the default thread count will be four. For a machine with 8 cores, the default thread count "should" be 8 (and, as of LabVIEW 8.5, it is).

Roy

Message 4 of 7
(6,220 Views)

Hi,

 

 

I would like to know what happens when you build your application on a PC that has, for example, a dual core CPU and then run it on a 8-core based system that only has the labview run-time. Will it readjust if you include the threadconfig.vi in your application?

 

Thank you,

 Jean-Philippe

0 Kudos
Message 5 of 7
(4,969 Views)

The bug was fixed in 8.5, so if running with that version or later, all is well; LabVIEW will automatically create one thread/core and be positioned to fully utilize the cores, if needed. It does this for the machine it is running on, regardless of where the VIs were developed and last saved.

 

For pre-8.5 applications, you don't need to include threadconfig.vi in your application, you just need to ensure the appropriate ini settings are added to the application's ini file. You can get the ini settings by running the VI, save settings, then look for the ESys.* settings in your LabVIEW.ini file.

 

Roy

Message 6 of 7
(4,914 Views)

Ben wrote:

 

Coal is not evil!
Fracking is not evil!

 

 

Kevin:

 

Back in the day they said smoking was healthy.

Actually good for you.  Helps clears the lungs.

 

Message 7 of 7
(4,344 Views)