From owner-freebsd-stable@FreeBSD.ORG Tue Nov 27 20:27:25 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D96D54D for ; Tue, 27 Nov 2012 20:27:25 +0000 (UTC) (envelope-from telbizov@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id DB6EB8FC08 for ; Tue, 27 Nov 2012 20:27:24 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so16514116oag.13 for ; Tue, 27 Nov 2012 12:27:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=GLkD3ejjB4GdAhkIECMn6rbzOgwNJnrBFuqhsk/27g8=; b=wULT/RiWBfMKNnMI2DfeuPIn181JdGAYurEFuA/TfEVc4FWuXBsvgYzQ4V3OGMk0D2 xvVXnQ+c3xqX8X9CqbHJaKPAAe9r+9E5AgGaIReB87V9ZUEqOySjjsDQUT4VMxDeQdsi TFFZT/eijFGyZ4qe7h5MgJrPcyD73ux8XF07l+6m0vvM0QpxBvOuKwr92nDI8fw4UeEZ 8ZC+opKDTK1xhHf5awrGvJbsc4QBZ/uDSiTiSrC8mG0ROFxs7RwnPr/zCO9dgxH1PZxR /5+VezzeZARg8Eog4IK2VGfMPpdqIuDHt3Xxz8sbpJDtfhyhN4tASBZctQh8bgY/Z+fr +QAg== MIME-Version: 1.0 Received: by 10.182.177.72 with SMTP id co8mr883590obc.53.1354048044217; Tue, 27 Nov 2012 12:27:24 -0800 (PST) Received: by 10.182.71.165 with HTTP; Tue, 27 Nov 2012 12:27:24 -0800 (PST) In-Reply-To: References: <7A88B836-C985-446C-A992-A295A2474A38@gmail.com> Date: Tue, 27 Nov 2012 12:27:24 -0800 Message-ID: Subject: Re: ZFS memory management From: Rumen Telbizov To: "freebsd-stable@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2012 20:27:25 -0000 > > - if you are running processes that need a lot of memory, then limit the > ARC to allow the apps to have access to that memory And this is what Nikolay did after the incident apparently. The question was more like: Shouldn't the OS release this memory automatically when it's starved as opposed to nuking processes? It's only cache after all. Lots of it. On Tue, Nov 27, 2012 at 12:22 PM, Freddie Cash wrote: > Read any ZFS tuning manual on the web, including the ones direct from > SUN/Oracle, and they all list: > - if you are running processes that need a lot of memory, then limit the > ARC to allow the apps to have access to that memory > > :) > > > On Tue, Nov 27, 2012 at 12:10 PM, Nikolay Denev wrote: > > > 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=0" 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 > > 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 > > > > > > _______________________________________________ > > freebsd-stable@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org > " > > > > > > -- > Freddie Cash > fjwcash@gmail.com > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > -- Rumen Telbizov http://telbizov.com