From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 24 02:11:01 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BB4C106566B; Tue, 24 Aug 2010 02:11:01 +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 067AE8FC0C; Tue, 24 Aug 2010 02:11:00 +0000 (UTC) Received: by vws7 with SMTP id 7so26409vws.13 for ; Mon, 23 Aug 2010 19:11:00 -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:cc:content-type:content-transfer-encoding; bh=TH0jI61hCMLXRzy4CdFHziS2srG+iybtfFG5uSHpIlQ=; b=VtMn8GDDH6kpofmw5rw1EUyy4YrH+NWdkYQ42N4Hq5BnEOxxeyjWcD3+AgWNSRqZPv h8JQ41aNCOBd8WJs8ZfInNFv/lxJ+D3aLaj2UOpfCz0OnRDnzFbx19zeNvNVvqv/W4lH ix4zKVJPY5RRC3vPEFRNDDuP/xz9HDrwR4pzQ= 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=HU+fiejTt5yHKodzNqWts6SwDcIY7ZWZGgmsPQMXlBShBebey5wwKt2YTxF7mWg/TO /l4aH4Wyuiw+q+y3e//A27NEGp+6EFfcFH2ni2ksoR+LuEOC4jMT5v8iGW/mqs46CA8Z BlCyN2AaTKMH5AQEs2+mPO1AUD62M48wrwrxU= MIME-Version: 1.0 Received: by 10.220.85.196 with SMTP id p4mr3667193vcl.271.1282615859967; Mon, 23 Aug 2010 19:10:59 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.220.49.70 with HTTP; Mon, 23 Aug 2010 19:10:59 -0700 (PDT) In-Reply-To: <4C72DDC3.1000006@DataIX.net> References: <4C719AB9.9020006@freebsd.org> <4C721161.40403@freebsd.org> <4C72DD1A.9070204@DataIX.net> <4C72DDC3.1000006@DataIX.net> Date: Mon, 23 Aug 2010 19:10:59 -0700 X-Google-Sender-Auth: 185f49DgvbAQMAeXOWU8l1Vx1WQ Message-ID: From: Artem Belevich To: jhell Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, zfs-devel@freebsd.org, Andriy Gapon Subject: Re: ZFS arc_reclaim_needed: better cooperation with pagedaemon X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 02:11:01 -0000 Could you try following experiments before and after the patch while monitoring kstat.zfs.misc.arcstats.size and vm.stats.vm.v_inactive_count. First prepare the data. * You'll need some files totalling around the amount of physical memory on your box. Multiple copies of /usr/src should do the trick. * Place one copy on UFS filesystem and another on ZFS Experiment #1: * Prime ARC by tarring dataset on ZFS into /dev/null. * Now tar both datasets in parallel with output to /dev/null Previously you would end up with ARC size shrinking down to arc_min. What I hope to see after the patch is that inactive memory and ARC reach some sort of equilibrium with neither monopolizing all available memory. #Experiment #2: If equilibrium is reached, try running some application that would allocate and use about 1/2 of your physical memory. Something like that perl one-liner used to cause memory shortage, only a bit less drastic. perl -e '$x=3D"x"x1_000_000_000'; # this should allocate about 2GB. Tune the number to suit your system. Again, in the past ARC would be the one feeing up the memory. Let's see if inactive list gives up some, too. --Artem On Mon, Aug 23, 2010 at 1:44 PM, jhell wrote: > On 08/23/2010 16:42, jhell wrote: >> On 08/23/2010 03:28, Artem Belevich wrote: >>> Can anyone test the patch on a system with mix of UFS/ZFS filesystems >>> and see if the change mitigates or solves the issue with inactive >>> memory excessively backpressuring ARC. >> >> I have a system currently patched up to ZFSv15 and mm@'s metaslab patch >> running that I can test this on. Throw me a patch and some specific >> tests and I can have the results back to you in the next 2 days. >> > > Forget the patch 1 line change I can hand type that in. As for specific > tests, let me know... > > -- > > =A0jhell,v >