ARC
also: Adaptive Replacement Cache
Adaptive Replacement Cache (ARC) is an advanced caching algorithm used by ZFS to manage memory for frequently accessed data, balancing between recently used and frequently used cache entries.
ARC is a cache management algorithm that tracks two types of data access patterns: recency (recently accessed) and frequency (frequently accessed). This dual approach allows it to make smarter decisions about which data to keep in fast memory versus slower storage.
ZFS uses ARC to manage its Adaptive Replacement Cache, which sits between RAM and disk storage. When your system reads a file, ZFS stores it in ARC. If you access it again soon, it's served instantly from memory instead of disk. The algorithm learns your access patterns and adapts—if you repeatedly read the same file, it stays cached; if you do a one-time scan of a large file, it doesn't waste cache space.
For example, when you repeatedly compile a large C project, frequently accessed header files stay in ARC for fast recompilation, while temporary build artifacts that are read once get evicted to make room for more useful data.