Help me understand vCPU in Qubes

I have been using qubes os for 2 years now, and I know some things about configuring my sys-qubes to the minimal debian templates and limiting their maxmem values.

I was doing some reading on minimal sys-qubes here in the forum, and I noticed that some users also reduce the allocated vCPU to their minimal sys-qubes. See here: Sys-* VMs requirements - #5 by Zrubi

I would like to understand the concept of vCPU better. For a machine of X230 i7-3520M what does it mean assigning a vCPU value to a qube? I remember X230 has 2 cores and 4 threads (correct me if I am wrong). So, what does it mean giving the sys-firewall a vCPU value of 2? Am I giving two threads for use to the sys-firewall? What performance effects does it have if I give it only 1 vCPU?

1 Like

I was reading manpage of qvm-prefs and under vcpu option, it reads: “Number of CPU cores available to VM. Some VM types (eg DispVM) will not work properly with more than one CPU.[…]”

Then, I checked a running dispVM of mine, which is based on whonix-ws-16-dvm and is running Tor Browser. I see it has 2 vCPUs assigned to itself, by default.

So, is this observation conflicting with what is written in qvm-prefs man page?

bump. anyone else to drop some explanations?

The use of the term “cores” may be misleading but is common in such
A physical core is a processing unit within the CPU.
A logical core is when a single core is able to work on 2 or more things
at the same time (simultaneous multi threading). By default SMT is turned
off in Qubes.
A vcpu is a processing unit in software produced by the hypervisor. The
hypervisor, (Xen here), creates vcpu who are allocated to the virtual
machines. You can create vcpus at will and over allocate to your qubes.
All this will do is make the hypervisor work harder. There’s been a
previous discussion of this in the forum.

If you think the documentation is unclear (or wrong) please make
a contribution by providing an alternative. All of Qubes relies on
people like you chipping in, whether to code or documentation.

1 Like

Remember there is a search forum feature.

in the first results:

Unman’s response added another piece of explanation.

To go deeper, you can type xen vcpu in your search engine. :slight_smile: