Hacker News new | ask | show | jobs
by dsr_ 1832 days ago
Neither quantity nor ECC is essential.

ZFS defaults to assuming it is the primary reason for your box to exist, but it only takes two lines to define more reasonable RAM usage: zfs_arc_min and zfs_arc_max. On a NAS type server, I would think setting the max to half of your RAM is reasonable. Maybe 3/4 if you never do anything except storage.

ECC is not recommended because ZFS has some kind of special vulnerability without it; ECC is recommended because ZFS has taken care of all the more likely chances of undetectable corruption, so that's the next step.

1 comments

It is not that simple regarding ECC. Since ZFS uses more memory, the probability of hitting a memory bug is simply higher with it.
But it doesn’t really use more memory. The ARC gives the impression of high memory usage because it’s different than the OS page cache and usually called out explicitly and not ignored in many monitoring tools like the OS cache is. Linux—without ZFS—will happily consume nearly all RAM with any filesystem if enough data is read and written.
This is correct. Any filesystem using the kernel's filesystem cache will do this, too.

For a long running, non-idle system, a good rule of thumb is that all RAM not being actively used is being used by evictable caching.

A colleague who was used to other UNIXes was transitioning to Linux for a database. He saw in free that used was more at more than 90%, so he added more ram. But to his surprise it was still using 90%! He kept adding ram. I told him that he had to subtract the buffer and cached values (this was before free had the Available column).
Before the Available column there was the -/+ buffers/cache line that provided the same information. Maybe it was too confusing.

             total      used      free   shared buffers    cached
      Mem: 12286456  11715372    571084        0   81912   6545228
  -/+ buffers/cache:  5088232   7198224
     Swap: 24571408     54528  24516880
https://www.linuxatemyram.com/ is one of my favorite single-serving sites.