What is Btrfs's disk space caching?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Lost Civilization
--
Chapters
00:00 What Is Btrfs'S Disk Space Caching?
00:18 Answer 1 Score 7
01:11 Accepted Answer Score 6
01:40 Thank you
--
Full question
https://superuser.com/questions/855506/w...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#btrfs #harddrivecache
#avk47
ANSWER 1
Score 7
Short and to the point:
if enabled, Kernel will have available FS free space block addresses in memory, thus when you create a new file it will immediately start writing data to disk.
More details:
the mount option space_cache
now is the default on recent kernels. It provides better performance, when creating new files or writing new data to disk. Please see link. You can disable it by adding nospace_cache
mount option.
nospace_cache since: 3.2, space_cache=v1 and space_cache=v2 since 4.5, default: space_cache=v1
ACCEPTED ANSWER
Score 6
This space_cache option will be selected while mounting a mount point which has Btrfs file system. This will store the free space cache on the disk to make the caching of a block much faster. Without this, Btrfs has to scan the entire tree every time looking for the free space that can be allocated.