CPU, Cores, and Threads question

Questions about virtualization software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
wutsinterweb
Level 5
Level 5
Posts: 645
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

CPU, Cores, and Threads question

Post by wutsinterweb » Wed Feb 07, 2018 8:17 pm

When running hypervisors and VMs on systems with processors more than one core or thread, how does it work, visavis this description:

On my laptop I have an older generation i5 dual core with hyperthreading (4 virtual cores is how some would put it, not me, but some). I have 8 GB of RAM.

I know it's not really adequate for a Virtual environment, but when I set 2 "cores" in VB to a Windows 10 VM and 4 GB of RAM, my system drags to a halt. Host OS is LM 18.3 KDE. But if I set it to one core, it's survivable, at least for about a day without rebooting. When setting a 2 core hyperthread system to 2 cores VM, what does that mean as far as virtaul cores and does that have to do with the issue?
I'm just a student, your guidance is appreciated.

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: CPU, Cores, and Threads question

Post by Cosmo. » Thu Feb 08, 2018 7:06 am

You must not assign more cores to a VM than the half of the physical cores in your host. In your case this is one.

User avatar
wutsinterweb
Level 5
Level 5
Posts: 645
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Re: CPU, Cores, and Threads question

Post by wutsinterweb » Thu Feb 08, 2018 8:47 pm

Aha!

May I ask another question:

For my home desktop and my laptop, I was wondering about hypervisors and bare metal. I didn't know about these things until recently and I wonder if it would be better since I am hopepfully going to school in several months, to run a bare metal hypervisor and my two OSs off it it, rather than running Mint and Windows in VB inside it. I will be taking both basic MIS and DEV courses.
I'm just a student, your guidance is appreciated.

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: CPU, Cores, and Threads question

Post by Cosmo. » Fri Feb 09, 2018 6:24 am

I have no answer for this rather general question. You need to try, what works better for you.

User avatar
catweazel
Level 16
Level 16
Posts: 6223
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: CPU, Cores, and Threads question

Post by catweazel » Fri Feb 09, 2018 6:35 am

Cosmo. wrote:
Thu Feb 08, 2018 7:06 am
You must not assign more cores to a VM than the half of the physical cores in your host. In your case this is one.
That might be ok for very low-end equipment but it's not exactly accurate for more modern, higher-end kit. I run a four server farm in VMs and allocate all 16 threads, 4 per server. No lagging in the host. The kernel distributes the load very nicely as threads, and any of the servers may use any core at any time because cores aren't fixed to a particular VM.
Only a life lived for others is a life worthwhile - Albert Einstein

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: CPU, Cores, and Threads question

Post by Cosmo. » Fri Feb 09, 2018 6:51 am

My advice follows the documentation by Oracle. Also you should get a warning in the VM settings dialogue, if you assign too much cores. Note, that the Orcale documentation does not cover the sum of all assigned cores in multiple running VMs, but the cores in one VM.

User avatar
catweazel
Level 16
Level 16
Posts: 6223
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: CPU, Cores, and Threads question

Post by catweazel » Fri Feb 09, 2018 6:57 am

Cosmo. wrote:
Fri Feb 09, 2018 6:51 am
Note, that the Orcale documentation does not cover the sum of all assigned cores in multiple running VMs, but the cores in one VM.
That qualification changes things.

Cheers.
Only a life lived for others is a life worthwhile - Albert Einstein

Post Reply

Return to “Virtualization”