mirror_zfs/cmd
Robert Novak bfcbec6f5d
Add block histogram to zdb
The block histogram tracks the changes to psize, lsize and asize
both in the count of the number of blocks (by blocksize) and the
total length of all of the blocks for that blocksize.  It also
keeps a running total of the cumulative size of all of the blocks
up to each size to help determine the size of caching SSDs to be
added to zfs hardware deployments.

The block history counts and lengths are summarized in bins
which are powers of two. Even rows with counts of zero are printed.

This change is accessed by specifying one of two options:

zdb -bbb pool
zdb -Pbbb pool

The first version prints the table in fixed size columns.
The second prints in "parseable" output that can be placed into
a CSV file.

Fixed Column, nicenum output sample:
  block   psize                lsize                asize
   size   Count Length   Cum.  Count Length   Cum.  Count Length   Cum.
    512:  3.50K  1.75M  1.75M  3.43K  1.71M  1.71M  3.41K  1.71M  1.71M
     1K:  3.65K  3.67M  5.43M  3.43K  3.44M  5.15M  3.50K  3.51M  5.22M
     2K:  3.45K  6.92M  12.3M  3.41K  6.83M  12.0M  3.59K  7.26M  12.5M
     4K:  3.44K  13.8M  26.1M  3.43K  13.7M  25.7M  3.49K  14.1M  26.6M
     8K:  3.42K  27.3M  53.5M  3.41K  27.3M  53.0M  3.44K  27.6M  54.2M
    16K:  3.43K  54.9M   108M  3.50K  56.1M   109M  3.42K  54.7M   109M
    32K:  3.44K   110M   219M  3.41K   109M   218M  3.43K   110M   219M
    64K:  3.41K   218M   437M  3.41K   218M   437M  3.44K   221M   439M
   128K:  3.41K   437M   874M  3.70K   474M   911M  3.41K   437M   876M
   256K:  3.41K   874M  1.71G  3.41K   874M  1.74G  3.41K   874M  1.71G
   512K:  3.41K  1.71G  3.41G  3.41K  1.71G  3.45G  3.41K  1.71G  3.42G
     1M:  3.41K  3.41G  6.82G  3.41K  3.41G  6.86G  3.41K  3.41G  6.83G
     2M:      0      0  6.82G      0      0  6.86G      0      0  6.83G
     4M:      0      0  6.82G      0      0  6.86G      0      0  6.83G
     8M:      0      0  6.82G      0      0  6.86G      0      0  6.83G
    16M:      0      0  6.82G      0      0  6.86G      0      0  6.83G

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Robert E. Novak <novak5@llnl.gov>
Closes: #9158 
Closes #10315
2020-06-26 15:09:20 -07:00
..
arc_summary Fixes for make dist 2020-06-26 14:20:02 -07:00
arcstat Fix check for sed --in-place 2020-06-24 18:19:59 -07:00
dbufstat Fix check for sed --in-place 2020-06-24 18:19:59 -07:00
fsck_zfs Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
mount_zfs mount: use the mount syscall directly 2020-05-20 18:02:41 -07:00
raidz_test Mark functions as static 2020-06-18 12:20:38 -07:00
vdev_id Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
zdb Add block histogram to zdb 2020-06-26 15:09:20 -07:00
zed Fixes for make dist 2020-06-26 14:20:02 -07:00
zfs zfs allow/unallow should work with numeric uid/gid 2020-06-19 10:38:43 -07:00
zfs_ids_to_path Mark functions as static 2020-06-18 12:20:38 -07:00
zgenhostid bash scripts: use /usr/bin/env for bash shebangs 2020-02-10 13:13:46 -08:00
zhack File incorrectly zeroed when receiving incremental stream that toggles -L 2020-06-09 10:41:01 -07:00
zinject Mark functions as static 2020-06-18 12:20:38 -07:00
zpool Remove dead code 2020-06-18 12:21:18 -07:00
zstream Fixed LDADD library links in Makefiles for cross compilation builds 2020-05-09 10:17:08 -07:00
zstreamdump Minor zstream redup command fixes 2020-04-10 21:10:09 -07:00
ztest Remove unnecessary terminology from error-injection in ztest 2020-06-22 09:48:36 -07:00
zvol_id OpenZFS restructuring - libspl 2019-10-02 10:39:48 -07:00
zvol_wait zvol_wait should ignore redacted zvols 2019-11-06 10:51:19 -08:00
Makefile.am Small program that converts a dataset id and an object id to a path 2020-05-20 10:05:33 -07:00