There is two level of control for this :
The OS will distribute threads on cores (vCPU) so if you stop a process, then start another one after the CPU add, you'll be able to have a thred on it yes.
The application code is the one which decide how many threads they are, their priority, etc. If the application is not coded to use all the available CPUs and adapt at runtime, then you'll be limited to that.
So dynamic allocation of CPUs might not be worth it, unless the application checks at runtime the available CPUs, or if you run several process of it.
Dynamically allocation of VCPUs
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Dynamically allocation of VCPUs
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Dynamically allocation of VCPUs
VirtualBox has no concept of jobs. It simulates the hardware that the guest OS runs on. The guest OS cares about such things as tasks and jobs. From VirtualBox's point of view the entire guest OS is one black box job.
Re: Dynamically allocation of VCPUs
noteirak wrote:There is two level of control for this :
The OS will distribute threads on cores (vCPU) so if you stop a process, then start another one after the CPU add, you'll be able to have a thred on it yes.
The application code is the one which decide how many threads they are, their priority, etc. If the application is not coded to use all the available CPUs and adapt at runtime, then you'll be limited to that.
So dynamic allocation of CPUs might not be worth it, unless the application checks at runtime the available CPUs, or if you run several process of it.
Thanks it was very helpful.
Re: Dynamically allocation of VCPUs
would you mind tell me that how does virtual machine allocate VCPUs based on PCPUs? I mean how many VCPUs are dedicated to each PCPUs?noteirak wrote:There is two level of control for this :
The OS will distribute threads on cores (vCPU) so if you stop a process, then start another one after the CPU add, you'll be able to have a thred on it yes.
The application code is the one which decide how many threads they are, their priority, etc. If the application is not coded to use all the available CPUs and adapt at runtime, then you'll be limited to that.
So dynamic allocation of CPUs might not be worth it, unless the application checks at runtime the available CPUs, or if you run several process of it.
Regards.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Dynamically allocation of VCPUs
There is no such thing as vCPU based on pCPU. The Virtual Machine creates one dedicated thread per vCPU configured, the host OS does the rest (pCPU scheduling, etc).
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
Re: Dynamically allocation of VCPUs
I see, So the host is responsible for that.noteirak wrote:There is no such thing as vCPU based on pCPU. The Virtual Machine creates one dedicated thread per vCPU configured, the host OS does the rest (pCPU scheduling, etc).
Thanks for your useful information and share it with me.