Re: VirtualBox, Proxmox, QEMU and CPU Vs vCPUs

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Keith Smith via PLUG-discuss
Date:  
To: Main PLUG discussion list
CC: techlists
Subject: Re: VirtualBox, Proxmox, QEMU and CPU Vs vCPUs
<scroll>

On 2024-07-02 14:04, Ryan Petris via PLUG-discuss wrote:
> I think the option you're looking for is called "affinity":
>
> https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_cpu_resource_limits
>


Yes!!



>> With the affinity option, you can specify the physical CPU cores
>> that are used to run the VM’s vCPUs. Peripheral VM processes, such
>> as those for I/O, are not affected by this setting. Note that the
>> CPU affinity is not a security feature.
>
> That said, I'm wondering why you're wanting to do this, specifically
> what you think you're going to gain over just allowing the kernel to
> schedule things the way it normally does.


>
> For instance, it's not going to lock that core specifically for use to
> that VM; other processes can still use that core. You'd literally have
> to set the affinity of every single process on your system to specific
> cores which would be an extreme pain. You still wouldn't have much
> control over which cores receive interrupts and whatnot so even then
> you still wouldn't have complete control.
>
> Just let the scheduler do its thing, otherwise you're likely going to
> end up with weird issues that no one can help with or explain.
>



I've been doing some VM research here and there for maybe a year. I've
used VirtualBox on and off for years. Tried Proxmox more resent.

During last discussions with the list and some information on the web I
learned that the number of vCPUs can be determined by the following
formula:

Sockets x CPUs X Threads = vCPUs.

One person said a vCPU was like a process.

I have a VPS in a hosting center. It has 2 vCPUs and 5GB of RAM. It
does what I need.

At Digital Ocean they sell resources in vCPUs and GBs of RAM. I think
AWS does the same.

So I have developed the notion that if I can allocate vCPUs I have more
control and can spread my resources further.

Last night I installed VirtualBox on an old laptop that has 2 cores and
4 threads. I recently upgraded the ram to 16GB from 8GB. I use this
box because it runs my video editing software that is windows based. My
daily driver is a 10 year old Dell running Kubuntu. This is the
solution for the next year or so. Windows 10 reaches end of life in
October next year. By that point I hope to have fresh hardware and
might be MS free. That is in part why I asked this question... I am
trying to gather enough information so that when I do spend $2K for my
next solution I will not have buy's remorse.

From this email I am thinking that Virtual Box uses a scheduler to
allocate resources. That would mean that if on my 2 core computer if I
allocate a core to each of two VMs that are both running, the computer
running Win 10 will operate ok while both of my VMs are also functional.
That would be the scheduler that is managing resources and not taking
too much away from the host computer and keeps the VMs operational as
well. I'm a PHP developer so there is not a lot of stress placed on
anyone VM at any given time. The VMs are used for development and
testing.

Now I'm thinking that CPUs on VirtualBox are actually process that are
managed by the scheduler. Am I correct?

Thank you so much for your feedback!!

Keith



> On Tue, Jul 2, 2024, at 1:51 PM, Snyder, Alexander J via PLUG-discuss
> wrote:
>
>> I have a VM running with QEMU on Debian, v is a TrueNAS. Although
>> they give you a GUI to select options, it is my understanding that
>> it's just pure QEMU running on the backend.
>>
>> In this VM, I have vCPUs configured.
>>
>> --
>>
>> Thanks,
>>
>> Alexander
>>
>> Sent from my Google Pixel 7 Pro
>>
>> On Tue, Jul 2, 2024, 13:43 Keith Smith via PLUG-discuss
>> <> wrote:
>>
>>> Hi,
>>>
>>> I've started to skim the Ubuntu docs on QEMU. It talks about
>>> vCPUs.
>>>
>>> I've run both VirtualBox and Proxmox. Seems both VirtualBox and
>>> Proxmox
>>>
>>> only allow for CPU allocation at the CPU level.
>>>
>>> I'd really like to be able allocate vCPUs.
>>>
>>> Do I understand this correctly?
>>>
>>> Thanks!!
>>>
>>> Keith
>>>
>>> ---------------------------------------------------
>>>
>>> PLUG-discuss mailing list:
>>>
>>> To subscribe, unsubscribe, or to change your mail settings:
>>>
>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>
>> ---------------------------------------------------
>>
>> PLUG-discuss mailing list:
>>
>> To subscribe, unsubscribe, or to change your mail settings:
>>
>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
> ---------------------------------------------------
> PLUG-discuss mailing list:
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss

---------------------------------------------------
PLUG-discuss mailing list:
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss