On Linux, is there a way to take copy-on-write snapshots of a file system (at the FS, block device, or whatever layer), such that if a copy and another copy/the original are concurrently mounted, the disk cache will be shared as well? I'm currently using LVM snapshots for this purpose (to quickly 'fork off' copies of a large database), but since the snapshot looks like 'just another block device' to the system, cache isn't shared, and RAM runs out and performance nosedives much earlier than if it were.


ZFS in conjunction with its ARC behave the way you want it. But the Linux implementation is done in userspace (FUSE) due to licensing concerns and I would not trust a performance-sensitive application with high uptime requirements to FUSE implementations.

There is also BTRFS which is quite similar to ZFS in its concepts so the caching behavior might be similar as well. But its implementation is currently explicitly experimental.

If you are stuck with Linux, you are probably also stuck with your problem's resolution - at least currently.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.