From 3f027da8ec796e64b28489f8ddcc4e82e3aa595a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 19 Oct 2022 23:30:06 -0600 Subject: skinny paths: Don't have the cache be so big --- lib/btrfsprogs/btrfsutil/skinny_paths.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/btrfsprogs/btrfsutil/skinny_paths.go') diff --git a/lib/btrfsprogs/btrfsutil/skinny_paths.go b/lib/btrfsprogs/btrfsutil/skinny_paths.go index f7d1924..2f71968 100644 --- a/lib/btrfsprogs/btrfsutil/skinny_paths.go +++ b/lib/btrfsprogs/btrfsutil/skinny_paths.go @@ -39,8 +39,10 @@ func (a *SkinnyPathArena) init() { // item, that's about 16M items. But with overhead of the // LRUCache, it's actually a lot higher than that. So then I // cut it to .5M, and that cut my total memory use to ~8GB, - // which is a good number for me. - a.fatItems = containers.NewLRUCache[skinnyItem, btrfstree.TreePathElem](512 * 1024) + // which is a good number for me. Then I tought it to do a + // better job of recovering trees, and so the memory grew, and I + // cut it to 64K. Then to 8K. Then grew it to 128K. + a.fatItems = containers.NewLRUCache[skinnyItem, btrfstree.TreePathElem](128 * 1024) } } -- cgit v1.2.3-2-g168b