From nobody Fri Jul 15 05:33:25 2022 X-Original-To: emulation@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Lkg4m59kgz4WwVR for ; Fri, 15 Jul 2022 05:33:28 +0000 (UTC) (envelope-from v.velox@vvelox.net) Received: from vulpes.vvelox.net (vulpes.vvelox.net [98.102.84.2]) by mx1.freebsd.org (Postfix) with ESMTP id 4Lkg4l43p2z3GlC for ; Fri, 15 Jul 2022 05:33:27 +0000 (UTC) (envelope-from v.velox@vvelox.net) Received: from vvelox.net (localhost [127.0.0.1]) (Authenticated sender: kitsune) by vulpes.vvelox.net (Postfix) with ESMTPA id 11DA4F07B3 for ; Fri, 15 Jul 2022 00:33:25 -0500 (CDT) List-Id: Development of Emulators of other operating systems List-Archive: https://lists.freebsd.org/archives/freebsd-emulation List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-emulation@freebsd.org MIME-Version: 1.0 Date: Fri, 15 Jul 2022 00:33:25 -0500 From: "Zane C. B-H" To: emulation@freebsd.org Subject: bhyve, ZFS, and disk IO stats Message-ID: X-Sender: v.velox@vvelox.net Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Lkg4l43p2z3GlC X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of v.velox@vvelox.net designates 98.102.84.2 as permitted sender) smtp.mailfrom=v.velox@vvelox.net X-Spamd-Result: default: False [-3.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; R_SPF_ALLOW(-0.20)[+ip4:98.102.84.2/32]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[emulation]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:10796, ipnet:98.102.80.0/20, country:US]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[vvelox.net]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[emulation@freebsd.org]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N So with bhyve, is there any good way to get disk IO stats for a VM when it is using ZFS for a dataset. Apparently ZFS only tracks RW stats for mounted disks, but not raw disks stored as a ZFS dataset. Below is a running VM, but the stats reported are all zero. kstat.zfs.storage.dataset.objset-0x1d41.nread: 0 kstat.zfs.storage.dataset.objset-0x1d41.reads: 0 kstat.zfs.storage.dataset.objset-0x1d41.nwritten: 0 kstat.zfs.storage.dataset.objset-0x1d41.writes: 0 kstat.zfs.storage.dataset.objset-0x1d41.dataset_name: storage/debian10_test/dsk1.vhd Can't use gstat as ZFS datasets don't show up as GEOM devices it appears. iostat has the same issue. 'zfs get all' for the dataset in question does not return any RW stats. Any one have any thoughts on this?