diff --git a/cdc/puller/sorter/backend_pool.go b/cdc/puller/sorter/backend_pool.go index 05d49102086..a6aeed51173 100644 --- a/cdc/puller/sorter/backend_pool.go +++ b/cdc/puller/sorter/backend_pool.go @@ -19,8 +19,6 @@ import ( "os" "path/filepath" "reflect" - "runtime" - "runtime/debug" "sync" "sync/atomic" "time" @@ -133,18 +131,6 @@ func newBackEndPool(dir string, captureAddr string) (*backEndPool, error) { atomic.StoreInt32(&ret.memPressure, int32(memPressure)) } - if memPressure := ret.memoryPressure(); memPressure > 50 { - log.Debug("unified sorter: high memory pressure", zap.Int32("memPressure", memPressure), - zap.Int64("usedBySorter", ret.sorterMemoryUsage())) - // Increase GC frequency to avoid unnecessary OOMs - debug.SetGCPercent(10) - if memPressure > 80 { - runtime.GC() - } - } else { - debug.SetGCPercent(50) - } - // garbage collect temporary files in batches freedCount := 0 for i := range ret.cache {