10-01-2007 01:34 PM
10-01-2007 02:54 PM
Hello,
I just found this:
http://zone.ni.com/devzone/cda/tut/p/id/6449
4CUCQEAR — Slower Execution Time When Manipulating Arrays Than In Previous LabVIEW Versions
4DOC349I — Performance Decrease When Calling XControl Properties and Methods
I do not use XControls, but I do read all of my 4 16 channel DI-301 Input Cards in a While Loop by reading "all" inputs and then wiring them to Shift Register at the Edge of the Loop. Upon request, a cached channel is read by indexing the 16 Byte large Array using the "Index Array" VI.
I do not know if this qualifies as "Manipulating Arrays". This is done at "Very High" Priority and may explain why I get a 30 % performance hit on LV 8.5 there. It is still very bad for us though: There is nothing we can do about it !
However, it does NOT explain why the Normal Priority Thread also get a 30% Performance Hit: There is no "Array Manipulation" there whatsoever !
Geir Ove
10-01-2007 04:41 PM
Hello,
Yet another comment: On LV 8.5 the CPU Load is the same whether I run my Top Level VI from the Project Explorer or create an Executable and download to the cFP.
This is also strange, since on LV 8.2, an .rtexe is always a bit faster (debugging turned off) than running the Top Level VI !
What is causing all this ?
10-02-2007 07:05 AM
Hello,
I haven't seen it reported before but one thing that has changed between 8.2 and 8.5 is the underlying architecture of shared variables. If you use 8.5 on your host and 8.2 on your target it will exchange data between host and target using the old architecture based on UDP while if both the target and the host are 8.5 they would make use of the new architecture based on TCP/IP. Not sure if that could explain the performance hit you are currently seeing.
10-02-2007 09:00 AM
Hello,
Thanks for answerring. I do not think what you suggest is the problem. On LV 8.2, the receiver of the Shared Variables (the PC Program) do not even need to be running: I still get the same low 65 % CPU Load.
Also, when testing with LV 8.5, I ran the Program that received the data over Shared Variables on LV 8.5 as well.
Also, the "Very High" Proirity Threads are only writing data to Single Process Shared variables that are read in "Normal" Priority thread Thus it is a communication internal to cFP Program.
However, if the efficieny of the Shared Variables has detoriated in LV 8.5, this will certainly give a performance Hit in both the "Normal" Priority and the "Very High" Proirity Threads !
This is a Show Stopper for us, and I guess we all do not want to see that performance goes down, so I hope NI can take a look at this !
Is there a way to configure the the Shared Variables to use UDP again on 8.5? If so, I could try this !
10-02-2007 11:05 AM
Hello,
I have reproduced the problem in a minimalistic test application !
Download the test from this link: http://objective.no/gostemp/lv_8_5_probleml.zip
This is how the test looks: http://objective.no/gostemp/LV-8-2_8_5_Test_01_vi.jpg
The ZIP file contains the following files:
a) LV-8-2_8_5_Test_01.vi - The test VI itself
b) SK1_Host_Remote_Panel_Shared_Variables.lvlib - The Network Shared Variables that I use only one of in this test (SK1_Error_Code)
c) Interprosess_Data.lvlib - The Single Process Shared variables that I use only one of in this test (Reported_Error_Code)
I have not included a Project File and you need a Compact FieldPoint to test this. I have a cFP 2120.
Now to the intersting figures:
Compiled under LabView 8.2 this application runs with 21 % CPU Load as measured by the System Manager on the cFP 2120.
Compiled under LabView 8.5 this application runs with 42 % CPU Load as measured by the System Manager on the cFP 2120.
This is a dramatic degradation of Performance !
I have not yet investigated if removing the Shared Variables will change this.
NI: Please Help locating this problem !
The only thought I have is this: Does LV 8.5 take care of the change of the Shared variables when the two .vlib libraries are moved to a 8,5 project ?
10-02-2007 12:19 PM
Hello,
Test update:
I have run the test application above with and without the Shared Variables, and LV 8.5 is much slower even without the Shared Variables. Here are the figures:
Compiled under LabView 8.2 test application without Shared Variables runs with 15 % CPU Load as measured by the System Manager on the cFP 2120.
Compiled under LabView 8.5 test application without Shared Variables runs with 25 % CPU Load as measured by the System Manager on the cFP 2120.
I also tried to use the In Place Structure around the Array Indexing under LV 8.5, but it did not make any difference.
Seems like there is a fundamental performance problem with RT (ETS) running under LabView 8.5.
10-03-2007 01:31 AM
Hello,
I will see if I can reproduce it on another ETS based controller (removing FieldPoint calls) since I don't have access to a cFP 2120 controller. If I see a performance hit when running the code using 8.5 compared to 8.2 then we know that it is due to the new RT version. If not it might be a combination of the FieldPoint driver and the new version of LV RT. I will get back with results later on but I am currently teaching a course so I might not be able to do it until tomorrow.
10-03-2007 02:20 AM
Thanks Jimmie ,
If the problems cannot be reproduced on another ETS based system, I assume you forward the problem to someone that does have a cFP system.
Geir Ove
10-08-2007 04:56 AM
Ok,
I finally had some time to test it myself on a less powerful target (cFP-2020):
I had one timed loop reading data from an analog input module where the timed loop ran with an iteration time set to 500 ms.
I had another loop (while loop) set to run with 750 ms loop rate.
Between these loops I used RT-FIFO’s in order to perform my inter-process communication and then I used network published shared variables to exchange data to the host back and forth.
The results when using the System Manager or the VI method to get an estimate of the CPU usage was exactly the same on both targets. Around 75% on the normal loops and the rest spent in high priority loops. Blue color was barely visible.
I will need someone test it on a more powerful target and see if they can reproduce the issue you see where the CPU workload differs in different versions of LabVIEW RT: