From owner-freebsd-stable@freebsd.org Thu Jul 30 05:00:24 2015 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 427A49AD1F6 for ; Thu, 30 Jul 2015 05:00:24 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from zoom.lafn.org (zoom.lafn.org [108.92.93.123]) by mx1.freebsd.org (Postfix) with ESMTP id 14C98131 for ; Thu, 30 Jul 2015 05:00:23 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from [10.0.1.2] (static-71-177-216-148.lsanca.fios.verizon.net [71.177.216.148]) (authenticated bits=0) by zoom.lafn.org (8.14.7/8.14.9) with ESMTP id t6U50Dv8007611 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 29 Jul 2015 22:00:14 -0700 (PDT) (envelope-from bc979@lafn.org) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: Swap Usage From: Doug Hardie In-Reply-To: Date: Wed, 29 Jul 2015 22:00:12 -0700 Cc: freebsd-stable@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Chris H X-Mailer: Apple Mail (2.2102) X-Virus-Scanned: clamav-milter 0.98 at zoom.lafn.org X-Virus-Status: Clean 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, 30 Jul 2015 05:00:24 -0000 > On 29 July 2015, at 18:57, Chris H wrote: >=20 > On Wed, 29 Jul 2015 17:41:33 -0700 Doug Hardie wrote >=20 >> I have several FreeBSD 9.3 systems that are using swap and I can=E2=80=99= t figure >> out what is doing it. The key system has 6GB swap and currently it = has over >> 2GB in use. ps shows only a kernel module [intr] with a W status. = Obviously >> that isn=E2=80=99t using the space. No other process shows a W in = its status. I >> suspect this is somewhat related to the use of mmap in one = application.=20 >> However, all of the mmaps in that application are file backed and = thus >> shouldn=E2=80=99t use swap. How do I figure out what that swap space = is being used >> for?=20 > Maybe top(1)? > top -P > for example. At least you could see who's chewing all your memory. = Which > should be a good clue as to who's responsible for swap usage. UFS although I don=E2=80=99t see how that could make a difference. Swap = doesn=E2=80=99t use a regular file system. However, the kernel must = track the actual usage using something like a simple file system. There = must be a way to investigate it. Top doesn=E2=80=99t show anything unusual. The most VM used is by the = process that uses a lot of mmap space that is all file backed. If it = was another process that was partially swapped then the ps status should = show a W. Only the one does.=