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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Performance issues - CVI 2010

Hi all,

 

I have code I've compiled on a development machine - XP Pro with SP3 - and I'm seeing some performance issues on a similarly configured test machine.  2GB Ram, Pentium 4 CPU 2.8GHz.  I had our IT person clean off another machine for me to use exclusively for testing (the other machine is our Tester's PC) and he gave me one with an Intel Core2 4300 @ 1.80 GHz.  My code on my test machine runs like a top with NO problems. 

 

We have another PC running Win7 on an Intel Core i5-2400 @ 3.10 GHz, RAM = 4GB.  The code should be screaming on this machine but we're seeing performance problems here, too, that I believe may be due to the OS - Win7 may be a real hog.

 

Can anyone make sense of this?  Is the dual core that much better even though that CPU is rated lower in PassMark Bench Ratings (http://www.cpubenchmark.net/cpu_list.php).  We're trying to work all this out so we can advise the customer on which machine he needs to run our software.

 

Thanks,

 

Judy

0 Kudos
Message 1 of 10
(4,222 Views)

PS.  We have only seen these performance issues since we had to include the entire RunTime Engine in our builds.  Before that, our software ran fine on my tester's machine.

 

Judy

0 Kudos
Message 2 of 10
(4,221 Views)

Hi Judy,

 

So if I understand correctly there are 3 machines:

1. Win XP SP3 (2 GB Ram and Intel Pentium 4 cpu)

2. Unknown OS (Unknown Ram and Intel Core2)

3. Win 7 (4GB Ram and Intel Core i5)

 

On which machines did you run deployments and on which machines did you run the application from the full development environment?

 

Also exactly what is the performance problem that you are seeing?


Milan
0 Kudos
Message 3 of 10
(4,204 Views)

Hi Milan,

 

I am attaching an excel spread sheet listing three test machines and one dev machine with their configurations.  Two of the test machines show seriously slow performance and on the last one, my software runs like a top.  I also see no problems as I am developing.

 

I have the CVI Profiler tool and we're running that now on all three test machines.  Will update you when I know something.

 

Thanks,

 

Judy

0 Kudos
Message 4 of 10
(4,185 Views)

...and of course I forgot to upload the excel file... Here it is.... Judy

 

0 Kudos
Message 5 of 10
(4,177 Views)

Hi Judy,

 

Can you describe exactly what the performance problem you are seeing is?


Milan
0 Kudos
Message 6 of 10
(4,161 Views)

Hi Milan,

 

CellView LITE NE is the name of the software package and apparently it slows down dramatically on the two test machines listed in the excel file.  Drawing and redrawing issues - the system seems to hang for several seconds at a time and freeze completely in some cases, as well as communications problems when commands are sent through the Windows Queue.  We wait for an ack from the device we're connected to and it appears that the communications are timing out, but only on those two computers.  The test machine I am using listed at the far right of the file runs beautifully. 

 

This is why I suspect that we need to find the minimum system requirements for running the software, only I cannot seem to be able to get this information.  How do you usually tell what the proper CPU speed and RAM are for the software that YOU write?

 

Thanks,

 

Judy

0 Kudos
Message 7 of 10
(4,153 Views)

Hi Judy,

Looking at the spreadsheet it seems unlikely that memory or cpu requirements are the root cause of the issue because the second machine in the spreadsheet with poor "performance" has almost twice the CPU clock speed and twice the physical memory of the fourth machine that runs well.

 

It sounds like your application is a fairly complex application that involves both GUI components and instrument I/O so what needs to be done is determine what part of the application is causing the bottleneck. There are many different factors which if not considered properly when developing applications that can cause performance problems such as thread deadlocks, device driver problems with the instruments or other hardware, needing to adjust the sleep policy for GUI events, writing to TDMS files in CVI versions before 2010 SP1, having memory leaks in the application code, etc. There is also a KB called Improving Performance of LabWindows™/CVI Applications that describes some changes which may help improve performance.

 

The overall message is that it is not only CPU speed and quantity of RAM available that can cause performance problems. A way to check the amount of RAM used by an application and CPU Utilization is to use the Windows 7 Resource Monitor to watch the application. This can be done by running Task Manager (ctrl + shift + esc), selecting the Performance tab and pressing Resource Monitor. This will open the Resource Monitor window where you can check CPU usage, Memory, Disk and Network usage for the application while it is running.


Milan
0 Kudos
Message 8 of 10
(4,127 Views)

Hi Milan,

 

After much digging and trial and error we found two things going on:

 

1.  I have another software built with CVI that uses NI Visa and a few other modules that our typical software packages do not.  When CVI changed its build to the newer run time engine, thebuild for this other software was still bringing in the older rte and other old modules.  I removed these older modules from the build (one was including a LabVIEW dll ???) and we will test as soon as our test staff can to see if that takes some of the glitchy behavior away.

 

2.  Back when this software was first created (about 8 years ago), we had a Comms Library handle all the low level communications.  It works wonderfully and polls the Windows Input Queue for command ACKs and streaming data.  The GUI built atop the Comms Library was also using polling to get information from the Comms Library.  Thus we had two async timers running as fast as we could run them and a lot of wasted function calls.  I replaced the GUI-Comms Lib mechanism with a callback that the GUI registers with the Comms Lib.  The Comms Lib now executes this callback only when proper ACKs and Data items have been received from the device.  This has already made a difference - the profiler shows that CPU usage is WAY down with this method. 

 

I'll keep you posted on the testing...

 

Judy

0 Kudos
Message 9 of 10
(4,065 Views)

Hi judyh,

 

This sounds like some good progress and I am glad that you are already seeing some performance improvements!

Smiley Happy

 


Milan
0 Kudos
Message 10 of 10
(4,033 Views)