From owner-freebsd-current@freebsd.org Tue Mar 15 15:18:43 2016 Return-Path: Delivered-To: freebsd-current@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 E5D5DAD2D09 for ; Tue, 15 Mar 2016 15:18:42 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id ABACBB3C for ; Tue, 15 Mar 2016 15:18:42 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id AB5B6AD2D08; Tue, 15 Mar 2016 15:18:42 +0000 (UTC) Delivered-To: current@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 9102FAD2D07 for ; Tue, 15 Mar 2016 15:18:42 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (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 299BEB35 for ; Tue, 15 Mar 2016 15:18:42 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id l68so149787825wml.0 for ; Tue, 15 Mar 2016 08:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=F34eMNK4d/gyKl0O0hyqJ9FiWBzlVSkPq38BAA5eSQk=; b=a2fqdFMtCPM9g+p6U1gIGBkmIoRjIvNix0kzV0qVFUUm0+HcqNix1EgMb0K4E2Wzoa 7TL2DVqODWui2gJ/9HmXY7/7xbFVhlG0mlPd5v4h93K+kk8Tv6ss5Vuyx4ZBEjG7TSf2 FfmCKAKlBB7kY5KV4uLS3BlwrkBTJourYciGlYxm4YYOtQ2zqAKCBhVPcMp7ijmC5ml4 Z0BwNdU7vysPD9Kh/S0M7P0jydS00NCsOo9ngezAB5Y/fMRHlnQfZo7LRXlpzpVbvoXb tPSD2Hqx0tXR+gaBShfAT9QlEU7aftAnqT7raxNt5xBdUNs7Gy85DgDUFhUnWQocnNtm bs6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=F34eMNK4d/gyKl0O0hyqJ9FiWBzlVSkPq38BAA5eSQk=; b=E0KwFldmrBKwVcH0mPobfJSHbt9DgvfrgQKthpyQN7RHJcrysBmU/fw22thaVmv8L7 QgCoHfD5XrDffMtor9o+BrrV7hcX1fHrsclLxIwr0N/da8sonqe1Q4MKLww5axxjf7NI Aiz8uYkoETcbL6RMF5eC6iK4kS5tjVBb7JJS06s54MdSnHUsCYHuIs+8fcrGYInbg9zE GoiUL4JOfZJ027Wz8AwiEiSW7cnAhIakM0ABzhmAb2zxjRgk4Wq+fWjEkpDR+JrfKu0W Ns9Y2TTPAY+SwXJek7IToXVFKDbr0uUY4KrcHGLYCOtB486PWt5up2JNzzwd2JuYIGvo FKEw== X-Gm-Message-State: AD7BkJIN1HD25396CVyppOe6n5SKRg0lZQa8Ko20I6PqbMbOOIsEhwncZj0woGBj282xCQ== X-Received: by 10.28.227.69 with SMTP id a66mr23454996wmh.57.1458051379462; Tue, 15 Mar 2016 07:16:19 -0700 (PDT) Received: from ernst.home (p4FC0F64A.dip0.t-ipconnect.de. [79.192.246.74]) by smtp.gmail.com with ESMTPSA id t8sm27167165wjy.41.2016.03.15.07.16.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Mar 2016 07:16:18 -0700 (PDT) Date: Tue, 15 Mar 2016 15:16:12 +0100 From: Gary Jennejohn To: Fabian Keil Cc: current@freebsd.org Subject: Re: how to recycle Inact memory more aggressively? Message-ID: <20160315151612.6b39604c@ernst.home> In-Reply-To: <20160313164117.0301b79e@fabiankeil.de> References: <20160312093835.727d7197@ernst.home> <20160313164117.0301b79e@fabiankeil.de> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2016 15:18:43 -0000 On Sun, 13 Mar 2016 16:41:17 +0100 Fabian Keil wrote: > Gary Jennejohn wrote: > > > In the course of the last year or so the behavior of the vm system > > has changed in regard to how aggressively Inact memory is recycled. > > > > My box has 8GB of memory. At the moment I'm copying 100s of gigabytes > > from one file system to another one. > > > > Looking at top I observe that there are about 6GB of Inact memory. > > This value hardly changes. Instead of aggressively recycling the > > Inact memory the vm now seems to prefer to swap. > > Are you using ZFS? > No, only UFS, so it's not due to pressure caused by ZFS. > > Last year, can't rmember excatly when, the behavior was totally > > different. The vm very aggessively recycled Inact memory and, > > even when copying 100s of GB of files, the system hardly swapped. > > > > It seems rather strange to me that the vm happily allows gigbytes > > of Inact memory to be present and prefers swapping to recyclincg. > > > > Are there any sysctl's I can set to get the old behavior back? > > I don't think so. > > I'm currently using this patch set to work around the issue: > https://www.fabiankeil.de/sourcecode/electrobsd/vm-limit-inactive-memory-more-aggressively.diff > > Patch 4 adds a couple of sysctls that can be used to let the ZFS > ARC indirectly put pressure on the inactive memory until a given > target is reached. > Thanks, I'll take a closer look at it. -- Gary Jennejohn