From owner-freebsd-virtualization@freebsd.org Tue Mar 19 08:06:17 2019 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 1C0BB154597C for ; Tue, 19 Mar 2019 08:06:17 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from kagate.punkt.de (kagate.punkt.de [217.29.33.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8975671336 for ; Tue, 19 Mar 2019 08:06:15 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from hugo10.ka.punkt.de (hugo10.ka.punkt.de [217.29.44.10]) by gate2.intern.punkt.de with ESMTP id x2J86DRB005753; Tue, 19 Mar 2019 09:06:13 +0100 (CET) Received: from [217.29.44.250] ([217.29.44.250]) by hugo10.ka.punkt.de (8.14.2/8.14.2) with ESMTP id x2J86DOM074797; Tue, 19 Mar 2019 09:06:13 +0100 (CET) (envelope-from hausen@punkt.de) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: Re: bhyve and vfs.zfs.arc_max, and zfs tuning for a hypervisor From: "Patrick M. Hausen" In-Reply-To: <20190319024638.GA8193@admin.sibptus.ru> Date: Tue, 19 Mar 2019 09:06:11 +0100 Cc: freebsd-virtualization@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190319024638.GA8193@admin.sibptus.ru> To: Victor Sudakov X-Mailer: Apple Mail (2.3445.100.39) X-Rspamd-Queue-Id: 8975671336 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.971,0] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 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, 19 Mar 2019 08:06:17 -0000 Hi! > Am 19.03.2019 um 03:46 schrieb Victor Sudakov : > 1. Does ARC actually cache zfs volumes (not files/datasets)? Yes it does. > 2. If ARC does cache volumes, does this cache make sense on a = hypervisor, > because guest OSes will probably have their own disk cache anyway. IMHO not much, because the guest OS is relying on the fact that when it writes it=E2=80=99s own cached data out to =E2=80=9Edisk=E2=80=9C, it = will be committed to stable storage. > 3. Would it make sense to limit vfs.zfs.arc_max to 1/8 or even less of > total RAM, so that most RAM is available to guest machines? Yes if you build your own solution on plain FreeBSD. No if you are = running FreeNAS which already tries to autotune the ARC size according to the memory committed to VMs. > 4. What other zfs tuning measures can you suggest for a bhyve > hypervisor? e.g. zfs set sync=3Dalways zfs/vm if zfs/vm is the dataset under which you create the ZVOLs for your = emulated disks. I=E2=80=99m using this for all my VM =E2=80=9Edisks=E2=80=9C and have = added a 16 GB SLOG device to my spinning disk pool - seems to work great. This is on a home = system. Our new data centre systems feature all NVME SSDs and no spinning rust. So no need for a separate SLOG. HTH, Patrick --=20 punkt.de GmbH Internet - Dienstleistungen - Beratung Kaiserallee 13a Tel.: 0721 9109-0 Fax: -100 76133 Karlsruhe info@punkt.de http://punkt.de AG Mannheim 108285 Gf: Juergen Egeling