From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Dual core computer slower than expected

I wrote a really simple benchmark to get a feel for how well some new systems we've bought were performing. I ran it on the following computers:

A - 2.2 Ghz AMD Opteron running Win x64 Pro
(32 bit) LabVIEW v7.1
B - 2.2 Ghz Intel P4 running Windows XP Pro
LabVIEW v7.1.1
C - 2.8 Ghz Intel Pentium D 820 running Windows XP Pro
LabVIEW v7.1.1
D - 2.8 Ghz Intel Pentium D 820 running Windows XP Pro
LabVIEW v7.1.1 (with affinity set to CPU 0 only)

Below are the times I get for the ms timer.

A 1430 ms
B 2480 ms
C 2980 ms
D 1960 ms

Obviously the AMD chip is the clear winner here (especially running 32 bit code on a 64 bit OS), but whats troubling is that the code runs faster on the dual core machine if only one cpu is being used.

Anyone else out there have similar experiences?
0 Kudos
Message 1 of 8
(3,228 Views)
Jay,

I ran your Benchmark on my Dual G5 under Mac OS X with similar results. My system is Dual 2.3 GHz PowerPC, 1GB RAM, Mac OS X 10.4.6, LV 7.1.1 and LV 8.0.1.

Running the benchmarks ten times gave the following results:

LV Processors Mean Std. Dev. Min Max Delta
711 2 2904.4 51.5 2804 2979 175
711 1 1872 64.6 1774 1947 173
801 2 1274.9 55.4 1135 1331 196
801 1 786.6 71.3 734 959 225

It looks as though LV or two different OSes are not very good at sharing processors. LV 8 is about twice as fast as LV 7.1. The single processor standard deviation seems higher under both versions. Whether that means anything or not, I have no idea.

I wonder what would happen if you made the calculation blocks into subVIs. I may try that.

Lynn
0 Kudos
Message 2 of 8
(3,213 Views)
With unsaved subVIs in LV801 (statistics for ten runs):

Processor Mean SD
1 860.6 58.5
1 869.7 55.6
2 683.9 19.1
2 682.8 16.3

So it will take advantage of dual processors for parallel subVIs!

Lynn
Message 3 of 8
(3,211 Views)
1 Cpu AMD XP 2100+
1.3 GB PC 3200
 
t=1996
t=2006
t=2001
 
Just wanted to see how my older computer compared. 
It definately got it's ass beat!
🙂
0 Kudos
Message 4 of 8
(3,209 Views)
I will definitely want to test this on some more realistic applications, but as dual core CPUs become more popular I think many LabVIEW developers are going to wonder why their applications have worse performance on newer hardware.
0 Kudos
Message 5 of 8
(3,199 Views)

Hello

I have tried to make an image analysis program run in parallel in order to take advantage of dual core cpu's. The program runs the analysis both in serial and in parallel and times both cases. On my single core cpu the computation time is the same.

Could you try and run it on your pentium D?

See message:

http://forums.ni.com/ni/board/message?board.id=200&message.id=10838

I hope you can help me, im trying to figure out if it is worth getting a dual core cpu.

Regards,

Simon

0 Kudos
Message 6 of 8
(3,114 Views)
Looks like debugging is the culprit here. If you disable debugging (in the Execution category of the VI properties) on your benchmark VI you should get numbers closer to what you expect. For example, on my hyperthreaded 3.0GHz P4 with LabVIEW 8.0 I get:

Debugging enabled
1 CPU 660
2 CPU 1340

Debugging disabled
1 CPU 600
2 CPU 465

Thanks for pointing this out. In the future we will try to make it so that debugging does not punish you so harshly.

-Kyle
Message 7 of 8
(3,073 Views)
Ahhh,, your times are not a good test of Dual core - because your example code does floating point!. Dual cores share a common FPU.
 
If you rewrite your code to only use ints it will crank!
 
I know this from experience.
 
Jack Hamilton
 
0 Kudos
Message 8 of 8
(3,065 Views)