CPU, Cores, and Threads question

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
wutsinterweb
Level 6
Level 6
Posts: 1042
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

CPU, Cores, and Threads question

Post by wutsinterweb »

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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
I've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: CPU, Cores, and Threads question

Post by Cosmo. »

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 6
Level 6
Posts: 1042
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Re: CPU, Cores, and Threads question

Post by wutsinterweb »

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've been using Mint for over 4 years, but I'm still a slow learner. I have a website: https://pickfetish.com. It is dedicated to guitar/instrument picks.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: CPU, Cores, and Threads question

Post by Cosmo. »

I have no answer for this rather general question. You need to try, what works better for you.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: CPU, Cores, and Threads question

Post by catweazel »

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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: CPU, Cores, and Threads question

Post by Cosmo. »

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 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: CPU, Cores, and Threads question

Post by catweazel »

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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Locked

Return to “Virtual Machines”