Ubuntu, btrfs: kbfs.block_cache.disk_max_fraction not working.
- Dominant language
- Go
- Stars
- 9.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
I've got a btrfs RAID1 device on Ubuntu 22.04, with only ~49GiB free.
```
$ sudo btrfs fi show /
Label: none uuid: <...>
Total devices 2 FS bytes used 407.45GiB
devid 1 size 476.92GiB used 428.03GiB path /dev/mapper/luks.root.1
devid 2 size 476.92GiB used 428.03GiB path /dev/mapper/luks.root.2
```
kbfs is using 20G for the cache:
```
$ pwd
/home/user/.local/share/keybase/kbfs_block_cache
$ du -sh .
20G .
```
That's a lot more than 10% of the free space. To try to get some of that back, I:
`keybase config set -f kbfs.block_cache.disk_max_fraction 0.05`
and then restarted keybase, to no effect. Even setting it to 0.01 had no effect. I'm using constrained mode:
```
{
"current_user": "xxxxx",
"kbfs": {
"block_cache": {
"disk_max_fraction": 0.05
},
"mode": "constrained"
},
"mountdir": "/run/user/1000/keybase/kbfs",
"mountdirdefault": "/run/user/1000/keybase/kbfs",
"users": {
"xxxxx": {
<...>
}
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Begin with the kbfs.block_cache.disk_max_fraction configuration path and the kbfs_block_cache directory, reproducing on Ubuntu 22.04 with btrfs RAID1 in constrained mode. Done means the configured fraction is honored after restart and cache usage reflects the setting; check for relevant cache or configuration tests in the codebase.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux, ubuntu
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100