From 0fe91846cd924c3f90907acd3ddcbe14856bee7a Mon Sep 17 00:00:00 2001 From: zenground0 Date: Sat, 4 Mar 2023 09:46:38 -0700 Subject: [PATCH] Plan out moving GC limiting --- blockstore/splitstore/splitstore_gc.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/blockstore/splitstore/splitstore_gc.go b/blockstore/splitstore/splitstore_gc.go index 3b53b8042..c70440cd4 100644 --- a/blockstore/splitstore/splitstore_gc.go +++ b/blockstore/splitstore/splitstore_gc.go @@ -8,6 +8,13 @@ import ( ) func (s *SplitStore) gcHotAfterCompaction() { + // TODO size aware GC + // 1. Add a config value to specify targetted max number of bytes M + // 2. Use measurement of marked hotstore size H (we now have this), actual hostore size T (need to compute this), total move size H + T, approximate purged size P + // 3. Trigger moving GC whenever H + T is within 50 GB of M + // 4. if H + T > M use aggressive online threshold + // 5. Use threshold that covers 3 std devs of vlogs when doing aggresive online. Mean == (H + P) / T, assume normal distribution + // 6. Use threshold that covers 1 or 2 std devs of vlogs when doing regular online GC var opts []bstore.BlockstoreGCOption if s.cfg.HotStoreFullGCFrequency > 0 && s.compactionIndex%int64(s.cfg.HotStoreFullGCFrequency) == 0 { opts = append(opts, bstore.WithFullGC(true))