02-04-2020 01:29 AM
Hi,
I have been working on a LabVIEW application to simulate certain parameters and write them to MongoDB on the localhost. The data to be written is huge in number and I have been using For Loops Iteration parallelism for multithreading. When the application is run on the desktop with windows 10 (i5, 4 Logical Processors, 2.6GHz) it utilizes maximum CPU(~95%) and is completely stable.
But when the same application is being run on the Server PC with Windows server 2016(Xeon Silver,40 Logical Processors, 2.6GHz) only 1 Core is being utilized and the total CPU usage is around 5%.
Any suggestions on how to utilize the CPU cores to the fullest?
Jatin Verma
Applications Engineer
AvGarde Systems
Solved! Go to Solution.
02-04-2020 03:15 AM - edited 02-04-2020 03:17 AM
Just a simple question (probably you already handled this), but how are you specifying the parellelism (and less importantly, chunking) with the loop?
As you know, configuring parellelism creates a "P" node under the "N" - this can be wired with a value to specify the number of paralllel processes desired.
If you don't wire this, I believe it will use what you choose when you configure the loop, which will perhaps be the 4 from your Win10 PC (assuming you developed the code there and copied it to the server, perhaps via SCC etc).
You could consider determining this value at runtime if you might use your code on various different computers and you know the time in the loop will be large compared to the time to work out a value for P.
CPU Information node will give you the values you need, although on my workstation I couldn't get above 50% (I suspect hyperthreading effects).
02-04-2020 03:16 AM
I had a discussion with NI a few months ago. Windows Server 2016 is not a supported OS, and it probably will never be...
Have you tried to use two independent parallel loops , e.g. a repeated FFT calculation in one loop and in the other your MongoDB application, if LabVIEW will utilize more than one core?
02-04-2020 03:37 AM
While configuring Iteration Parallesim I have configured the No. of parallel Instances with 64. Also, the P Node is being wired for 40 when the application is run on the server.