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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI running very slow in a new PC

Hello,

 

I recently changed my development PC, and one of my VIs is running much slower in my new PC. This is strange since the new PC is a bit better. In this PC I have an Intel i5 4210M 2.5GHz CPU, 8Gb of RAM and a disk with 7200RPM and 16MB of cache. The PC I was using before had an older intel i5 3210M CPU, 4GB of RAM and a 5400RPM disk.

 

In the current project I'm working I'm monitoring some production lines. I'm using Labview 2013 and the DSC module's OPC server to connect to the PLCs on the production line.

 

In the VI that is slower in the new PC I'm reading about 50 shared variables from the OPC server, I'm registering some data in a MySQL database, datalogging data on the Citadel database and registering alarms. On my older PC each iteration on this VI was taking about 1 second and now is taking more than 10 seconds.

 

I've noticed that when I run that VI the disk usage gets very high (constantly over 90%), but it's strange if the disk is causing this problem since it is better than the one I had on the older PC. The CPU usage is low (arround 5%) and the memory usage stays arround 30-35%.

 

Does anyone have any idea what could be happening? I'm getting very frustrated with this problem since the PC is brand new and I wasn't expecting to have a problem like this.

0 Kudos
Message 1 of 17
(4,650 Views)

Wild guess: Something is different about a file structure or the connections to the database or network and a lot of searching is going on.

 

Lynn

0 Kudos
Message 2 of 17
(4,644 Views)

What is "disk usage"? Are you referring to a wild blinking disk access LED?

If so, it is an indication that the system is "paging" a lot. Can you use Windows Task Manager (or PerfMon) to identify the process which is paging? Is it LabVIEW at all?

 

Also, do you call this VI repeatedly or only a single time?

If calling the VI a second time, is the second run faster? How much?

 

Is it the same LV version (including SP and hotfix)?

Did you try a masscompile?

 

just wondering,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 17
(4,636 Views)

I'm talking about the disk usage on the task manager. The processes that are constantly accessing the disk when I run the VI are MXS Service and Citadel Services.

 

I only call that VI a single time on my project's main VI with an assynchronous call-and-forget call. The VI stays running in background monitoring about 50 shared variables, registers some data on a MySQL database and is registering alarms and datalogging some of those variables on the Citadel database. When I'm not running the VI the disk usage is 0% most of the time.

 

I'm using the same version of labview and the same version of mysql. The application and the mysql database are exactly the same. I've set up the database connection the same way it was on the other PC as well.

 

I didn't try to mass compile. I tried it now and the log didn't gave me any warnings and it continues with the same problem. 

0 Kudos
Message 4 of 17
(4,617 Views)
The problem VI seems to be doing a lot. Can you isolate which specific operation is taking the added time? Another possibility is that there is a race condition. Due to the faster computer two functions that previously didn't interfere are now colliding and taking extra time.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 17
(4,588 Views)

You didn't mention if your new PC also came with a different OS, or you switched from 32-bit to 64-bit.  Are all the versions of programs and drivers the same from the original PC to the new PC?

 

Are your databases local or on the network somewhere?  Can you confirm outside of your code that you can access those databases without trouble?

0 Kudos
Message 6 of 17
(4,578 Views)

I'm on the same track as Matthew:

Is it possible, that you have a different virus-scan software enabled? What about a firewall?

 

And what are you running in parallel to the application? I'm asking as virtual memory is divided between concurrent running applications. I feel it is possible that even your new PC has twice the RAM, the applications have to page a lot more as you running more appications in parallel....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 17
(4,538 Views)

On the other PC I had Windows 7 64-bit installed. On this PC I also installed Windows 7 64-bit, but I had some problems with drivers compatibility, so I had to install Windows 8.1 64-bit. I tried my application with the two different OS versions and the same problem was occurring.

 

Both databases I'm using are local. I don't have any problem accessing and doing some operations on the mysql database through mysql workbench, and the citadel database seems ok on the measurement and automation explorer. As I'm registering the processes that are occurring on the production lines (for that I'm monitoring some triggers that indicate when they start and end) and with the VI running this slow, it's failing to detect when those triggers become active and thus failing to register some data on my mysql database.

 

I didn't installed any antivirus (windows 8.1 has windows defender), and I tried disabling the firewall but it didn't do anything. As for other applications, since this PC is new, I don't have that many installed, the only thing that's usually running along side when I'm working are mysql notifier and google chrome. The other PC was a lot slower in general than this one and since it wansn't mine it had a lot of stuff installed. Only running this VI was a lot faster than this one. I'll also try to see if tomorrow I can borrow that PC again to understand what could be different...

 

Is there any LV tool that I can use to try to understand what is taking longer to execute in that VI? The VI doen't have any errors or warnings.

0 Kudos
Message 8 of 17
(4,517 Views)

You can use the Desktop Execution Trace Toolkit to gather information about the runtime performance of the VI.

 

I hope you are aware that depending on the OS version, NI products might have a limited support:

NI LabVIEW OS Support

 

As you can see there, Windows 8.1 requires you to have LV 2013 SP1 for support.

I haven't found any specific information about LV DSC and Windows 8.1, the best is listed here.

So i find it possible that DSC and Windows 8.1 could create strange behaviour, even though i wouldn't expect it to do.

 

Norbert

 

EDIT: Please use "PerfMon" to log performance counter for the system. Verify if the performance impact is truely created by one of the components you mentioned before. I can imagine that the components are only suffering by an underlaying issue.....

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 17
(4,508 Views)

With windows 7 I was having the same problem. I installed windows 8.1 because since I was having some problems with drivers compatibility on windows 7 and I tought that maybe this problem in the execution speed could also be caused by that. But on windows 8.1 there was only a slight improvement - it took close to 20 seconds to execute now it takes 15 seconds, but still not the performance I was having on the previous PC (arround 1 second).

 

Today I brought both PCs and I'm trying to understand what's different. I've noticed on the windows resource monitor that the write speed on my new PC's disk are lot slower when the VI is running. The disk load goes up to 100% but the write speed seems to be limited to 1MB/s. As for the older PC the disk load stays lower (arround 30-40%) and the write speeds goes up to 5MB/s. I've also ran perfmon but I didn't noticed major differences between when I was running that VI and when I wasn't. I've attached some screenshots from the resource monitor of both PCs. The screenshot that is in portuguese is from the older PC but the fields are in the same positions as in the english version.

 

So I'm thinking that this must be some problem on my disk confgurations something must be limiting my disk speed to 1MB/s. But when I transfer files on the PC it doesn't seem to have that problem. I only noticed it on that VI...

Download All
0 Kudos
Message 10 of 17
(4,457 Views)