From owner-freebsd-questions@freebsd.org Fri Aug 21 07:12:36 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD5843B5FB3 for ; Fri, 21 Aug 2020 07:12:36 +0000 (UTC) (envelope-from 4250.82.1d4c20009569880.1289d3f039c492270d1d02c3f05511be@email-od.com) Received: from s1-b0c6.socketlabs.email-od.com (s1-b0c6.socketlabs.email-od.com [142.0.176.198]) (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 4BXt4z74XVz4Y28 for ; Fri, 21 Aug 2020 07:12:35 +0000 (UTC) (envelope-from 4250.82.1d4c20009569880.1289d3f039c492270d1d02c3f05511be@email-od.com) DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1597993956; x=1600585956; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to:message-id:subject:cc:to:from:date:x-thread-info; bh=p+cQfcQJFOFU46pVGD0VW7z0Eum2xpMyTkDjiOvOe/4=; b=f8jNKGnCi68+TGV7472XcSV1QVY42UwZKC8yqlkUj9nrYsarE9j8MBiQudAdmvtlEtp85AlZP3EZcod91wzCWtNoTrVWMKsFJh48E56norT0smHMlG3b8rJnBY3yjRAUyrcCAQeu7aGsr7wMLwZW9Pt9DjlMhXoeIwIXanP+sAg= X-Thread-Info: NDI1MC45Mi4xZDRjMjAwMDk1Njk4ODAuZnJlZWJzZC1xdWVzdGlvbnM9ZnJlZWJzZC5vcmc= Received: from r2.us-east-2.aws.in.socketlabs.com (r2.us-east-2.aws.in.socketlabs.com [142.0.189.2]) by mxsg2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Fri, 21 Aug 2020 03:12:29 -0400 Received: from smtp.lan.sohara.org (EMTPY [185.202.17.215]) by r2.us-east-2.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Fri, 21 Aug 2020 03:12:28 -0400 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1k91Du-000LkX-55; Fri, 21 Aug 2020 08:12:26 +0100 Date: Fri, 21 Aug 2020 08:12:25 +0100 From: Steve O'Hara-Smith To: Polytropon Cc: "@lbutlr" , FreeBSD Subject: Re: Swapping when memory is idle?? Message-Id: <20200821081225.2b296f19e99f6c087b83bab8@sohara.org> In-Reply-To: <20200821070242.3597d05a.freebsd@edvax.de> References: <20200821070242.3597d05a.freebsd@edvax.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) X-Clacks-Overhead: "GNU Terry Pratchett" Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BXt4z74XVz4Y28 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=email-od.com header.s=dkim header.b=f8jNKGnC; dmarc=none; spf=pass (mx1.freebsd.org: domain of 4250.82.1d4c20009569880.1289d3f039c492270d1d02c3f05511be@email-od.com designates 142.0.176.198 as permitted sender) smtp.mailfrom=4250.82.1d4c20009569880.1289d3f039c492270d1d02c3f05511be@email-od.com X-Spamd-Result: default: False [-0.57 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[email-od.com:s=dkim]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:142.0.176.0/20]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sohara.org]; RWL_MAILSPIKE_VERYGOOD(0.00)[142.0.176.198:from]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[email-od.com:+]; NEURAL_HAM_SHORT(-0.86)[-0.864]; RCVD_IN_DNSWL_NONE(0.00)[142.0.176.198:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.004]; FORGED_SENDER(0.30)[steve@sohara.org,4250.82.1d4c20009569880.1289d3f039c492270d1d02c3f05511be@email-od.com]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:7381, ipnet:142.0.176.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[steve@sohara.org,4250.82.1d4c20009569880.1289d3f039c492270d1d02c3f05511be@email-od.com]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2020 07:12:36 -0000 On Fri, 21 Aug 2020 07:02:42 +0200 Polytropon wrote: > On Thu, 20 Aug 2020 12:40:32 -0600, @lbutlr wrote: > > Once a page is in swap it will stay there until it is needed. > > Or until the operator deactivates and reactivates swap (using > the swapoff / swapon programs), which would lead to anything > still in swap being "synced" with RAM as long as there is enough > capacity to hold them. THis is of course a heavy interference > with how the OS manages memory, and often not a good idea. ;-) The only time it's a good idea IME is just after some event has almost but not quite triggered the OOM killer before releasing memory so far too much has been swapped out. It will come back as needed of course but recovery is smoother if you force it all back with swapoff. -- Steve O'Hara-Smith