From nobody Fri Jul 15 13:14:26 2022 X-Original-To: fs@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 4LksJx2QwTz4Wdvd for ; Fri, 15 Jul 2022 13:14:41 +0000 (UTC) (envelope-from olevole@olevole.ru) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LksJt6CTKz3shg for ; Fri, 15 Jul 2022 13:14:38 +0000 (UTC) (envelope-from olevole@olevole.ru) Received: by mail-ed1-x536.google.com with SMTP id fd6so6237034edb.5 for ; Fri, 15 Jul 2022 06:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=olevole-ru.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6aJ5DhSAbZ8zSz/+V9qNyD31t9+OsUzVOIe2IallrJ4=; b=1Jkc4h3YC9dRQ8QConN8VvCUO4d4KdxXRzPaW5pt6zlIqQuvktVyF8D4dIDMZ4WHeA nCCZW2i+22Pso4XoH2V5wqYuzGtKg0iE0azG+3w6Ed9AmV9DLA7BBOrcJ6J4Y9gGawzG ZiUTQNGCiNrlflTcffABJkuVzOcLgrCUhoGHCZj9lAJw2MoRW+eF/nqUplLsM192tdVR cP60NYp6m1BxtDclv8/qT3YrWgkMGEjRoVVXgnS5rxI3FkZVkKd49q76s0bU9tXZkju3 coWsc/uY8jlZ1oidOXEzSqYSEmv018Rkxb5gFTeIL8s0dXjppcMFnHZgo0aMSC7zeRsP V/PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6aJ5DhSAbZ8zSz/+V9qNyD31t9+OsUzVOIe2IallrJ4=; b=276/sQp7ftAKZFCj64O6jqqMCVct4kDe6/4RRR5SS1Jc9q7JA1dqzJ6u+zhe/DNreh 9lmNMme6+Dcaw9HH+fMFVj7bK4cSWy/LWhjxHSEcZ0SsaBPpGNObtlKrk4ectvtV+FrQ CMBPM1ZUv2oLe24GvX9fq/mKl5oOsyN2tgaq5PHJ4xG94i/muu/S3Mbt1CBDIxu8E4Hm K94tMpmNXjkDg4I6onSdPQFkCLWLZIOXJOBe8pTqsmF8Yrx/zET0Lp0eng0+S9nW+sA9 G7duxeMiPadTq1wM+r0y/kpneR4E4Pn36tKrf8+SSdAmNBZNox+WpF3N+W4kEDBxHIOd iNXA== X-Gm-Message-State: AJIora+BZuL2I0bFDfvYgm+Kvt3ezwTaawHB77Lko4+oEpibE+8yap4Z VylxGUHCqKPd23to3DDK9Xae2C8RQo99oaypO6xbsLjnwZ3MyRJv94s= X-Google-Smtp-Source: AGRyM1s5fZLcTBgiq/5dxCZeFw40U5s5eGOEwjcqZHQRX+gsimQ88Ad7aFtfyJmLWG3CoExT+CwT4H/uexD2Wlb5fNo= X-Received: by 2002:a05:6402:26c8:b0:43a:c404:a553 with SMTP id x8-20020a05640226c800b0043ac404a553mr19094123edd.53.1657890877314; Fri, 15 Jul 2022 06:14:37 -0700 (PDT) List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 References: <42b403fd492b631ad14e97b7e8a9778f@vvelox.net> In-Reply-To: <42b403fd492b631ad14e97b7e8a9778f@vvelox.net> From: Oleg Ginzburg Date: Fri, 15 Jul 2022 16:14:26 +0300 Message-ID: Subject: Re: ZFS dataset stats To: "Zane C. B-H" Cc: fs@freebsd.org Content-Type: multipart/alternative; boundary="000000000000d1a65b05e3d7cc3c" X-Rspamd-Queue-Id: 4LksJt6CTKz3shg X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=olevole-ru.20210112.gappssmtp.com header.s=20210112 header.b=1Jkc4h3Y; dmarc=none; spf=none (mx1.freebsd.org: domain of olevole@olevole.ru has no SPF policy when checking 2a00:1450:4864:20::536) smtp.mailfrom=olevole@olevole.ru X-Spamd-Result: default: False [-3.29 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.987]; R_DKIM_ALLOW(-0.20)[olevole-ru.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[fs]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::536:from]; DKIM_TRACE(0.00)[olevole-ru.20210112.gappssmtp.com:+]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; PREVIOUSLY_DELIVERED(0.00)[fs@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[olevole.ru]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --000000000000d1a65b05e3d7cc3c Content-Type: text/plain; charset="UTF-8" On Fri, Jul 15, 2022 at 8:05 AM Zane C. B-H wrote: > So was just looking and for some reason nread etc for the ZFS storage > stats. > > Below is a example of a ZFS dataset being used by CBSD to store a raw > disk image, > one that is running currently, but for some reasonn the R/W stats don't > seem actually update. > > 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 > > Is there any way to get ZFS to actually keep these up to date for use > cases > like this? > > Try to switch default ZFS volmode properties in CBSD from 'dev' to 'full' ( defaults: https://github.com/cbsd/cbsd/blob/develop/etc/defaults/zfs.conf ), e.g: cat > ~cbsd/etc/zfs.conf <


=
On Fri, Jul 15, 2022 at 8:05 AM Zane = C. B-H <v.velox@vvelox.net>= wrote:
So was j= ust looking and for some reason nread etc for the ZFS storage
stats.

Below is a example of a ZFS dataset being used by CBSD to store a raw
disk image,
one that is running currently, but for some reasonn the R/W stats don't=
seem actually update.

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

Is there any way to get ZFS to actually keep these up to date for use
cases
like this?


Try to switch default ZFS volmode prop= erties in CBSD from 'dev' to 'full' ( defaults: https://gi= thub.com/cbsd/cbsd/blob/develop/etc/defaults/zfs.conf ), e.g:

cat > ~cbsd/etc/zfs.conf <<EOF
default_ci_zvol_volmode=3D&q= uot;geom"
default_vm_zvol_volmode=3D"geom"
volmode=3D&= quot;geom"
EOF

in this case= , new VMs will be created in a 'geom' mode:

# cbsd bcreate j= name=3Dvm1 vm_os_type=3Dlinux vm_os_profile=3DCentOS-7-x86_64 vm_ram=3D1g v= m_cpus=3D1 runasap=3D1 imgsize=3D10g

# zfs get volmode | grep dskjails/mybbuilder130/dsk1.vhd =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A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0 =C2=A0 volmo= de =C2=A0 default =C2=A0default

if you are using cloud/gold images, = you may have to delete and get them again
--000000000000d1a65b05e3d7cc3c--