From owner-freebsd-fs@FreeBSD.ORG Wed Aug 11 20:39:27 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DEF71065673 for ; Wed, 11 Aug 2010 20:39:27 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id F41B18FC12 for ; Wed, 11 Aug 2010 20:39:26 +0000 (UTC) Received: by vws7 with SMTP id 7so465333vws.13 for ; Wed, 11 Aug 2010 13:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=Ay3WTDmALffuXobzooaM+Il01zkurx998mVag6I71Zk=; b=MpDI8m/QSfhDnvPvwAMAJmZ+7zgpLWb41URJ52Idz4iTq9OvYeSSwnAUzWTtj9Xg9r aX1UvWRG56cwIFkTlPCj8IPA5Aj4hI1Q1xQsIrQZkByPbU/wff4FjBeMpsvdeR7X63Kt 8uzZoqPHkAW31aQw5rABpkNW6yiwEhdrgJGIc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=rkDWpsLGOLzNIl9LxUj2ARI1ZPnhCrjLgywMbXfyALlZ2lVvLCGNmRJZKH+lwa6ulm RRD4VxCKyCEBVJVxfXJQEXpdXXCuy7EKJJghG4v8BDpJa2ranxPmolsvRKbEjdbReAZq uu7PTGfFvxdRShtruhGX6XZJ/deeT2wBuKkJM= MIME-Version: 1.0 Received: by 10.220.161.201 with SMTP id s9mr11751274vcx.277.1281557332002; Wed, 11 Aug 2010 13:08:52 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.220.49.70 with HTTP; Wed, 11 Aug 2010 13:08:51 -0700 (PDT) In-Reply-To: <20100811192537.GA44635@tolstoy.tols.org> References: <20100810214418.GA28288@tolstoy.tols.org> <20100811014919.GA52992@icarus.home.lan> <20100811192537.GA44635@tolstoy.tols.org> Date: Wed, 11 Aug 2010 13:08:51 -0700 X-Google-Sender-Auth: ASh9V9WZfuG3UWJ5L0TA8ZSc8fI Message-ID: From: Artem Belevich To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: zfs arc - just take it all and be good to me X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Aug 2010 20:39:27 -0000 > The bottom line of my original mail was: > - Hey, I set the arc to just take all my RAM > - It grows on reads and writes > - It shrinks when programs need the memory it has. > - It behaves well in a scenario of combined read/write/other programs. > - This is good, really good, what is dangerous about my settings that > =A0not everybody just sets the arc to nearly all their physical memory on > =A0FreeBSD? The issue is that ARC will give up memory even if there's plenty of it available and sitting in inactive/cache queues. That's particularly nasty in case your system uses some other filesystem besides ZFS. For example try tarring up few gigabytes worth of data from UFS filesystem and see how far your ARC size shrinks. It could be mitigated by setting minimum ARC size to be large enough so ZFS performance does not degrade. The downside is that ARC will not give up memory below its minimum no matter what, so if your APP really needs it, it would have to go to swap. There's a hack floating around that attempts to force kernel into freeing up memory from inactive/cache lists before draining ARC. It does help a bit with this issue, but it's still a hack. --Artem