Page 1 of 1

Cap of performance ratio of VM/dual boot setup

Posted: 6. Jun 2017, 20:13
by Lemongrass38
Hi, I am thinking about dual booting Windows 10 with Arch or running it in a VM (Virtualbox). I'm looking for some numeric data that could help me decide and some speed tweaks if there are any.

So far I could come up with a calculation-test (That is mainly a numpy calculation, about 220,000 matrix product calculation and a few times 100,000 condition evaluation. I can give the link to the program but I guess it's irrelevant.). I run the program with the exact same parameters and number of calculations.

The results I got so far:

Windows 10 "clean install" on a computer with 4 GHz processor with 4 GB RAM: 17.5 seconds.
Windows 10 VM on my computer with 4x2,7GHz processor and 8 GB RAM, the VM has 4 GB RAM and 1 virtual CPUs (setting more CPUs decreased performance): 37.5 seconds
Arch Linux (the host OS of the previous VM): 5 seconds.

The ratio that I'm currently investigating is: time(VM)/time(non-VM install) that is currently around 0.47.

My question is: is it possible to get a VM closer to the non-VM install with some trick? Do you know some good resources on this topic? Have I already reached the top of my VM's capabilities?

More info: dinamically allocated virtual hard disk,
Guest additions installed
VT-x/AMD-V is enabled
Nested Paging is enabled.
Video memory: 128 MB (capped).

I wish to use my Windows for simulation purposes that seem to be quite resource intensive. Do you think that I had better do that on a dual boot setup?

Re: Cap of performance ratio of VM/dual boot setup

Posted: 13. Jun 2017, 01:56
by JSA
and 1 virtual CPUs (setting more CPUs decreased performance): 37.5 seconds
That has definitely NOT been my experience.

I give a VM all the cores it can handle, up to the maximum my host can supply.

Windows 10 supports a maximum of two physical CPUs, but the number of logical processors or cores varies based on the processor architecture. A maximum of 32 cores is supported in 32-bit versions of Windows 10, whereas up to 256 cores are supported in the 64-bit versions.

Your chosen bench mark is probably not a good fit for your actual windows experience. It's not clear if the benchmark is coded to multiple threads or not.

Some people have the mistake impression that a core allocated to a VM is not available to the host, and vise versa. That's not exactly true. In fact its not even approximately true. If the VM can busy up 4 cores that doesn't mean the host can not also use those same 4 cores while the vm is waiting on I/O.

Re: Cap of performance ratio of VM/dual boot setup

Posted: 13. Jun 2017, 02:54
by socratis
JSA wrote:Windows 10 supports a maximum of two physical CPUs, but the number of logical processors or cores varies based on the processor architecture.
Actually a core (physical processor) is one thing and a logical processor is another:
http://ark.intel.com wrote:
  • A Core is a hardware term that describes the number of independent central processing units in a single computing component (die or chip).
  • A Thread, or thread of execution (or logical CPU), is a software term for the basic ordered sequence of instructions that can be passed through or processed by a single CPU core.
When you talk about Win10 supporting "a maximum of two physical CPUs", I believe you mean "sockets" or "chips" according to a small article that does a pretty good job of explaining the terminology:
What is the difference between a processor, a chip, a socket, and a core? wrote:Cores
Recent developments in computational architecture can lead to confusion concerning what a microprocessor is. Since the advent of multi-core technology, such as dual-cores and quad-cores, the term "processor" has been used to describe a logical execution unit or a physical chip. A multi-core chip may have several cores. With the advent of multi-core technology, the term "processor" has become context-sensitive, and is largely ambiguous when describing large multi-core systems. Essentially a core comprises a logical execution unit containing an L1 cache and functional units. Cores are able to independently execute programs or threads. Supercomputers are listed as having thousands of cores.

Chips
A chip refers to a physical integrated circuit (IC) on a computer. A chip in the context of this document refers to an execution unit that can be single- or multi-core technology.

Sockets
The socket refers to a physical connector on a computer motherboard that accepts a single physical chip. Many motherboards can have multiple sockets that can in turn accept multi-core chips.

Hyper-threading
Hyper-threading is an Intel technology that originally preceded multi-core systems, and was used to make a single core appear logically as multiple cores on the same chip.

Processor
As explained above, a processor could describe either a single execution core or a single physical multi-core chip. The context of use will define the meaning of the term.
JSA wrote:Some people have the mistake impression that a core allocated to a VM is not available to the host, and vise versa.
If you are talking about exclusive access, that would be correct. It's not exclusive. The CPUs can be shared. It's only when the guest runs under stress that it will leave the host starving, which may lead to instabilities of all sorts, that's why it's recommended to leave at least one physical processor available for the host.