From owner-freebsd-fs@FreeBSD.ORG Fri Oct 2 23:38:26 2009 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 3BE811065679; Fri, 2 Oct 2009 23:38:26 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-yx0-f184.google.com (mail-yx0-f184.google.com [209.85.210.184]) by mx1.freebsd.org (Postfix) with ESMTP id D4A8B8FC15; Fri, 2 Oct 2009 23:38:25 +0000 (UTC) Received: by yxe14 with SMTP id 14so1779647yxe.7 for ; Fri, 02 Oct 2009 16:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=vq+gNFyaulKkoUI2nme1rf9bQlOFX5/+8FmaIgQP1MU=; b=DBXQvSSW9KFyvGpl3a4KPrF6HbO0f2kYf7SsHc84s1st38KM+adKYislvyMwg0fhVV Y+Rz+OWOngrLlWEkDP2QrNJDpbxfg5qRcGaXxVKepZ1w0QIQg9si0dOp4KMjZRQewL1Z RQntQBkRgwppn0pxv54uHnQDumlkFTDqQuLv0= 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:cc:content-type :content-transfer-encoding; b=VIfHkRD/D308+eAxG1QhD8z93ZP7kWMbZs4XGpIot7yrzF3G0hGTDxtBCz62wLahHa alQriGcE8KNaWx7530EnkJJrYVNJcJhoXT3RovMkpJvADT98szeljWE5XrKb9/3CqANq z0ql5bHlBp/kRqYjDRSy7u6uAXGtL1ZtDXhjs= MIME-Version: 1.0 Sender: artemb@gmail.com Received: by 10.91.27.15 with SMTP id e15mr619898agj.3.1254526705025; Fri, 02 Oct 2009 16:38:25 -0700 (PDT) In-Reply-To: <20091002184526.GA1660@garage.freebsd.pl> References: <4AC1E540.9070001@fsn.hu> <4AC5B2C7.2000200@fsn.hu> <20091002184526.GA1660@garage.freebsd.pl> Date: Fri, 2 Oct 2009 16:38:24 -0700 X-Google-Sender-Auth: d9972f5a04db654b Message-ID: From: Artem Belevich To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org Subject: Re: ARC size constantly shrinks, then ZFS slows down extremely 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: Fri, 02 Oct 2009 23:38:26 -0000 With the patch, if vfs.zfs.arc_min is set high enough, the system locks up. On a box with 8G or RAM I had arc_min=3D6G and arc_max=3D7G. Once ARC grew to ~5.8G as reported by kstat.zfs.misc.arcstats.size, number of wired pages grew to ~7400MB and the processes got stuck in 'vmwait' state. I had to reboot in order to recover. On one hand setting arc_min can be considered a pilot error. On the other, it may be a good idea to allow system to reclaim memory from ARC even if ARC is smaller than arc_min if the system really really needs it. The question is how to define "really needs it". On a side note, it appears that wired page count tends to be substantially larger than ARC size. I.e. in my case if ARC size grows to 6G, wired page count is about 1.5G bigger. Perhaps we should allow reclaiming memory --Artem On Fri, Oct 2, 2009 at 11:45 AM, Pawel Jakub Dawidek wrot= e: > On Fri, Oct 02, 2009 at 09:59:03AM +0200, Attila Nagy wrote: >> Backing out this change from the 8-STABLE kernel: >> http://svn.freebsd.org/viewvc/base/head/sys/cddl/contrib/opensolaris/uts= /common/fs/zfs/arc.c?r1=3D191901&r2=3D191902 >> >> makes it survive about half and hour of IMAP searching. Of course only >> time will tell whether this helps in the long run, but so far 10/10 >> tries succeeded to kill the machine with this method... > > Could you try this patch: > > =A0 =A0 =A0 =A0http://people.freebsd.org/~pjd/patches/arc.c.4.patch > > -- > Pawel Jakub Dawidek =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://ww= w.wheel.pl > pjd@FreeBSD.org =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http:= //www.FreeBSD.org > FreeBSD committer =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Am I Ev= il? Yes, I Am! >