Date: Mon, 18 Mar 2019 09:55:04 -0600 From: Alan Somers <asomers@freebsd.org> To: Andriy Gapon <avg@freebsd.org> Cc: Konstantin Belousov <kostikbel@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: leaked swap? Message-ID: <CAOtMX2hXUy_41J8aU4sinBjCp8JpUywo44n16jtOwyRDMz9t9A@mail.gmail.com> In-Reply-To: <2f644795-abe6-da6d-6019-05cd3dd84380@FreeBSD.org> References: <9c5eaa94-f55b-464a-ab0f-267e7fce4bd0@FreeBSD.org> <20190318153230.GS96870@kib.kiev.ua> <2f644795-abe6-da6d-6019-05cd3dd84380@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 18, 2019 at 9:38 AM Andriy Gapon <avg@freebsd.org> wrote: > > On 18/03/2019 17:32, Konstantin Belousov wrote: > > 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. > > > > Thank you. > There is a single tmpfs mount: > $ df -t tmpfs -h > Filesystem Size Used Avail Capacity Mounted on > tmpfs 1.0G 4.0K 1.0G 0% /tmp/tmp > > No md devices at all according to mdconfig. > > Not sure how to check for the shared memory though. Try "ipcs -a"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2hXUy_41J8aU4sinBjCp8JpUywo44n16jtOwyRDMz9t9A>