HomeFreeBSD

MFOpenZFS: Introduce read/write kstats per dataset

Description

MFOpenZFS: Introduce read/write kstats per dataset

The following patch introduces a few statistics on reads and writes
grouped by dataset. These statistics are implemented as kstats
(backed by aggregate sums for performance) and can be retrieved by
using the dataset objset ID number. The motivation for this change is
to provide some preliminary analytics on dataset usage/performance.

Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>

openzfs/zfs@a448a2557ec4938ed6944c7766fe0b8e6e5f6456

Also contains parts of:
MFOpenZFS: Connect dataset_kstats for FreeBSD

Example output:
kstat.zfs/mypool.dataset.objset-0x10b.nread: 150528
kstat.zfs/mypool.dataset.objset-0x10b.reads: 48
kstat.zfs/mypool.dataset.objset-0x10b.nwritten: 134217728
kstat.zfs/mypool.dataset.objset-0x10b.writes: 1024
kstat.zfs/mypool.dataset.objset-0x10b.dataset_name: mypool/datasetname

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed by: Sean Eric Fagan <sef@ixsystems.com>
Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>

openzfs/zfs@4547fc4e071ceb1818b3a46c3035b923e06e5390

This is a direct commit to stable/12 because they do not exist in
illumos upstream ZFS and needed to be heavily modified to work in
stable/12

Relnotes: yes
Sponsored by: Klara Inc.

Details

Provenance
allanjudeAuthored on
Parents
rS365688: Add a -C option to netstat to display the congestion control for
Branches
Unknown
Tags
Unknown