AFAIK, cores and threads are indistinguishable from a process perspective, due to the abstraction inside of the Linux kernel and therefore you don't see any indication in tools like top and such. There are things at play that have a much higher impact like e.g. NUMA-locality.The CPU limit parameter limits the maximum usage of the hypervisor's physical cores? or are processor threads also taken into account?
Yes, but that's like setting no limit in this case according to the documentation.If my processor has 4 cores and 4 threads, then theoretically I can put CPU limit =8?
As with hotplugging ... I don't get why I would need to set the limit in the first place, just give the VM less or more resources and scale horizontally.
Setting 16 cores and limiting them to the power of 4 has no benefits for me. Just give the VM 4 of them. It's the same as hotplugging only on another level. Having 16 cores with its increased memory consumption for scheduler, datastructures and such only to limit its power is a total waste of resources to restricting it beforehand. You may temporarily restrict them with the limited, but not in the beginning. In a perfect would, this would be dynamic like with QoS on the network side, yet that is currently not possible and AFAIK also currently not implemented fully in Linux as well. You would also want to have dynamic I/O limitations in place which are IMHO more important. I seldomly see memory or cpu limitions, just I/O.