ZFS tab: Writes — the RAM write buffer, each pool's write rate, and a landing tier with its mover

Live from arcstats (dirty), dmu_tx (throttled writes), each pool's txgs (bytes synced to disk)
and objset kstats (bytes from programs). A landing tier — a mergerfs pool whose first branch is
fast storage and whose last is a ZFS dataset — is detected from mergerfs's branch xattr; a mover
status file in /run/landing-mover/ adds its queue, the file in flight and totals. Sensors
zfs.write.*, zfs.<pool>.write_bps|logical_bps and zfs.<pool>.landing.* carry the history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-10-25 22:28:40 -07:00
co-authored by Claude Opus 5.5
parent 1a9b31ea0a
commit 86cfcd2bad
9 changed files with 754 additions and 9 deletions
+4 -2
View File
@@ -138,11 +138,13 @@ func (s *Server) zfsOverview(w http.ResponseWriter, r *http.Request) {
// zfsARC is the cache: the sampler's live ARC (size, the hit rate over the last interval)
// beside the storage package's fuller picture (since-boot counters, tunables, and each
// pool's cache/log/special devices or the lack of them).
// pool's cache/log/special devices or the lack of them), and the write path — the dirty
// buffer in RAM, each pool's write rate, and any landing tier in front of a pool.
func (s *Server) zfsARC(w http.ResponseWriter, r *http.Request) {
out := map[string]any{"detail": s.storage.ARC(r.Context()), "live": nil}
out := map[string]any{"detail": s.storage.ARC(r.Context()), "live": nil, "writes": nil}
if smp, ok := s.metrics.Latest(); ok && smp.ARC != nil {
out["live"] = smp.ARC
out["writes"] = smp.ZFSWrite
}
jsonOK(w, 200, out)
}