Introduce ZFS Read/Write kstats
|Assignee:||Serapheim Dimitropoulos||% Done:|
There are use-cases when we want to look into dataset performance (reads/writes) in ZFS and create high-level tooling for it.
In illumos we already have some of these kstats already in the VFS layer (module:unix - name:vopstats_<fs_id of dataset here>).
That said we want to introduce kstats specific to ZFS for the following reasons:
- The current kstats don't support R/W to ZVOL's as these code paths don't go through VFS.
- The VFS version of these statistics are not surrounded by locks on purpose so performance of this hot paths doesn't take a hit.
That's ok but it also means that the values are not fully accurate. In this new version of kstats we can take advantage of the
aggsum_t counters (already used for ARC related kstats) which would take care of most of that overhead.
- Linux does not have the VFS kstats of illumos in its own VFS layer, and they would have to implement this feature anyway. Thus
it would be nice to have the codebase being consistent among variants.
Also available in: Atom