Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Sep 2018 09:30:56 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>
To:        Jakub Chromy <hicks@cgi.cz>
Cc:        "freebsd-virtua." <freebsd-virtualization@freebsd.org>
Subject:   Re: New bhyve user
Message-ID:  <201809281630.w8SGUuB4078064@pdx.rh.CN85.dnsmgr.net>
In-Reply-To: <60055d7f-c378-7242-5bd5-7f5b60779b61@cgi.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
> >
> > ?So if one guest launch a lot of cpu hungry thread it could "starve" 
> > the others guests with less thread usgin cpu time. 
> 
> As far as what I heard here on this forum, you should NOT overcommit the 
> vCPUs.

You seemed to have heard incorrectly.  There is little to no issues
overcommiting CPU's in bhyve, I have a 2 core, 4 thread system with
6 VM's, each vm using 1 vCPU, this is a 50% overcommit and it my
base line load.

I frequently fire up 2 and 4 core VM's to do real work without
any issues.

Now, you do NOT want to end up in situation where these VM's
are over loading the actually avaliable CPU cycles, what I
am doing works becasue my base line 6 VM's only actually
consume about 1.5 cpus, so I actually do have 2.5 sitting
idle.

What does NOT work well is overcommiting Memory, that kinda
puts you in a real bad state.  I also stronly recommend 
using -S (wire memory) option, this insures you actually
can hard allocate any memory that a VM needs.

> 
> When you keep the number of vCPUs assigned to your vms lower than 
> physical CPUs (= hyperthreaded cores), you should be fine.

It is all a mater of Load, as long as your host load stays
below the number of CPU threads you actually have things
in this aspect tend to work just fine.  And if you do exceed
this everyone slows down in a fairly fair fashion.


-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809281630.w8SGUuB4078064>