From owner-freebsd-stable@freebsd.org Thu Feb 18 01:45:42 2016 Return-Path: Delivered-To: freebsd-stable@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 3F032AAB770 for ; Thu, 18 Feb 2016 01:45:42 +0000 (UTC) (envelope-from freebsd-stable-local@be-well.ilk.org) 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 2B58B1A4C for ; Thu, 18 Feb 2016 01:45:42 +0000 (UTC) (envelope-from freebsd-stable-local@be-well.ilk.org) Received: by mailman.ysv.freebsd.org (Postfix) id 28E07AAB76F; Thu, 18 Feb 2016 01:45:42 +0000 (UTC) Delivered-To: stable@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 2758FAAB76E; Thu, 18 Feb 2016 01:45:42 +0000 (UTC) (envelope-from freebsd-stable-local@be-well.ilk.org) Received: from be-well.ilk.org (be-well.ilk.org [23.30.133.173]) by mx1.freebsd.org (Postfix) with ESMTP id 013491A4B; Thu, 18 Feb 2016 01:45:41 +0000 (UTC) (envelope-from freebsd-stable-local@be-well.ilk.org) Received: from lowell-desk.lan (router.lan [172.30.250.2]) by be-well.ilk.org (Postfix) with ESMTP id 4395333C1E; Wed, 17 Feb 2016 20:45:35 -0500 (EST) Received: by lowell-desk.lan (Postfix, from userid 1147) id 68B8839843; Wed, 17 Feb 2016 20:45:34 -0500 (EST) From: Lowell Gilbert To: Doug Hardie Cc: Lowell Gilbert , owner-freebsd-stable@freebsd.org, stable@freebsd.org, Efra?n D?ctor , hiren panchasara Subject: Re: intr using Swap References: <56C4AF81.3040202@motumweb.com> <87f6fb602e0ad11b7600c70a08d74c30@dweimer.net> <56C4C244.8070805@motumweb.com> <56C4F7E9.9090405@motumweb.com> <20160217230138.GJ89208@strugglingcoder.info> <44d1rusuxs.fsf@lowell-desk.lan> <49F794B1-937F-4AEA-90CF-7C19AFF7EFE2@lafn.org> Date: Wed, 17 Feb 2016 20:45:34 -0500 In-Reply-To: <49F794B1-937F-4AEA-90CF-7C19AFF7EFE2@lafn.org> (Doug Hardie's message of "Wed, 17 Feb 2016 17:06:48 -0800") Message-ID: <447fi2sse9.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2016 01:45:42 -0000 Doug Hardie writes: >> On 17 February 2016, at 16:50, Lowell Gilbert wrote: >> >> Have you measured that paging (not swapping; that's a more extreme >> measure where the whole process gets removed from memory) is a >> significant load on your system in a specific case? If not, I doubt that >> it's actually the case, and you're mitigating a non-existent problem > > I believe the question here is what is using up the swap space. From > what I have been able to find with a similar situation is that malloc > will allocate swap space to backup memory and mmap will also allocate > swap if there is no backing file. procstat -v can be helpful in > chasing down some of those issues. However, I ended up guessing which > process it was by sequentially restarting processes and watching > swapinfo. I still have not been able to chase down what in that > process is using the space. There are no mmaps that are not file > backed so it must be a malloc. Finding the right one has been > elusive. Sure, but I'm pretty sure that the other worriers in this thread don't actually have any problem at all. I tried to poke a (Socratically limited) number of questions as a start of figuring out whether that's really the case, but thus far, I'd bet that it is. If that turns out to be a losing bet, I *will* spend time on fixing the code. Your observations are more useful, but I'm still not sure they indicate a problem that needs to be solved. There are clearly cases where significant quantities of swap can get used up storing copies of clean pages backing files on disk. Unless that slows down bringing in new pages that need to be read or written, I don't think that's a problem.