Excel Multithreading running slower with more cores.

smartsource

Board Regular
Joined
Dec 4, 2009
Messages
76
Using VMware via vCloud director:
Testing Excel Market Data Feed Processor on various VM configurations:

#1: Single 3Ghz Core 2GB RAM
#2: Dual 3 Ghz 2GB Ram
#3: Quad 3Ghz 4GB Ram
#4: 8 Core 3Ghz 16GB Ram.

All VM's running the same excel app / market feed.
Measuring precision (data cycle processing interval)... Really just the frequency that excel can process new market data.

Our development server is a Xeon Quad 2.4Ghz with 2GB allocated.. no VMware and our processing precision is <10ms.

The VMware environment allocates many more resources but Excel 2010 with multithreading enabled for all cores runs much slower... by a Factor of 5 to 10 compared to dev server. Don't understand why Dual Core VM out performs the quad and 8 core. Was expecting sub 10ms precision... Stumped and looking for suggestions and ideas on how to further tweak performance.

#1: 179 ms
#2: 55.65 ms
#3: 82.8 ms
#4: 94.56ms

excelmtc.png

7TZ0Uccr
 
This is an interesting assessment. It would appear that this issue reaches out into the Windows 7 arena. Perhaps, getting input from these folks would also be helpful.
 
Upvote 0
!) Note that it is not only Windows issue. It is also relevant how VM Ware makes the cores available to Windows.

2) One more issue is if the spreadsheet uses UDFs and if they were written to exploit multiple threads. If not, they might be a bottleneck in the computation plans generated by Excel.

3) Finally, there are known paradoxes of static scheduling (like the one used by Excel if there are no volatile functions), in which the same schedule takes longer to be executed when the number of processors increases -se this article.


4) On my part I can report an experiment we did quite recently on artificial data and an artificial spreadsheet, just to see how the computation scales with the increasing number of cores.

We did it on a single machine with 4 cores and 8 threads.
Each time we did precisely the same computation, changing the number of threads available to Excel (through it own options), from 1 to 8.

I do not have the data at home, but generally:

A) In the range 1-4 the increase of computation speed was essentially linear with the number of cores.

B) In the range 5-8 the increase of computation speed was substantially slower, indicating that additional hardware threads are not as good as additional cores.

For certain we did not encounter a case that with more threads the computation was actually slower.

Best,

J.Ty.
 
Upvote 0
I suspect the issue is specific to VMWare and hypervisor settings. Unfortunately, visibility of these settings are limited to our service provider. If VMware is allocating cores from different physical machines the delay may be related to marshalling. I am obtaining performance increases in non vmware environments adding more cores and ram.

This particular Excel app is set to use all available cores and iterative calcs are disabled. We do use VBA and understand its limits regarding multithreading. VBA provides the iphone style modeless form and scoreboard for stats.

We do use volatile microtimers and a proprietary DDE pump to coerce updates much faster than Excel's 100ms static schedule. We're sustaining 10ms precision on 2500 instruments processing price feeds, order triggers and writing records out to SQL DB.

Most of the issues we are working through are just normal dev to production issues... however, the performance decrease was not expected at all and kind of kills the traditional "throw more hardware at it" band aid.

I think we will test the application on VMWare running on AMD processors to verify or eliminate any XEON front bus contention issue. http://blogs.amd.com/work/2010/03/30/intel-hyper-threading-vs-amd-true-core-scalability/

Appreciate your reply.

!) Note that it is not only Windows issue. It is also relevant how VM Ware makes the cores available to Windows.

2) One more issue is if the spreadsheet uses UDFs and if they were written to exploit multiple threads. If not, they might be a bottleneck in the computation plans generated by Excel.

3) Finally, there are known paradoxes of static scheduling (like the one used by Excel if there are no volatile functions), in which the same schedule takes longer to be executed when the number of processors increases -se this article.


4) On my part I can report an experiment we did quite recently on artificial data and an artificial spreadsheet, just to see how the computation scales with the increasing number of cores.

We did it on a single machine with 4 cores and 8 threads.
Each time we did precisely the same computation, changing the number of threads available to Excel (through it own options), from 1 to 8.

I do not have the data at home, but generally:

A) In the range 1-4 the increase of computation speed was essentially linear with the number of cores.

B) In the range 5-8 the increase of computation speed was substantially slower, indicating that additional hardware threads are not as good as additional cores.

For certain we did not encounter a case that with more threads the computation was actually slower.

Best,

J.Ty.
 
Upvote 0
There is one more point which puzzles me.

In normal circumstances 2 cores can not achieve a speed-up factor of more than 2 against a single core. In your timings it seems that 2 cores are more than 3 times faster than a single one.

This indicates that the timings in the case of 1 core take some additional tasks into account, which are omitted in the test with 2 cores. It is not marshalling, because it should not be necessary when there is only 1 core.

However...

I remind myself watching a long Excel computation on 1 core of a 2-core machine. Suddenly Windows moved the computation to the other core - perhaps in order to balance the temperatures of the cores.

Now, what happens if Windows is running under VM Ware and decides to switch the core? I do not know, but it seems that it even might cause the computation to be transferred to another machine, with all the overhead associated with it.


Best,

J.Ty.
 
Upvote 0
The VM's are also running a trading platform... In this test case IB TWS. This Excel application processes DDE market data via the platform. To be honest, i've never run this on a single core, Just generated the single core VM a few hours later for trouble shooting latency.


There is one more point which puzzles me.

In normal circumstances 2 cores can not achieve a speed-up factor of more than 2 against a single core. In your timings it seems that 2 cores are more than 3 times faster than a single one.

This indicates that the timings in the case of 1 core take some additional tasks into account, which are omitted in the test with 2 cores. It is not marshalling, because it should not be necessary when there is only 1 core.

However...

I remind myself watching a long Excel computation on 1 core of a 2-core machine. Suddenly Windows moved the computation to the other core - perhaps in order to balance the temperatures of the cores.

Now, what happens if Windows is running under VM Ware and decides to switch the core? I do not know, but it seems that it even might cause the computation to be transferred to another machine, with all the overhead associated with it.


Best,

J.Ty.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top