mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add request size histograms (-r) to zpool iostat, minor man page fix
Add -r option to "zpool iostat" to print request size histograms for the leaf
ZIOs. This includes histograms of individual ZIOs ("ind") and aggregate ZIOs
("agg"). These stats can be useful for seeing how well the ZFS IO aggregator
is working.
$ zpool iostat -r
mypool sync_read sync_write async_read async_write scrub
req_size ind agg ind agg ind agg ind agg ind agg
---------- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
512 0 0 0 0 0 0 530 0 0 0
1K 0 0 260 0 0 0 116 246 0 0
2K 0 0 0 0 0 0 0 431 0 0
4K 0 0 0 0 0 0 3 107 0 0
8K 15 0 35 0 0 0 0 6 0 0
16K 0 0 0 0 0 0 0 39 0 0
32K 0 0 0 0 0 0 0 0 0 0
64K 20 0 40 0 0 0 0 0 0 0
128K 0 0 20 0 0 0 0 0 0 0
256K 0 0 0 0 0 0 0 0 0 0
512K 0 0 0 0 0 0 0 0 0 0
1M 0 0 0 0 0 0 0 0 0 0
2M 0 0 0 0 0 0 0 0 0 0
4M 0 0 0 0 0 0 155 19 0 0
8M 0 0 0 0 0 0 0 811 0 0
16M 0 0 0 0 0 0 0 68 0 0
--------------------------------------------------------------------------------
Also rename the stray "-G" in the man page to be "-w" for latency histograms.
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Closes #4659
This commit is contained in:
committed by
Brian Behlendorf
parent
4442f60d8e
commit
7e945072d1
+22
-5
@@ -2784,21 +2784,30 @@ vdev_get_child_stat_ex(vdev_t *cvd, vdev_stat_ex_t *vsx, vdev_stat_ex_t *cvsx)
|
||||
{
|
||||
int t, b;
|
||||
for (t = 0; t < ZIO_TYPES; t++) {
|
||||
for (b = 0; b < VDEV_HISTO_BUCKETS; b++) {
|
||||
for (b = 0; b < ARRAY_SIZE(vsx->vsx_disk_histo[0]); b++)
|
||||
vsx->vsx_disk_histo[t][b] += cvsx->vsx_disk_histo[t][b];
|
||||
|
||||
for (b = 0; b < ARRAY_SIZE(vsx->vsx_total_histo[0]); b++) {
|
||||
vsx->vsx_total_histo[t][b] +=
|
||||
cvsx->vsx_total_histo[t][b];
|
||||
}
|
||||
}
|
||||
|
||||
for (t = 0; t < ZIO_PRIORITY_NUM_QUEUEABLE; t++) {
|
||||
for (b = 0; b < VDEV_HISTO_BUCKETS; b++) {
|
||||
for (b = 0; b < ARRAY_SIZE(vsx->vsx_queue_histo[0]); b++) {
|
||||
vsx->vsx_queue_histo[t][b] +=
|
||||
cvsx->vsx_queue_histo[t][b];
|
||||
}
|
||||
vsx->vsx_active_queue[t] += cvsx->vsx_active_queue[t];
|
||||
vsx->vsx_pend_queue[t] += cvsx->vsx_pend_queue[t];
|
||||
|
||||
for (b = 0; b < ARRAY_SIZE(vsx->vsx_ind_histo[0]); b++)
|
||||
vsx->vsx_ind_histo[t][b] += cvsx->vsx_ind_histo[t][b];
|
||||
|
||||
for (b = 0; b < ARRAY_SIZE(vsx->vsx_agg_histo[0]); b++)
|
||||
vsx->vsx_agg_histo[t][b] += cvsx->vsx_agg_histo[t][b];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2974,13 +2983,21 @@ vdev_stat_update(zio_t *zio, uint64_t psize)
|
||||
vs->vs_ops[type]++;
|
||||
vs->vs_bytes[type] += psize;
|
||||
|
||||
if (flags & ZIO_FLAG_DELEGATED) {
|
||||
vsx->vsx_agg_histo[zio->io_priority]
|
||||
[RQ_HISTO(zio->io_size)]++;
|
||||
} else {
|
||||
vsx->vsx_ind_histo[zio->io_priority]
|
||||
[RQ_HISTO(zio->io_size)]++;
|
||||
}
|
||||
|
||||
if (zio->io_delta && zio->io_delay) {
|
||||
vsx->vsx_queue_histo[zio->io_priority]
|
||||
[HISTO(zio->io_delta - zio->io_delay)]++;
|
||||
[L_HISTO(zio->io_delta - zio->io_delay)]++;
|
||||
vsx->vsx_disk_histo[type]
|
||||
[HISTO(zio->io_delay)]++;
|
||||
[L_HISTO(zio->io_delay)]++;
|
||||
vsx->vsx_total_histo[type]
|
||||
[HISTO(zio->io_delta)]++;
|
||||
[L_HISTO(zio->io_delta)]++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user