From owner-freebsd-virtualization@FreeBSD.ORG Thu Mar 26 07:43:59 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 07E6AFD8 for ; Thu, 26 Mar 2015 07:43:59 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5C2CCB4 for ; Thu, 26 Mar 2015 07:43:57 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Yb2S2-0001wA-DN for freebsd-virtualization@freebsd.org; Thu, 26 Mar 2015 08:43:38 +0100 Received: from ip184-189-251-175.sb.sd.cox.net ([184.189.251.175]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Mar 2015 08:43:38 +0100 Received: from madoka by ip184-189-251-175.sb.sd.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Mar 2015 08:43:38 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-virtualization@freebsd.org From: Julian Hsiao Subject: Re: Several bhyve quirks Date: Thu, 26 Mar 2015 00:43:27 -0700 Lines: 35 Message-ID: References: <5512D7E3.9060401@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip184-189-251-175.sb.sd.cox.net User-Agent: Unison/2.1.10 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: Thu, 26 Mar 2015 07:43:59 -0000 On 2015-03-25 15:44:35 +0000, Peter Grehan said: > In 10.1, virtio-blk i/o is done sychronously in the context of the > guest vCPU exit. If it's a single vCPU guest, or the virtio-net > interrupt happens to be delivered to that vCPU, performance will suffer. > > A workaround is to use ahci-hd for the disk emulation and not > virtio-blk. The AHCI emulation does i/o in a dedicated thread and > doesn't block the vCPU thread. Thank you for your explanation and tips, Peter. I just tried changing virtio-blk -> ahci-hd and preliminary results are good. And now you've mentioned it, I do recall seeing slightly less performance degradation on guests with 2 vCPUs vs. ones with just one. I've always assumed virtio driver > emulated driver so it didn't occur to me to try ahci-hd. > The only workaround for 10.1 would be to use ahci-hd instead of > virtio-blk. The correct sector size will be reported there. I haven't had a chance to test this; next time I spin up a guest from scratch I'll try it out. > Try using the -W option to bhyve. This will force the bhyve virtio > code to advertize (non-standard) MSI interrupt capability which OpenBSD > will then use to allocate vectors. Unfortunately -W didn't help. This is not critical, however, and I'll ask around in the OpenBSD mailing list. Thanks again for your help. Julian Hsiao