From owner-freebsd-stable@FreeBSD.ORG Thu Nov 29 14:53:22 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 D55A4ECE for ; Thu, 29 Nov 2012 14:53:22 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 60D4E8FC0C for ; Thu, 29 Nov 2012 14:53:21 +0000 (UTC) Received: by mail-ee0-f54.google.com with SMTP id c13so10262495eek.13 for ; Thu, 29 Nov 2012 06:53:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=ULvq7PDILVYG0mTPXwvZPlASx5l7DeIFXGJtToNwaVc=; b=FHfzOtakC2Wc0zb0G0nXWS2J8azKPSWbGo+LBc0rvwUDOGHJ/MMFVNIKj0kh86KKx7 ov55DPgK90QxevK38Bny+GzSOjnyxLfse7FtgvNI8lncpWWYTJcIEPizpaVT7V5oWXPP aWoRlecbPU4y3nx6ASwpkrBRno6/5Qz+oQqEZ2f7R1dR3hbMb9Dm+ChePEtfmAgs3Gsc LnmCflUKxbl0suiEm7IKncvLRBT3ELYD35sJ0dZGG7Uxt3Q3ASzfL7HMG3elouo7FF1Y Ks82/6RxoyocKUAOF4XciHZuyZJdycgf9M6ie06vF6BwV7CFmF5EFmuvSGBRNhne3afx 0LQg== MIME-Version: 1.0 Received: by 10.14.213.134 with SMTP id a6mr82921736eep.45.1354200800759; Thu, 29 Nov 2012 06:53:20 -0800 (PST) Received: by 10.14.189.5 with HTTP; Thu, 29 Nov 2012 06:53:20 -0800 (PST) In-Reply-To: References: <7A88B836-C985-446C-A992-A295A2474A38@gmail.com> Date: Thu, 29 Nov 2012 15:53:20 +0100 Message-ID: Subject: Re: ZFS memory management From: Olivier Smedts To: Freddie Cash Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlbz1ibIQPKBgiwC1CMHBIYPYAnVYU+F8jgcqPHVvqn4/0Wgut6s8BGKA1MP6OHU+JwzBxu Cc: Nikolay Denev , "freebsd-stable@freebsd.org" 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: Thu, 29 Nov 2012 14:53:23 -0000 2012/11/27 Freddie Cash : > 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 Or you could have at least a little swap (good practice) to allow ARC take the time to evict some memory when under pressure. > > :) > > > 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" -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas."