Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Feb 2019 16:59:30 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        "freebsd-fs@FreeBSD.org" <freebsd-fs@FreeBSD.org>
Subject:   ZFS unlimited ARC causes swapping and killing processes
Message-ID:  <885eb539-6815-7e7c-c513-14ba12620583@quip.cz>

next in thread | raw e-mail | index | archive | help
I thought memory / ARC autotuning was improved so I didn't set 
vfs.zfs.arc_max  on new 11.2 machine and was very surprised by OOS 
messages and killed processes.

It was just base install of FreeBSD 11.2 on machines with 32GB RAM, no 
3rd party daemons running, rsyncing data (small files, web pages from 
old machine) and after few minutes of running I got these messages:

Jan 28 20:34:59 oblik kernel: pid 673 (ntpd), uid 0, was killed: out of 
swap space
Jan 28 20:36:43 oblik kernel: pid 428 (devd), uid 0, was killed: out of 
swap space
Jan 28 20:37:31 oblik kernel: pid 474 (unbound), uid 59, was killed: out 
of swap space
Jan 28 20:38:31 oblik kernel: pid 19846 (tmux), uid 0, was killed: out 
of swap space
Jan 28 20:38:56 oblik kernel: pid 783 (csh), uid 0, was killed: out of 
swap space
Jan 28 20:39:12 oblik kernel: pid 778 (tcsh), uid 1001, was killed: out 
of swap space
Jan 28 20:39:27 oblik kernel: pid 110 (adjkerntz), uid 0, was killed: 
out of swap space
Jan 28 20:39:44 oblik kernel: pid 759 (getty), uid 0, was killed: out of 
swap space
Jan 28 20:39:59 oblik kernel: pid 22879 (getty), uid 0, was killed: out 
of swap space
Jan 28 20:40:15 oblik kernel: pid 22880 (getty), uid 0, was killed: out 
of swap space
Jan 28 20:40:27 oblik kernel: pid 22883 (getty), uid 0, was killed: out 
of swap space
..
..
Jan 28 21:47:12 oblik kernel: pid 23230 (getty), uid 0, was killed: out 
of swap space
Jan 28 21:47:48 oblik kernel: pid 23233 (sshd), uid 22, was killed: out 
of swap space
Jan 28 21:48:11 oblik kernel: pid 23231 (getty), uid 0, was killed: out 
of swap space

Even sshd was killed!

So I set it to 8GB via sysctl vfs.zfs.arc_max=8085741568 and everything 
seems fine.
Is it still neccessary to limit ARC manualy?

And why vfs.zfs.arc_max="8G" in loader.conf worked but does not work in 
sysctl?
sysctl: invalid uint64_t '8G'


Kind regards
Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?885eb539-6815-7e7c-c513-14ba12620583>