Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Biggest hurdle in using zfs is that it consumes a huge amount of ram and uses considerable CPU cycles when compared with xfs or ext4. It's like running a massive MySQL server on top of another MySQL server if ever that was possible. Follow Reddit datahorders subreddit people speak all the time about how powerful freenas machine must be just to give decent transfer speeds over samba. Yes freenas will run without lot of CPU speed and ram but performance will suffer greatly.


ZFS uses lot of RAM only if you enable deduplication (and once you enable it, you cannot disable it). Without it, the RAM and CPU time requirements are very modest.


Minor correction: you can disable it, but this doesn't change the status of the data already deduped. This is in fact true also when you enable it: current data is unaffected by the change, you need to move/copy it.

The biggest issue is that there is no official tool to have a list of files that are currently deduped (I had to write a script that parse the output of zdb) so if you're not sure you have to move all the data out of the dataset.


That’s not at all correct, without deduplication enabled I have observed massive memory usage across BSD, Linux and ZFS on macOS.


That's the ARC. The ARC max size will default to (at least on FreeBSD) total ram -1GB[1]. Because the ARC is read cache it will shrink if the system needs more memory. Unused ram is wasted ram.

[1]https://www.freebsd.org/doc/handbook/zfs-advanced.html


That's probably the ARC, the in-memory caching structure, which gives up memory when applications need it. The weird thing on Linux (and maybe the others) is that the kernel marks the memory as "used" and not "cache", so tools like top/htop show high memory usage, even though ZFS will shrink its ARC when any actual applications require it.


I don't know about that. Essentially there's this range from "use a lot of storage" to "use a lot of computing power". Most traditional file systems use a lot of storage and that's that. ZFS let's you pick a point on the scale it will operate at.


We use ZFS at work. ZFS wants enough memory to be happy. One learns usually learns how much memory is too little by not giving it enough memory. Basically ZFS is great if you want the benefits of ZFS, and are willing to deal with the tradeoffs.


What do you mean by trade-offs? My experience with it has been pretty much all upside.


[flagged]


> Even if it didn’t you act like ram is expensive. Everyone that complains it takes too much ram needs to get a job. Seriously ram is cheap it’s not 1970.

Could you explain how this rant or my job helps the amount of RAM on my phone or Raspberry Pi? Have you also ever considered that not everyone is from a first world country, able to afford the latest and greatest device with crazy amounts of RAM?

What you say is true for x86-64 desktops and servers in the first world. For everyone else, amount of RAM matters. And its you with the ostrich politics who has to stop. A quick glance at [1] suggests that, yes, you can run FreeBSD ZFS (OP was on about FreeNAS) but not without hassle.

[1] https://wiki.freebsd.org/ZFSTuningGuide


I've run a 6TB pool (6x disks across 2x raidz2) on 2 GB RAM for several years. This was on desktop hardware. In fact it wasn't even an Intel CPU but some crappy AMD thing.

Initially I ran Nexenta, then OpenSolaris before finally switching to FreeBSD. Network shares via Samba as well. I didn't have any performance issues for day to day stuff. Scrubs used to take a while, as did resilvering whenever I had to replace dead drives. But normal day to day operations worked fine.

It was only around 5 years ago when I finally switched up to the Xeon with 32GB RAM machine I have now.

Also FreeNAS is based on FreeBSD.


[flagged]


Agreed, horrible idea for the time being, but you made it seem as if ZFS could run on these low resource systems.

There are certain features in ZFS which I'd love to run on embedded devices. I even remember Apple toying around with porting ZFS to macOS (back then called OSX or OS X) [1]. We're 10 years later, and only now has Apple rolled out APFS which has CoW and data integrity (yet no TimeMachine support for APFS).

EDIT: to those who commented, was it ECC RAM?

[1] https://en.wikipedia.org/wiki/ZFS#macOS_2


My first ZFS install (almost 10 years ago) was on 512MB of RAM, sometimes including a Gnome 2 desktop. People get the RAM requirement thing out of proportion - yes it helps, because it's caching, and caching helps - and ZFS is a little bit heavier on metadata than other file systems (chiefly because of the checksums), but a lot of the online advice is IMO overly cautious, probably because you're giving advice to some random person on the internet and you have no real idea about how to characterize the workload that their storage system will be exposed to, and probably neither do they.


> Agreed, horrible idea for the time being, but you made it seem as if ZFS could run on these low resource systems.

I've installed ZFS on a machine with only 1GB of ram. Yea that's a lot for an embedded device, But it's not a lot of RAM in the grand scheme of things. Was it fast, no, but it definitely worked.


When we talk about relatively small amounts of RAM its not telling a lot how much RAM the device has but rather how much RAM is devoted to ZFS. Because an Android device on 1 GB RAM is a completely different beast than a FreeNAS devoted to serving files running 1 GB RAM. The same is true for 512 MB, 2 GB, etc.

PS: And was it ECC RAM?


> PS: And was it ECC RAM?

This myth seriously needs to die. ZFS does not care one whit what kind of RAM you use, any more than my other type of filesystem does.

Who puts ECC RAM in a small, low-power, embedded-style system like an RPi? It makes no sense.


> Who puts ECC RAM in a small, low-power, embedded-style system like an RPi? It makes no sense.

Well, you can't put it in a RPi or smartphone or Synology if it isn't there in the first place because its soldered.

But if you build yourself a FreeNAS DIY or if you buy big iron for your company then why not.

You still get other benefits from something like ZFS w/o ECC RAM though (imagine CoW; useful on pretty much any computer), but with less certainty.


Without ECC, you get no less certainty than any other filesystem. It should not factor into discussions of when it is appropriate to use ZFS vs another filesystem.


Less certainty than if you'd have ECC RAM. If you can afford it, and you're using ZFS, you should seriously consider ECC RAM.


You aren’t getting my point. “If you can afford it, you should seriously consider ECC RAM” is the proper advice. ZFS has nothing to do with it.


It makes sense to this degree only, if you DONT use ECC no matter where you are using ZFS you are introducing potential checksum errors in the data path. ECC is not that much more than normal ram. To me it makes no sense to run ZFS even if in some tiny home NAS and leave the data path vulnerable to corruption of any kind. Why bother with ZFS at all if you don’t want complete protection? That’s just bizarre.


No it’s not. I might want instant rollback on large databases on a development machine. Others might want transparent compression and send/receive on a small device. Neither has anything to do with “complete protection” yet both are easy to accomplish with ZFS.

There are a whole slew of reasons to run ZFS outside of mass redundant storage with “complete protection.” The decision to use ECC or not has nothing to do with ZFS. You may as well ask someone who is building an ext4 file server machine whether they “used ECC RAM”; it’s just as relevant.

Yet no one does that for EXT4 and they do it all the time for ZFS, because of one stupid post on the FreeNAS forums that has been roundly debunked a half-dozen times.


This, same reason i don't understand why scaleway don't use ECC RAM on production servers.

It's that important, I've seen corrupt RAM write bad data too many times and I don't even have thousands of servers...


Exactly. But it does work. I’m being down voted by the clueless brigade.


As the other commenter stated, the downvotes are most likely due to the holier than though attitude. It’s ok to be passionate and knowledgeable, but nobody wants to deal with jerks.


Maybe not all because of your points, but rather that HN is allergic to a preachy attitude. Try to stay objective while humble and it will work better.


No, he didn't. Not to me.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: