From owner-freebsd-virtualization@FreeBSD.ORG Tue Mar 31 14:29:19 2015 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1449DB35 for ; Tue, 31 Mar 2015 14:29:19 +0000 (UTC) Received: from mail-ob0-x22a.google.com (mail-ob0-x22a.google.com [IPv6:2607:f8b0:4003:c01::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D62BBCB5 for ; Tue, 31 Mar 2015 14:29:18 +0000 (UTC) Received: by obbec2 with SMTP id ec2so28923378obb.3 for ; Tue, 31 Mar 2015 07:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=zX+2ueFI4RyuQZUaNoOy25iFlLB14JtSEZ4vqIPz2Os=; b=imB5QJS1GXwPtxIyuljivhqXJ5eA+ddJ3HA+lXvqpv6hM++MJjkx19WHXtbfNCRYm9 O5Aj6Ly2pIeVuZwYFBZtZw6cc6HmPDZMp/tiG7AQ9NEM6rGuacwLbW028h20CMLeTrt8 EManp1B70Isr4UZYdVT9sz3Np33uNCgD7HRPBWlPbr8pe5BbBRV3oJR7fI4Tlhj2n+Cx F2AEmuF8QTFl8zYRyNhK7Qf56n/Vj8PIE7Hm3MyDgQd+BnvIf8cVYob0zb0O24oxM9zG irSM1oUmPxxuH2D3ISeM+R6kljkXfZB8fD02QPAs7a8rFiyxRflekJE9KtRzEfkyG/LD iKzg== MIME-Version: 1.0 X-Received: by 10.60.73.38 with SMTP id i6mr34039194oev.27.1427812144823; Tue, 31 Mar 2015 07:29:04 -0700 (PDT) Received: by 10.60.82.233 with HTTP; Tue, 31 Mar 2015 07:29:04 -0700 (PDT) Date: Tue, 31 Mar 2015 17:29:04 +0300 Message-ID: Subject: Bhyve: Investigating poor guest performance when host is busy From: Stefan Andritoiu To: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 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: Tue, 31 Mar 2015 14:29:19 -0000 Problem intro: - Started a make -j 20 buildworld on the host to peg the cpus - Started a 2 and 4 vcpu FreeBSD guest and time how long it takes to boot up - Started a 1 vcpu FreeBSD guest and time how long it takes to boot up. It is always much faster than the 2 or 4 vcpus. My suspicion: I suspect that the ULE scheduler makes some bad decisions with scheduling because it is not aware that bhyve threads are actually running vcpus on top of them, and Lock-holder-preemption may occur. The classic way to solve this is with gang scheduling to ensure that all vcpus are running simultaneously. 1. Can anyone tell me what the cause might be? What may be happening? 2. Do you know if there is currently any work in investigation this problem? Or anything related? 3. Is Gang Scheduling or Coscheduling implemented in FreeBSD? 4. Do you know of any other solution to this kind of problem? 5. Can you recommend me any papers/videos/links in anyway related to this? I'm sorry if the question seem vague. But I don't understand the problem so well either and I'm relatively new to FreeBSD