From owner-freebsd-current@freebsd.org Mon Mar 14 01:48:08 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 35356AD05AD for ; Mon, 14 Mar 2016 01:48:08 +0000 (UTC) (envelope-from markjdb@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 13A99B69 for ; Mon, 14 Mar 2016 01:48:08 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 12992AD05AC; Mon, 14 Mar 2016 01:48:08 +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 EC6F1AD05AB for ; Mon, 14 Mar 2016 01:48:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) (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 BD776B68 for ; Mon, 14 Mar 2016 01:48:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x22d.google.com with SMTP id x3so31248203pfb.1 for ; Sun, 13 Mar 2016 18:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FifoTHVROoxqN/uJX2rl+IgDr+/xhQhbRKD7u/xn7sA=; b=k8jYj6g5DUZCSuJNyUTaUBoHp/fIgubNhAIkptAkEqE2zSiH688JB10r+oYXg1p2ZG JS4DdiYmCQzHAwGfaGirs/y5Cf8eAqAKY6egx92ulk5EqYgRYVB+8HQEKTG+NGo4l294 JL5rHOl5kDzg3pcNxQKDew+zIS9eKHfiFVqKXsyETzwL7WwOT77NGydSPa5FQgQ2eEEt ICJvk2EC5b6dyOLHP7PVrz6cjCY6gdTw4DtQSzQTK9Ktc/B0kcrGU0hVGIVSZw6vOisx gt0O/Xwfo5qoN7WzWAHf2s2MPRI7vjwqtN5x0RXZb9xvL7YBDl20qslMQjywouOcurF7 mesw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=FifoTHVROoxqN/uJX2rl+IgDr+/xhQhbRKD7u/xn7sA=; b=LImoLlTXVDfnuz2+3EyeM0iiBatspq77xw/5IGALo5qqli8uE9Zq+48vG8aTJe3F7W HYpZVkSfv8ctWU1woSK0uu8yiXnScwOIqUWknCQvcXWFd1GTqP+2vyaJBaX6p4WB3D63 H39VHFe3/1Vf8z8TiNG3tkqEaZYIHjL59qgAXczUiUQGPYpAbxvVZrEPTBf7erOtruiq QzCOL2yqVIiQ3CXe0b9QxkK336AHOATYZjFx/yIb1crBIqouAzGAk9YY8XX+xpxnlG5E 32cGOzMZXKBoj8Xvyylg4hJi9vOGKofcneqDUWFAFcNuiB/7hJzUlBBwrb29SWMN1nt5 ap4w== X-Gm-Message-State: AD7BkJL84fi9+C+1/qa16iwD7zElgxhM50RlUtxcImBbBmSKa6EsCSa195QaQu/oK/rNqg== X-Received: by 10.98.86.77 with SMTP id k74mr25860010pfb.28.1457920087430; Sun, 13 Mar 2016 18:48:07 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-67-182-131-225.hsd1.wa.comcast.net. [67.182.131.225]) by smtp.gmail.com with ESMTPSA id b25sm27612497pfj.25.2016.03.13.18.48.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Mar 2016 18:48:06 -0700 (PDT) Sender: Mark Johnston Date: Sun, 13 Mar 2016 18:51:04 -0700 From: Mark Johnston To: Adrian Chadd Cc: Gary Jennejohn , "current@freebsd.org" Subject: Re: how to recycle Inact memory more aggressively? Message-ID: <20160314015104.GB68039@wkstn-mjohnston.west.isilon.com> References: <20160312093835.727d7197@ernst.home> <20160314013319.GA68039@wkstn-mjohnston.west.isilon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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: Mon, 14 Mar 2016 01:48:08 -0000 On Sun, Mar 13, 2016 at 06:33:46PM -0700, Adrian Chadd wrote: > Hi, > > I can reproduce this by doing a mkimage on a large destination file > image. it looks like it causes all the desktop processes to get paged > out whilst it's doing so, and then the whole UI freezes until it > catches up. mkimg(1) maps the destination file with MAP_NOSYNC, so if it's larger than RAM, I think it'll basically force the pagedaemon to write out the image as it tries to reclaim pages from the inactive queue. This can cause stalls if the pagedaemon blocks waiting for some I/O to complete. The user/alc/PQ_LAUNDRY branch helps alleviate this problem by using a different thread to launder dirty pages. I use mkimg on various desktop machines to build bhyve images and have noticed the problem you're describing; PQ_LAUNDRY helps quite a bit in that case. But I don't know why this would be a new problem. > > I'll poke alc and others to see if I can figure out how to trace > what's going on. eg, are we running out of free pages and instead of > waiting, deciding we're okay just paging out binaries/libraries so we > can issue more dirty write io.. > > > -a