I tried to get an answer to this question in the IRB VB channel, I looked at stackexchange, stackoverflow, superuser and other places. The answers are drawing near, but not what I want to know.
This is just a matter of curiosity, not a necessity. I just want to know how everything works. It has nothing to do with an error, upgrade request, or security issue. If you feel that this forum is not the place to get an answer to this question, please contact me in the appropriate place. Thank you (Although itβs hard for everyone to imagine that their own VBox forum may be the wrong place, I did not see the answer to my specific question or place for publication in the corresponding category.) No matter what happens, please do not close my question without at least pointing to the best resource (I hate it when this happens!). Thanks again.
Now the question is: how does the virtual host host driver calculate the total number of virtual processors?
(Please note that I will not answer the answers of people who have not really read the question, or at least ask for more clarification first. I think this is a VERY straightforward question.)
Let me make out the question in order to be as precise and concise as possible than what I really ask. I am curious to know how the VirtualBox HOST software (no matter what part may be) determines the number of VIRTUAL CPUs in the configuration interface, where the user selects how many VCPUs they would like to apply to a particular virtual machine.
What I DO NOT ASK: I do not ask about the miracle of virtualization equipment, etc. at all; I understand multiple cores and multithreading, VTx, etc. I DO NOT ask how much should I use for a particular virtual machine or application. I am not asking for help setting up any particular virtual machine in my question. I am NOT asking anyone to ask me why I need to know - I already told you; I'm just curious. If my specific question doesn't interest you, thatβs fine. Again, this is a simple, straightforward question: how does a VBox reach a number?
What I already know: it is true that, at least in general, the answer is 2x as much as the physical CPU; Well, if so, why 2x and not 3x or some other multiplier? (I know that fractional sums won't work for an odd number of cores or threads, I'm just as generic as I can be.) For example, on my Phenom II X6 VirtualBox provides me with up to 12 VCPUs. If the answer is threads, well, thatβs not possible, since my particular Thuban has no threads (some Thubans do and some don't). However, my Thuban has hyper-transport, but not hyper-threading. Similarly, my old Phenom II X2 will allow the use of 4 VCPUs in Virtualbox.
I already read numerous answers on the sites mentioned above, warning users NOT to use more than one VCPU on the VM, because it adds overhead (first, you have to run IOAPIC, which leads to a performance hit). I also read posts where the question sounds like mine, but they do not ultimately provide an answer to this question.
Is the answer some kind of sigma sum or a logarithmic formula? Is it sophisticated enough to exceed the capabilities of forum formatting? It is hard to imagine why it is so difficult to get an answer to this question, which, it seems to me, will be asked and answered many times. I really want to know why this is usually 2x; why is this a "magic" number. If I read the source code (suppose it's available), will the explanations explain why?
I will greatly appreciate and admire the soul (s) who read and answer this question, and not some other question that is not asked. I also hope that you do not redirect me to the dark and hostile IRC channels; there are some very sociopathic formations in the IRC whose remarks remind me of some flaws in criminal minds. Notice that I said "some" - there are also useful people. It makes no sense to oppose; I just hate going to IRC anymore. If you know that with the help of this useful nickname on the IRC, I am also grateful.
By the way, I looked for answers to this and other questions and read the tips of SO, SE and SU, and I see that some people answer answers that are completely irrelevant. This is the reason why it may seem to me in a harsh tone. This is my first post and I hope that the answer will be more positive than some of my experiences in the IRC.