• Stars
    star
    157
  • Rank 238,399 (Top 5 %)
  • Language
    Python
  • License
    BSD 2-Clause "Sim...
  • Created almost 3 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ioztat is a storage load analysis tool for OpenZFS. It provides iostat-like statistics at an individual dataset/zvol level.

ioztat

ioztat is a storage load analysis tool for OpenZFS. It provides iostat-like statistics at an individual dataset/zvol level, complementing the pool/vdev level statistics offered by zpool iostat.

The statistics offered are per-second or per-interval read/write operations and throughput, plus optional average operation size and ZFS file unlink queue depths.

Viewing these statistics at the individual dataset level allows system administrators to identify storage "hot spots" in larger multi-tenant systems — particularly those with many VMs or containers operating essentially independent workloads.

This sample output shows activity which has taken place in the most recent second, on the ssd zpool of a ZFS virtualization host, with extended statistics showing the average I/O size:

root@redacted-prod0:~# ioztat -yx ssd
                   operations    throughput      opsize
dataset            read  write   read  write   read  write
----------------  -----  -----  -----  -----  -----  -----
ssd                   0      0      0      0      0      0
  images              0      0      0      0      0      0
    DC1               4     18  49.0K  98.0K  12.5K  5.56K
    DC2               0     22      0   137K      0  6.36K
    QB                0      2      0  9.80K      0  5.00K
    SAP-TC            0      3      0  19.6K      0  6.67K
    SAP4-WIN2019      0      3      0  49.0K      0  16.7K
    nagios            0      0      0      0      0      0
    qemu              0      0      0      0      0      0
      autostart       0      0      0      0      0      0
  iso                 0      0      0      0      0      0
  unsnapped           0      0      0      0      0      0
    rp9               0      0      0      0      0      0

Usage

ioztat behaves similarly to standard Unix iostat tools and the ZFS zpool iostat command:

usage: ioztat [-c COUNT] [-D] [-e] [-H] [-h] [-I] [-i INTERVAL] [-N] [-n] [-o]
              [-P | -p] [-S]
              [-s {name,operations,reads,writes,throughput,nread,nwritten}]
              [-T {u,d}] [-V] [-x] [-y] [-z]
              [dataset [dataset ...]] [interval [count]]

iostat for ZFS datasets

positional arguments:
  dataset               ZFS dataset
  interval [count]      seconds between reports and number of reports

optional arguments:
  -c COUNT              number of reports generated
  -D                    display size in decimal powers of 1000 instead of 1024
  -e                    display exact values without truncation or scaling
  -H                    scripted mode, omit headers and tab-separate fields
  -h, --help            display this help message and exit
  -I                    display totals since the last report rather than
                        averaged per-second
  -i INTERVAL           interval between reports in seconds
  -N                    display headers at most once
  -n                    omit child datasets when filtering
  -o                    overwrite old reports in terminal
  -P                    display dataset names on a single line
  -p                    display dataset names as an abbreviated tree
  -S                    include statistics for child datasets in parents
  -s {name,operations,reads,writes,throughput,nread,nwritten}
                        sort by the specified field
  -T {u,d}              prefix reports with a Unix timestamp or formatted date
  -V, --version         display version number and exit
  -x                    display extended statistics: once for average I/O
                        size, twice for unlink queue
  -y                    omit the initial "summary" report
  -z                    omit datasets with zero activity

Without arguments, ioztat prints a summary of activity for each mounted dataset since the most recent system boot and exits. This initial summary can be skipped with the -y flag.

With an optional interval, ioztat will repeat reports on that schedule until interrupted, or up to a specified count. If only a count is specified, the interval defaults to one second. Interval and count can be specified with -i and -c or as positional arguments at the very end of the argument list.

The -o flag will overwrite prior output and limit the display to the terminal height. This can be combined with an interval and sorting options for an iotop-like experience.

Examples

ioztat -z 5

Display statistics for every dataset with activity, giving per-second averages over 5 second intervals.

ioztat -ozs operations 5

As above, but order output by read/write operations and overwrite previous reports.

ioztat -I

Display sum totals of dataset activity since boot.

ioztat -SIn rpool/USERDATA

As above, but only display rpool/USERDATA, and combine statistics for any child datasets with it.

Requirements

  • Python 3.7 or later
  • Linux with OpenZFS 0.8 or later
  • FreeBSD 12.2 or later (available in ports as sysutils/py-ioztat)

More Repositories

1

sanoid

These are policy-driven snapshot management and replication tools which use OpenZFS for underlying next-gen storage. (Btrfs support plans are shelved unless and until btrfs becomes reliable.)
Perl
3,102
star
2

network-testing

This is a small collection of GPLv3-licensed tools to assist an intrepid researcher in testing the performance of networks, wired or wireless.
Perl
201
star
3

homebrew-router

Configs necessary for a simple home/office router running on Ubuntu
Shell
37
star
4

wg-admin

Simple CLI utilities to manage a WireGuard server
Perl
17
star
5

perlpv

A proof-of-concept pipe viewer similar to Andrew Wood's pv—but written in perl, for eventual use internally in syncoid.
Perl
7
star
6

blindanalysis

A simple tool to enable blinded analysis of images (or other files) in a lab setting.
Perl
7
star
7

zfsync

DEPRECATED: zfsync has been replaced entirely by syncoid, from the Sanoid repository.
6
star
8

mysqlbak

CLI tool to dump all mysql dbs on a local or remote host to one gzipped file per database.
Perl
6
star
9

0-to-bhyve

Quick start to getting Bhyve virtualization running on a new FreeBSD system
Shell
5
star
10

fio-test-scaffolding

Perl
5
star
11

nebula-sample-configs

Simple example config files for Slack Nebula mesh VPN
4
star
12

create-vpn-creds

Automatically and quietly create OpenVPN credentials, and generate configs for client use.
Shell
3
star
13

btrfs-testing

scriptable tests of reliability / performance of btrfs
Perl
2
star
14

OpenInvoice

1
star
15

filefuzz

Filefuzz rots data in files to order. For use in testing the impact of bitrot on data.
Perl
1
star
16

ZBM-notes

1
star