From owner-freebsd-questions@freebsd.org Tue Jun 19 01:49:28 2018 Return-Path: Delivered-To: freebsd-questions@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 A105A1010C81 for ; Tue, 19 Jun 2018 01:49:28 +0000 (UTC) (envelope-from freebsd.ed.lists@sumeritec.com) Received: from out2-4.antispamcloud.com (out2-4.antispamcloud.com [185.201.17.4]) (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 283AE813E1 for ; Tue, 19 Jun 2018 01:49:28 +0000 (UTC) (envelope-from freebsd.ed.lists@sumeritec.com) Received: from [153.92.8.106] (helo=srv31.niagahoster.com) by mx42.antispamcloud.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1fV5lo-0005rM-29 for freebsd-questions@freebsd.org; Tue, 19 Jun 2018 03:49:20 +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 q3u0UDjvO16ABlNNUDIJIcF7N1k9wYur48C+/LzRqVzELXf1NLUsbNbo7palBZjCExzO+3olYto7 sTCg/xYdh5e+O0gvJufO4k7ydv2Rs1VgfbHBQGgnSBWlL1zfgiPkRstzHteqQWdrnhUkF3tokboh mUC6keMf0wQn+qGFwFhnrZWr3AIwIkRInETzFeWnWEMjTrypoIs0Eu2SVweq8AxTmtY9DiUeoo88 M6uRxsVd6UYTnWLqG3gNhjWgIn9EMhhACXfJHpfs332vkt6Wl7MpBkXrMhMHc89lUlfNGIO0+T0S MkmPG0MLFu2v64+aHLyU+yrkjHhgh/kiYxOPBswqnxg9Lned/s8ac6l5xhokNNT5RkirCYuZbnF6 M3AFiWWSHRt2dk0kShK+guhLvE8ZHBJsUd+RVYKU9W9tbmVXJBqdHHDmdf2raDz16YHGOTi9tJoQ riYEFnK7PKvlnF1V2Q3FudIO+sqgNDbuJsEKoSDoVfRu1cefC8JpF+lbU6zTjmskUlG3Zd5yeOVE lNpWzsCl3YJHUqwOxWHW7YBlSlhLfOxVf8v29ZQYyXuLTuVgimc/zNK1dueVWFX/jVbkJGDb+5Gd YD+B1mZX49bnljAQH5NHGFV4nJjDqSNnJSNd9xPRyRy7eUzk6yQb1PBFpZk1x5eJXSMEeoI38ery MCwrRoOS0Plza+EFMmTc9Li70SmMWTwEKu9ntussNcaGj1yTfYMe6HRjDaJVXSQgiL8KMk925Mnu kALX5/mr0yZz9SFq4v7QFZeCReDiqGhlxdWfIlX04LOaXSiaTacva6c8PlMFkds+0Y7NwU9aOPum EguiH1YFvf25LVONYbYifH5OzZAkoDjQt66mlya2F1V1wco3WQ93T15hjlFfHO6OYWtZrq7qLige J3Alm+IX3ni5gcc= X-Report-Abuse-To: spam@quarantine1.antispamcloud.com X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2018 01:49:28 -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