Hacker News new | ask | show | jobs
by doublepg23 636 days ago
That was always FUD more or less. ZFS uses RAM as its primary cache…like every other filesystem, so it if you have very little RAM for caching the performance will degrade…like every other filesystem.
3 comments

But if you have a single board computer with 1 GB of RAM and several TB of ZFS, will it just be slow, or actually not run? Granted, my use case was abnormal, and I was evaluating in the early days when there were both license and quality concerns with ZFS on Linux. However, my understanding at the time was that it wouldn't actually work to have several TB in a ZFS pool with 1 GB of RAM.

My understanding is that ZFS has its own cache apart from the page cache, and the minimum cache size scales with the storage size. Did I misundertand/is my information outdated?

> will it just be slow

This. I use it on a tiny backup server with only 1 GB of RAM and a 4 TB HDD pool, it's fine. Only one machine backs up to that server at a time, and they do that at network speed (which is admittedly only 100 Mb/s, but it should go somewhat higher if it had faster network). Restore also runs ok.

Thanks for this. I initially went with xfs back when there were license and quality concerns with zfs on Linux before btrfs was a thing, and moved to btrfs after btrfs was created and matured a bit.

These days, I think I would be happier with zfs and one RAID-Z pool across all of the disks instead of individual btrfs partitions or btrfs on RAID 5.

I would think ZFS would suck on a 1GB machine due to likely being a 32 bit machine. If you had a 1GB in a 64 bit rig it should be fine.

ZFS does have its own cache (influenced by being Solaris native) but it’s very fast to evict pages.

> That was always FUD more or less.

To give some context. ZFS support de-duplication, and until fairly recently, the de-duplication data structures had to be resident in memory.

So if you used de-duplication earlier, then yes, you absolutely did need a certain amount of memory per byte stored.

However, there is absolutely no requirement to use de-duplication, and without it the memory requirements are just a small, fairly fixed amount.

It'll store writes in memory until it commits them in a so-called transaction group, so you need to have room for that. But the limits on a transaction group is configurable, so you can lower the defaults.

I don’t think I came across anyone suggesting zfs dedupe without insisting that it was effectively broken except for very specific workloads.
>That was always FUD more or less

Thank you thank you, exactly this! And additionally that cache is compressed. In the day's of 4GB machines ZFS was overkill but today...no problem.