Tweak chunking parameters for better block size distribution and dedupe ratio.

This commit is contained in:
Moinak Ghosh 2012-11-08 19:41:33 +05:30
parent e437390e53
commit eacbf207aa

View file

@ -92,7 +92,7 @@ dedupe_min_blksz(int rab_blk_sz)
{
uint32_t min_blk;
min_blk = 1 << (rab_blk_sz + RAB_BLK_MIN_BITS - 1);
min_blk = (1 << (rab_blk_sz + RAB_BLK_MIN_BITS)) - 1024;
return (min_blk);
}
@ -180,7 +180,7 @@ create_dedupe_context(uint64_t chunksize, uint64_t real_chunksize, int rab_blk_s
ctx->fixed_flag = fixed_flag;
ctx->rabin_break_patt = 0;
ctx->rabin_poly_avg_block_size = 1 << (rab_blk_sz + RAB_BLK_MIN_BITS);
ctx->rabin_avg_block_mask = ((ctx->rabin_poly_avg_block_size - 1) >> 1);
ctx->rabin_avg_block_mask = ((ctx->rabin_poly_avg_block_size - 1) >> 2);
ctx->rabin_poly_min_block_size = dedupe_min_blksz(rab_blk_sz);
ctx->delta_flag = 0;