summaryrefslogtreecommitdiff
path: root/lib/btrfsprogs/btrfsutil/skinny_paths.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-10-19 23:30:06 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2022-12-20 19:58:11 -0700
commit3f027da8ec796e64b28489f8ddcc4e82e3aa595a (patch)
tree8ad490626d113d48ae800bf546112a6db0a16017 /lib/btrfsprogs/btrfsutil/skinny_paths.go
parent7315c38414b3a6840d71f254b7c8192640b41d7c (diff)
skinny paths: Don't have the cache be so big
Diffstat (limited to 'lib/btrfsprogs/btrfsutil/skinny_paths.go')
-rw-r--r--lib/btrfsprogs/btrfsutil/skinny_paths.go6
1 files changed, 4 insertions, 2 deletions
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)
}
}