diff --git a/pkg/statistics/handle/cache/internal/lfu/lfu_cache.go b/pkg/statistics/handle/cache/internal/lfu/lfu_cache.go index 4a16300e4b8c4..078a76e636a78 100644 --- a/pkg/statistics/handle/cache/internal/lfu/lfu_cache.go +++ b/pkg/statistics/handle/cache/internal/lfu/lfu_cache.go @@ -75,14 +75,14 @@ func NewLFU(totalMemCost int64) (*LFU, error) { } // adjustMemCost adjusts the memory cost according to the total memory cost. -// When the total memory cost is 0, the memory cost is set to half of the total memory. +// When the total memory cost is 0, the memory cost is set to 20% of the total memory. func adjustMemCost(totalMemCost int64) (result int64, err error) { if totalMemCost == 0 { memTotal, err := memory.MemTotal() if err != nil { return 0, err } - return int64(memTotal / 2), nil + return int64(memTotal * 20 / 100), nil } return totalMemCost, nil }