diff options
author | Rob Norris <[email protected]> | 2023-06-22 17:46:22 +1000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2024-08-16 12:03:35 -0700 |
commit | cd69ba3d49cdb939cba87e7fd6814608532df92f (patch) | |
tree | 32d51c27ae62b5145e5b9fd99b00930ff3c22f95 /cmd/zed/zed_file.c | |
parent | cbb9ef0a4c8e04358f7d5ddae0eb99d0f703ee21 (diff) |
ddt: dedup log
Adds a log/journal to dedup. At the end of txg, instead of writing the
entry directly to the ZAP, instead its adding to an in-memory tree and
appended to an on-disk object. The on-disk object is only read at
import, to reload the in-memory tree.
Lookups first go the the log tree before going to the ZAP, so
recently-used entries will remain close by in memory. This vastly
reduces overhead from dedup IO, as it will not have to do so many
read/update/write cycles on ZAP leaf nodes.
A flushing facility is added at end of txg, to push logged entries out
to the ZAP. There's actually two separate "logs" (in-memory tree and
on-disk object), one active (recieving updated entries) and one flushing
(writing out to disk). These are swapped (ie flushing begins) based on
memory used by the in-memory log trees and time since we last flushed
something.
The flushing facility monitors the amount of entries coming in and being
flushed out, and calibrates itself to try to flush enough each txg to
keep up with the ingest rate without competing too much with other IO.
Multiple tuneables are provided to control the flushing facility.
All the histograms and stats are update to accomodate the log as a
separate entry store. zdb gains knowledge of how to count them and dump
them. Documentation included!
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Co-authored-by: Allan Jude <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: Klara, Inc.
Sponsored-by: iXsystems, Inc.
Closes #15895
Diffstat (limited to 'cmd/zed/zed_file.c')
0 files changed, 0 insertions, 0 deletions