From 21838db1a6ebb845833c24a7d0a270629c72e504 Mon Sep 17 00:00:00 2001 From: Wang Yugui Date: Mon, 20 Feb 2023 12:50:23 +0800 Subject: [PATCH] dedup only 64K or bigger For SSD, it is OK to dedup small fragement such as 4K. But we need to keep some performance for HDD too. so there is no need to dedup small fragement such as 4K to have 1 more fragment? --- src/bees-context.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bees-context.cc b/src/bees-context.cc index 83edf30..f797e98 100644 --- a/src/bees-context.cc +++ b/src/bees-context.cc @@ -190,6 +190,9 @@ BeesContext::is_root_ro(uint64_t root) bool BeesContext::dedup(const BeesRangePair &brp_in) { + if(brp_in.first.size() < 1024*64) + return false; + // TOOLONG and NOTE can retroactively fill in the filename details, but LOG can't BEESNOTE("dedup " << brp_in); -- 2.36.2