From owner-svn-src-all@freebsd.org Tue Dec 19 12:57:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A4C2E80F07; Tue, 19 Dec 2017 12:57:28 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC93E7750D; Tue, 19 Dec 2017 12:57:27 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f52.google.com with SMTP id w196so2137910lff.5; Tue, 19 Dec 2017 04:57:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ralsuzk5UGk2RODLKIm8A6i/5IPbi9d/530oXIVKW+M=; b=dD2+Xo6EvXXbUSAG3oNJZ/vxxDvjh+kVPKaNxSE/v5w5UYm/3f92Rtd78/QOdQIFwL eS64+mp1f0GYEmey3iNYkMSj6vd03U+c317ow79fAePsQS1cTQON2ZOxmj8wH/JGnZim Kd4NWRw+iNwitOUVui3JkgkM4NBf/W2ySnafSWIP7+S5K8bdMoC2GSMzTk+xhbE3JmVR o73nA5m6x1/c5IqOqeQxvGJib8xRaH5CRomhnAL1NGLdp6Zqoc0OfQL/gBppp7I6p09s OnYbKLNvTilfgfLx6rNh5pkPblfJkKRpmh6ESsc2cfaohFpqJGqCJrUVI1DVAbv3S3vG EZew== X-Gm-Message-State: AKGB3mJi8AI5bUY2l/E1yHwB00z45+X3MREanVrdA+GXmsywPPhPPVdL Lx7aPjqR4/591Y+fSNDuS3W2EqmqBm0= X-Google-Smtp-Source: ACJfBouQ0ckxb0szSTRbnZlp/dt6sdTTBru6kpPF6y3EAMtq9c93HqYEFX4r/Cptds/I6vVovncGDA== X-Received: by 10.46.4.13 with SMTP id 13mr2137917lje.82.1513687860019; Tue, 19 Dec 2017 04:51:00 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id p5sm3107016ljc.7.2017.12.19.04.50.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Dec 2017 04:50:58 -0800 (PST) Subject: Re: svn commit: r326619 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Peter Jeremy Cc: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201712061001.vB6A12Ot032201@repo.freebsd.org> <20171213185214.GA12026@server.rulingia.com> From: Andriy Gapon Message-ID: Date: Tue, 19 Dec 2017 14:50:57 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171213185214.GA12026@server.rulingia.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2017 12:57:28 -0000 On 13/12/2017 20:52, Peter Jeremy wrote: > On 2017-Dec-06 10:01:02 +0000, Baptiste Daroussin wrote: >> Author: bapt >> Date: Wed Dec 6 10:01:02 2017 >> New Revision: 326619 >> URL: https://svnweb.freebsd.org/changeset/base/326619 >> >> Log: >> MFC r325851: >> >> remove the poor emulation of the IllumOS needfree global variable to prevent >> the ARC reclaim thread running longer than needed. >> > > This change appears to break the backpressure mechanism that forces > ARC to release wired memory. Running FreeBSD/amd64 r326743, I found > that my system was thrashing badly with almost all memory (~31GB out > of 32GB) wired (including 19GB ARC, 7GB VBox guests). Running a tool > that just allocates and dirties a large amount of memory had no effect > on the ARC size. Reverting this change only restores normal behaviour > where ARC will shrink under pressure. > > My ZFS boot tunables are: > vfs.zfs.arc_max="24G" > vfs.zfs.arc_meta_limit="12G" > Peter, could you please try to monitor 'arc-needfree' DTrace probe during periods when you are trying to put a pressure on the memory? The probe's argument (signed) tells the ARC's idea of the memory availability / shortage. bapt wrote: >> @@ -6310,9 +6294,7 @@ arc_lowmem(void *arg __unused, int howto __unused) >> { >> >> mutex_enter(&arc_reclaim_lock); >> - /* XXX: Memory deficit should be passed as argument. */ >> - needfree = btoc(arc_c >> arc_shrink_shift); >> - DTRACE_PROBE(arc__needfree); >> + DTRACE_PROBE1(arc__needfree, int64_t, ((int64_t)freemem - zfs_arc_free_target) * PAGESIZE); >> cv_signal(&arc_reclaim_thread_cv); >> >> /* -- Andriy Gapon