From owner-freebsd-virtualization@freebsd.org Fri Sep 28 14:41:29 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A56510B2852 for ; Fri, 28 Sep 2018 14:41:29 +0000 (UTC) (envelope-from ghislain@ghislain.net) Received: from mail02.aqueos.net (mail02.aqueos.net [94.125.164.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C930375DD6 for ; Fri, 28 Sep 2018 14:41:28 +0000 (UTC) (envelope-from ghislain@ghislain.net) Received: from localhost (localhost [127.0.0.1]) by mail02.aqueos.net (Postfix) with ESMTP id 643B15CE7D1 for ; Fri, 28 Sep 2018 16:41:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail02.aqueos.net Received: from mail02.aqueos.net ([127.0.0.1]) by localhost (mail02.aqueos.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id b-YKKffYkHTr for ; Fri, 28 Sep 2018 16:41:19 +0200 (CEST) Received: from localhost.localdomain (adsl2.aqueos.com [81.56.195.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail02.aqueos.net (Postfix) with ESMTPSA id 79E645CE7D0 for ; Fri, 28 Sep 2018 16:41:19 +0200 (CEST) Subject: Re: New bhyve user To: freebsd-virtualization@freebsd.org References: <2edf93d1-58c2-92bc-48e2-92a493a36e7e@druid.net> <2a95db911caf43afba6408423597533c@SERVER.ad.usd-group.com> From: ghislain Message-ID: <54298eaf-dcc1-fffb-fb01-1519eac7bd72@ghislain.net> Date: Fri, 28 Sep 2018 16:41:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <2a95db911caf43afba6408423597533c@SERVER.ad.usd-group.com> Content-Language: fr-FR Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Sep 2018 14:41:29 -0000 >> In Xen there is a maxvcpus which limit the number of CPUs but they could baloon down if not busy so that other clients who are busy can use the CPUs. In bhyve (at least in vm-bhyve) there is only a cpus line in the config. >Is this a minimum, maximum or is it a hard limit? > This is the number of virtual cpus that the guest will see. Remember that as far as the host is concerned, the guests are processes that are using resources, just like any other program. A guest that is not doing much will not being using much cpu time on the host, and the host will happily run other guests (or system processes) on the same physical cpus. if i understood the other comments on the list on previous thread there is not any mecanism to prioritize guest from other guest and share fairly between them when they share a cpu core.  The freebsd kernel will treat all process equaly. If i am correct the only way to have a fair distribution is to bind guest to a cpu but then you loose the sharing possibility if one is idle. If you let just everyone have the whole cpu access then there is no rule about which guest will have the cpu time as the kernel do not know how to partition the cpu time per guest, only per process.  So if one guest launch a lot of cpu hungry thread it could "starve" the others guests with less thread usgin cpu time. Correct me if i read that wrong :) Ghislain.