mirror of
https://github.com/Zygo/bees.git
synced 2025-06-17 01:56:16 +02:00
context: stop creating new refs when there are too many already
LOGICAL_INO_V2 has a maximum limit of 655050 references per extent. Although it no longer has a crippling performance problem, at roughly two seconds to process extent, it's too slow to be useful. When an extent gains an absurd number of references, stop making any more. Returning zero extent refs will make bees believe the extent was deleted, and it will remove the block from the hash table. This helps speed processing of highly duplicated large files like VM images, and the cost of a slightly lower dedupe hit rate. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -92,6 +92,9 @@ const double BEES_TOO_LONG = 5.0;
|
||||
// Avoid any extent where LOGICAL_INO takes this much kernel CPU time
|
||||
const double BEES_TOXIC_SYS_DURATION = 0.1;
|
||||
|
||||
// Maximum number of refs to a single extent
|
||||
const size_t BEES_MAX_EXTENT_REF_COUNT = (16 * 1024 * 1024 / 24) - 1;
|
||||
|
||||
// How long between hash table histograms
|
||||
const double BEES_HASH_TABLE_ANALYZE_INTERVAL = BEES_STATS_INTERVAL;
|
||||
|
||||
|
Reference in New Issue
Block a user