From owner-freebsd-stable@freebsd.org Tue Jun 19 01:48:46 2018 Return-Path: Delivered-To: freebsd-stable@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 398FC1010B1B for ; Tue, 19 Jun 2018 01:48:46 +0000 (UTC) (envelope-from freebsd.ed.lists@sumeritec.com) Received: from out3-6.antispamcloud.com (out3-6.antispamcloud.com [185.201.18.6]) (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 AD76181313 for ; Tue, 19 Jun 2018 01:48:45 +0000 (UTC) (envelope-from freebsd.ed.lists@sumeritec.com) Received: from [153.92.8.106] (helo=srv31.niagahoster.com) by mx63.antispamcloud.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1fV5l6-0000Rk-OL; Tue, 19 Jun 2018 03:48:37 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sumeritec.com; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ubBK4tT6cPsmA0LT6ZjzW8O8R+hEgmmN0kXMOu2pRd0=; b=E6a6h0qxjcmP6koztbQUU/M796 JVhbJKbYkn7SpR+EX1C0yjIe6iLQ1C+v8WrBzDSzRliJRgHggMqWkbuoBLchRPr4SgNpMLHh6gEnN ry8h3Tgf7FKMPLDCtkGsZAIG2EB4PTIBjUy3LAyOjHA5AQrBI9Cy8B24mF2Hk/UcHQZOBeXrDcsAQ RI61L+d9XdRTnotIh08VbvpPeVk9SWxWpN4xS3JE91LHwzsa6LANgkkggSGFbwGoSxijY0XOuS5eD Dx3CBdOKzk/RuBZ7JplOGJtEfeicY4R40LQainIKzXVpqKiiMOAqDAAx+QiWHjBX8hAmmk2Kp0lc0 qK/3XG/g==; Received: from [182.1.110.123] (port=36627 helo=X220.sumeritec.com) by srv31.niagahoster.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fV5ky-0000Ef-UT; Tue, 19 Jun 2018 08:48:32 +0700 Date: Tue, 19 Jun 2018 09:48:26 +0800 From: Erich Dollansky To: tech-lists Cc: freebsd-stable@freebsd.org, freebsd-questions@freebsd.org Subject: Re: lightly loaded system eats swap space Message-ID: <20180619094826.75c0c735.freebsd.ed.lists@sumeritec.com> In-Reply-To: References: <20180618160855.44d9a0c2.freebsd.ed.lists@sumeritec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-1.0 X-AuthUser: freebsd.ed.lists@sumeritec.com X-Originating-IP: 153.92.8.106 X-AntiSpamCloud-Domain: out.niagahoster.com X-AntiSpamCloud-Username: niaga Authentication-Results: antispamcloud.com; auth=pass (login) smtp.auth=niaga@out.niagahoster.com X-AntiSpamCloud-Outgoing-Class: ham X-AntiSpamCloud-Outgoing-Evidence: Combined (0.02) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5qs8ngPXEcjbWoVCgxeBz4V602E9L7XzfQH6nu9C/Fh9KJzpNe6xgvOx q3u0UDjvOxaIwtUujoNIbErZzpBhdLdEykimEPJz4vxqAiX1/2grEjPCm4qLXWOIcJ1SaAOv+NWZ i5bIIYa9S0h67ZH5SXvI51WoVTst3UDc3Tc+zpnW4pWx7WxWFZpsjT/483ewgu5JfusABNhIyJPP 5Nt4ch9eUI1m44Bh4Rt/sb3dHEDQFHMPEyA05gafMZGwGiJNAwhEWvaIoDww+4QxfNN9HkkKLOus WKhOnst3qnCSa+ooImPP2dXZx92akKoN7fUg0kzXIlHX7eANWlCO2XGJyGU9oLDEz6cVLClJUS8A nGbz/BzL47xk+Q/uswILf2rDgM3sodCXd6Deqt8UbbiaEBtNhHbVMNVriwqiLfyjMaD0IGWzi/ZW VMCjfK76uXDcS+4b68bcfEUhGoUaMRLIrO7BePDP4/9QmYCRIF7Nfcc0IJ4wPZcRWc/x8B0Dq8iD 18tKpQZNCQ9fWNhdgLpZZMKumy7dSDdzT+FZaJbsZl2hXe9eBr/BlppHuPTdSOqbCq0jiD6XqsJZ tjQxlyCdsey6n3SPEHq5iliCZ8XofdvQPwUimsNGvJJilSn4u6QSZEpPc4+a4hAzgiKwXNZGYkTt cEEdFUtlBcd/cggQO2/Ly6uSlRfEHXv0FyPlUsc0FfdjzQ6YC7Heg3Xf7O1TOd70JEGZ4rWzGZ4/ zlyCC3H22azh0b/+k6ecX4jDrOoapV08UP4oHHmdSx2A1A1s+7ugyQaenMmH18/Q/rqh6KyCRQQx LY/+29TRohSqJrULEmYVBRym1GTL+3N3DlP9FRLpAXnrGA4CDNa5JkRTD9kWJR/YdqcpiEfVkaxc IKMqsCjBRB0t/r7fzY7HnTQ5j8Py3deP8vNnmz84mDUvZqxnB1hYVULyg3fWh5tbcz2mAWZJTLdd dmSmgUp4oA9rqJlne1u2s7aPHmvkjwmFXvRv X-Report-Abuse-To: spam@quarantine1.antispamcloud.com X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2018 01:48:46 -0000 Hi, On Mon, 18 Jun 2018 13:27:23 +0100 tech-lists wrote: > On 18/06/2018 09:08, Erich Dollansky wrote: > > > > On Sun, 17 Jun 2018 23:19:02 +0100 > > tech-lists wrote: > > > >> freebsd-11-stable r333874, ZFS raidz1-0 (3x4TB disks), 128GB RAM, > >> Swap: 4096M Total, 3502M Used, 594M Free, 85% Inuse > > > > this might not be related but I noticed that your swap space is > > small compared to RAM size. I noticed on a much smaller Raspberry > > Pi, that it runs into trouble when there is no swap even there is > > enough RAM available. Is it easily possible for you to add some GB > > of swap space and let the machine run then? > > > > How much swap do the other machines have? > > Yes, the machine with the problem uses the default 4GB swap. That's > all the swap it has. The machine without issue has a swapfile > installed on a SSD in addition to the default 4GB swap. > > problematic machine: > Device 512-blocks Used Avail Capacity > /dev/ada0p3 8388608 3.3G 714M 83% > > machine without a problem, it has swapfile installed: > Device 512-blocks Used Avail Capacity > /dev/ada0s1b 8262248 1.7G 2.2G 44% > /dev/md0 65536000 1.9G 29G 6% > Total 73798248 3.7G 32G 10% > > I added the swapfile a long time ago on this machine due to the same > issue. so, the same effect as on a small Raspberry. It seems that you also use a memory disk for swap. Mine is backed by a file via NFS. > > But my problem isn't so much an out of swapspace problem; all this > is, is a symptom. My problem is "why is it swapping out at all on a > 128GB system and why is what's swapped out not being swapped back in > again". > I wondered even on the small Raspberry about this. The Raspberries come with 1GB of RAM. Running just a compilation should never be the problem but sometimes it is. A very long time ago - and not on FreeBSD but maybe on a real BSD - I worked with a system that swapped pages out just to bring it back as one contiguous block. This made a difference those days. I do not know if the code made it out of the university I was working at. I just imagine now that the code made it out and is still in use with the opposite effect. Erich