From owner-freebsd-current@freebsd.org Mon Mar 18 15:32:38 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56646154412F for ; Mon, 18 Mar 2019 15:32:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 906198DE60; Mon, 18 Mar 2019 15:32:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x2IFWUFO086762 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 18 Mar 2019 17:32:33 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x2IFWUFO086762 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x2IFWUM0086761; Mon, 18 Mar 2019 17:32:30 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 18 Mar 2019 17:32:30 +0200 From: Konstantin Belousov To: Andriy Gapon Cc: FreeBSD Current Subject: Re: leaked swap? Message-ID: <20190318153230.GS96870@kib.kiev.ua> References: <9c5eaa94-f55b-464a-ab0f-267e7fce4bd0@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c5eaa94-f55b-464a-ab0f-267e7fce4bd0@FreeBSD.org> User-Agent: Mutt/1.11.3 (2019-02-01) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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, 18 Mar 2019 15:32:38 -0000 On Mon, Mar 18, 2019 at 05:20:35PM +0200, Andriy Gapon wrote: > > First, a note that this was observed on a system that runs a fairly old current > (~ 1 year old) with a fairly long uptime (> 6 months). > I noticed that the system was nearly out of memory, 98% of swap was in use, > there was less than 1 GB of free memory, several GBs of each of active, inactive > and laundry memory, and many GBs of wired (mostly ZFS). > I decided to pro-actively reboot the system, but to speed that up I put the > system to the single-user mode (via shutdown) and then back to multi-user. So, > there was no real hardware reboot and the kernel kept running. However, all > userland processes were terminated. > > To my surprise, even while in the single-user mode the swap utilization didn't > go below 70%. Also, laundry memory remained in multi-GB area, but let's ignore > this for now. > > I think that the swap could be used only for anonymous memory, so I expected it > go to zero after the shutdown to the single user mode. > Does anyone have any ideas? > Maybe that's something that has already been fixed? > If not, any ideas on what to look for? tmpfs, swap-backed (or even memory backed) md, persistent posix shared memory, SysV shared memory.