Excel calculations in Guest very slow-what am I doing wrong?

Discussions related to using VirtualBox on Windows hosts.
HDF
Posts: 7
Joined: 6. Apr 2014, 14:16

Excel calculations in Guest very slow-what am I doing wrong?

Post by HDF »

I'm a complete novice at VirtualBox, so my problem could be something very basic, but I couldn't find anything in the forum that related to my issue. Here's my story:

I installed VB in order to run MS Excel 64 bit. I can't install it in the Host because Excel 64 has some issues (documented by MS) that don't let it play nice with all of my stuff, so for everyday use I have MS Office 32 bit installed in the host.

I run some very complex spreadsheets, in particular an analysis that runs through several thousand iterations (on the host it will take at least 5 minutes to run). Excel 32 bit uses a maximum of 4 Gb of RAM (regardless of what is installed) while Excel 64 bit will use as much RAM as you give it (or so I understand). Seeing as I have 32 Gb of RAM I figured if I installed a VM and gave it plenty of RAM I would (in theory) be able to run those calculations much more quickly - or at least this is the entire premise behind me installing VirtualBox.

The set up is as follows:

Host
Computer: HP Z220
CPU: i7-3770 @ 3.40Ghz
OS: Windows 7 - 64 (the OS is installed on an SSD drive)
Ram: 32 Gb

Guest
VirtualBox v. 4.3.10 r93012
OS: Windows 8.1 - 64
RAM: 24 Gb of the 32 in the Host
Virtual Hard drive of 100Gb created for its use (this virtual drive and the Guest OS are located on the Host's second HDD which is not an SSD drive).
MS Office: Currently have tried it with Excel 2010. If it works as planned I will then also install Excel 2013.

When I run a test of the program on the Host (Excel 32 bit), it takes 5 minutes to execute fully. When I run it in the virtual machine (Excel 64 with 24 Gb RAM) it takes over 15 minutes. This is clearly not what I was aiming for.

Are my expectations that a virtual machine with the extra RAM should improve performance correct and I have done something wrong in the set up of the VM? Or have I overestimated the potential of what a VM is really supposed to be able to do?

Any help would be greatly appreciated.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Excel calculations in Guest very slow-what am I doing wr

Post by loukingjr »

virtual machines always run slower than a physical machine. not only is the host OS running, but the guest OS is running, plus the code necessary to run the guest OS.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Excel calculations in Guest very slow-what am I doing wr

Post by mpack »

I would look at the guest task list and see where the CPU or I/O hogs are. The usual suspects are resident antivirus, and Windows Update. I also think giving a guest 24GB out of 32GB is a bit excessive. If the guest already has enough RAM then giving it more will not make it go faster, but it may make the host go slower.
HDF
Posts: 7
Joined: 6. Apr 2014, 14:16

Re: Excel calculations in Guest very slow-what am I doing wr

Post by HDF »

loukingjr wrote:virtual machines always run slower than a physical machine. not only is the host OS running, but the guest OS is running, plus the code necessary to run the guest OS.
Thanks.

This is truly disappointing as the only reason I set this up was to try and make use of greater amounts of RAM that otherwise get lost on Excel 32 bit. I thought it was too good to be true that I might be able to have my cake and eat it too.
HDF
Posts: 7
Joined: 6. Apr 2014, 14:16

Re: Excel calculations in Guest very slow-what am I doing wr

Post by HDF »

mpack wrote:I would look at the guest task list and see where the CPU or I/O hogs are. The usual suspects are resident antivirus, and Windows Update. I also think giving a guest 24GB out of 32GB is a bit excessive. If the guest already has enough RAM then giving it more will not make it go faster, but it may make the host go slower.
Thanks for the input. I won't give up just yet and will see if there is anything hogging up the CPU.

As for giving it too much RAM, the tasks on the Host are not very CPU intensive and have more than enough with even 4GB or RAM. Had (should) the VM be able to really work in similar fashion to the Host, then throwing all of the RAM possible at the Excel 64 bit in the Guest would not be excessive (if it actually calculated more quickly).
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Excel calculations in Guest very slow-what am I doing wr

Post by Perryg »

It would help if you provided the guests log file ( as an attachment )
HDF
Posts: 7
Joined: 6. Apr 2014, 14:16

Re: Excel calculations in Guest very slow-what am I doing wr

Post by HDF »

Perryg wrote:It would help if you provided the guests log file ( as an attachment )
I hope I'm doing this right. There are four VBox.log tabs in the Log viewer. Vbox.log, and Vbox.log.1 - 3. I'm guessing the VBox.log one is the correct one. Here it is.

Thanks for any insights you might provide.
Attachments
Win 8.1 (64 bit)-2014-04-06-12-49-14.log
(98.56 KiB) Downloaded 14 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Excel calculations in Guest very slow-what am I doing wr

Post by Perryg »

Try this.

Set the memory at 4GB and the number of processors at 2 and see what the time difference is between host and guest.

It should be faster, but you will never be faster than on the local host. This is the nature of virtualization.
HDF
Posts: 7
Joined: 6. Apr 2014, 14:16

Re: Excel calculations in Guest very slow-what am I doing wr

Post by HDF »

Perryg wrote:Try this.

Set the memory at 4GB and the number of processors at 2 and see what the time difference is between host and guest.

It should be faster, but you will never be faster than on the local host. This is the nature of virtualization.
Thanks, I'll try that to see what the impact is.

However, if it is never going to be faster than the local host, then there's no point in trying to fine tune it. It is only of interest to me if I can improve on the times of the 32-bit host.

If the tweaks you suggest don't do that after I implement them (which you are suggesting they won't), then I guess I'll have to look at setting up a dual boot to the same computer and simply boot in under the 64-bit office version when I need it. Not ideal, but still cheaper than buying a second computer.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Excel calculations in Guest very slow-what am I doing wr

Post by loukingjr »

loukingjr wrote:virtual machines always run slower than a physical machine. not only is the host OS running, but the guest OS is running, plus the code necessary to run the guest OS.
Where have I heard this before? :wink:
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
gg99
Posts: 44
Joined: 19. Sep 2011, 08:27
Primary OS: MS Windows 8
VBox Version: PUEL
Guest OSses: vista, w7, w8.1, w8.1 embedded pro, xp(being phased out)

Re: Excel calculations in Guest very slow-what am I doing wr

Post by gg99 »

have you taken advantage of intel virtual technology by
turning on VT-x EPT VT-d on the host BIOS, and let VB use them?

also the suggestion of 2 core allocation for the guest is good. however if the excel is consuming 100% of the guest and your workbook contains several independent chains of formulas, you may want to try 3 cores unless you need more than 1 core for other tasks you need to run on the host at the same time. Do remember that the first time you run your excel workbook on the vm with excel 2010, it takes extra time to analyze the workbook. subsequent run will be faster

in any case you vm running excel on your workbook may be as fast as 3/4 of the host when you are using only 3 for calc.
Image

if you excel task also uses 3 D graphics, don't forget to enable you rm to use 3-d acceleration

for more detail on optimizing excelhttp://msdn.microsoft.com/en-us/library ... alculation
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Excel calculations in Guest very slow-what am I doing wr

Post by loukingjr »

Since I woke up too early I did a cursory search on the performance of Excel 2010 vs 2013. It seems for many people, Excel 2013 is actually slower than Excel 2010, even running on 64bit hardware. Nothing at all to do with virtualization. Every case is different but I suspect you will not get much a a performance difference for your task and Excel 2010 may be faster.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
HDF
Posts: 7
Joined: 6. Apr 2014, 14:16

Re: Excel calculations in Guest very slow-what am I doing wr

Post by HDF »

gg99 wrote:have you taken advantage of intel virtual technology by
turning on VT-x EPT VT-d on the host BIOS, and let VB use them?

also the suggestion of 2 core allocation for the guest is good. however if the excel is consuming 100% of the guest and your workbook contains several independent chains of formulas, you may want to try 3 cores unless you need more than 1 core for other tasks you need to run on the host at the same time. Do remember that the first time you run your excel workbook on the vm with excel 2010, it takes extra time to analyze the workbook. subsequent run will be faster

in any case you vm running excel on your workbook may be as fast as 3/4 of the host when you are using only 3 for calc.
Image

if you excel task also uses 3 D graphics, don't forget to enable you rm to use 3-d acceleration

for more detail on optimizing excelhttp://msdn.microsoft.com/en-us/library ... alculation
Thanks for the suggestions. The Excel file is already optimized for calculation speed (at least as much as I have time for, short of rewriting the whole thing) and the host does have the hyperthreading turned on.

I tried reducing the number of cores to 3 and that did improve speed a little. Took it down from about 15 min. to 12ish. Still 2.5 times slower than on the 32-bit host. Unless there's some magic workaround I can't see it being possible to reduce the calculation speed below that of the 32-bit host. But I will tweak a few more things and see if something good happens.

Thanks for the help.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Excel calculations in Guest very slow-what am I doing wr

Post by mpack »

Host hyperthreading is not relevant to the VM. Your CPU only has 4 cores total, so I would not give more than 2 to the VM: both host and guest need to perform well to give a good combined performance, and starving the host of CPU is not likely to achieve that.

In fact I would start at 1 core for the guest, and do a speed test to find out what number (to a max of 3) gives the fastest results. Don't simply assume that more cores means better performance.

Finally: I don't understand the talk about being faster than the host. Obviously that was never possible. Both host and guest are running on the same hardware, their speed constraints will be similar, with the VM always being slightly more constrained due to the additional layers of abstraction. If you had a 32bit guest - and it wasn't Windows 8 - then I might have seen some room for doubt.
gg99
Posts: 44
Joined: 19. Sep 2011, 08:27
Primary OS: MS Windows 8
VBox Version: PUEL
Guest OSses: vista, w7, w8.1, w8.1 embedded pro, xp(being phased out)

Re: Excel calculations in Guest very slow-what am I doing wr

Post by gg99 »

one can make vb run faster with virtual assist then without but never as fast as the host.
how much faster? may or may not make significant difference depending on application
Post Reply