Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2012 22:10:52 +0200
From:      Nikolay Denev <ndenev@gmail.com>
To:        "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>
Subject:   ZFS memory management
Message-ID:  <7A88B836-C985-446C-A992-A295A2474A38@gmail.com>

next in thread | raw e-mail | index | archive | help
Hello list,

I have the following question : I have several machines with 196G of RAM =
that are using
RELENG_9 with ZFS, and are running a very memory intensive java =
applications - ElasticSearch
The machines are without swap configured and have "vm.swap_enabled=3D0" =
in /etc/sysctl.conf.
The ElasticSearch processes are using mlockall(2) to pin down their =
memory (configured at 40G).
And at this point I thought that there would be no problems, but from =
time to time, when the machine grows it's=20
ARC memory and there are some other running processes like nginx with =
passenger and uwsgi the ElasticSearch
process would get killed by the kernel OOM killer with reason "no swap =
space available"

Of course, I've now tuned down arc_max in /boot/loader.conf, but isn't =
this supposed to work automatically? Like
ZFS releasing some memory when there is a pressure, instead of the OOM =
killer going postal? (at the moment when
the process was killed the ZFS ARC was 132G).

I understand that this might be problematic as AFAIK ZFS releases memory =
asynchronously when the arc_reclaim_thread() is run,
which might take some time to be scheduled and complete.

Cheers,
Nikolay





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7A88B836-C985-446C-A992-A295A2474A38>