New New ZFS on root with Ubuntu 19.10 daily

Threw a bitch fit today because I was doing NOTHING and still consuming almost 8GB of RAM… This was on 18.04

Forgot I installed zfsutils-linux and created a couple of pools :sunglasses:

Carry on lol.

There should be a larger disclaimer about how much RAM that beast of a file system consumes.

Was the RAM being used by the Arc?
Could you not pair it back?

iirc, it only limits to 50% by default, but can be extended or reduced as needed.
And I’m pretty sure it builds it’s tables each boot, rather than storing them for future, but will check that.

So lowering Arc limit, then a reboot and you should gain much RAM back, depending on how much you need

1 Like

Didn’t know this was a thing, I’ll look into it. When I say I was doing nothing™ I did have a few things running, just not 8GB of RAM worth lol. Most of my systems I’ve run with ZFS have used more than average RAM. Something something free RAM is wasted RAM :wink:

Interesting, I’ll definitely look into that. My education on ZFS is slow going because of everything else going on, but I have several bookmarks (physical and digital) and some videos/lectures backlogged.

Like, I booted my machine about 2 hours ago, and it has reserved 8gigs, and limits to 16gigs

1 Like

Fair play.

Zfs will cache writes and stuff, and use RAM for other things, but the ARC is probably the biggest noticable and changeable bit.

arcstat
should show current max (far right) and reservation jest before. add -h for help screen (no man page)

1 Like

Brb I’l take a look.

Interesting, looks like it’s less than 6GB

    time  read  miss  miss%  dmis  dm%  pmis  pm%  mmis  mm%  arcsz     c  
15:47:44     0     0      0     0    0     0    0     0    0   5.5G  5.6G  

Sysctl -w zfs.arc_cache_max= size in bytes

Will solve this.

Min of 4gb I think.

1 Like

I’m on Ubuntu 18.04, but just tried this:
$ sudo nano /etc/modprobe.d/zfs.conf
options zfs zfs_arc_max=12884901888

(first line creates zfs.conf in the dir, then the second is the option in bytes)

from here:

and it worked for me.
I don;t know how to re-load a module in a running kernel, so rebooted :man_shrugging:

[edit, or do what sarge says]

1 Like

Does that change it permanently?
And does it take effect immediately?

1 Like

Immediate effect, runtime only.

2 Likes

Nice one, Thanks!

1 Like

It will consume as much RAM as it can for cache.

Ive run it on my current nas, originally with 2 GB of ram in total without issue.

I bumped the ram on it in 2013 to 10 gb total (yes, mismatched dimms and single channel, but its an old shitty AMD Turion anyway) and noticed very little difference for a single user NAS scenario.

Call me crazy but since fedora 30 … I noticed zfs-fuse. And I don’t think you have to do zfs via dkms anymore… But idk

zfs-fuse is for filesystem in userspace.

You shouldn’t use it for any core mountpoints, but you can definitely use it for your porn array.

just me? Okay. :[