Is there something like ZFS's ARC value in BTRFS?

ZFS filesystem has this feature “ARC” where most recently and heavily used data is stored in a reserved space in RAM. That seems pretty nifty. Does BTRFS have something like that?

The linux kernel caches file system data in memory for all file systems.
You can see that in top as the memory used for buff/cache.
That works for btrfs as well.

1 Like

That’s what I thought. Until I saw zfs’ separate cache. Why does zfs have a separate cache then?

Its up to each file system to decide what to cache.
Zfs to just calling out what its doing, that does mean other file systems do not also cache what is important.

Thanks/.

BTRFS uses the LInux kernel’s built-in page cache. ZFS’s ARC serves a similar purpose using a different algorithm.

Short answer, no. The ZFS Adaptive Replacement Cacche uses system memory (up to half available) to store sort of like a cache, but not really.

Supposed to be more robust than kernel cache.

I think it is more robust than the previously used method of grouping write to file IO (storage devices) which relied on the Least Used Page of memory and was subject to the kernel flushing it prior to completion. This approach apparently provides more control of whether it gets flushed prior to file IO completing. It is more a tuning thing, and I cannot find a direct comparable in BTRFS, but that isn’t surprising to me since the file systems are designed differently.