From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 589E415ACFB for ; Tue, 18 Apr 2023 23:09:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D99F1E092C; Tue, 18 Apr 2023 23:08:34 +0000 (UTC) Received: from smtp.hosts.co.uk (smtp.hosts.co.uk [85.233.160.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 96802E091C for ; Tue, 18 Apr 2023 23:08:34 +0000 (UTC) Received: from host86-156-145-149.range86-156.btcentralplus.com ([86.156.145.149] helo=[192.168.1.99]) by smtp.hosts.co.uk with esmtpa (Exim) (envelope-from ) id 1pouR7-0005ha-DC for gentoo-user@lists.gentoo.org; Wed, 19 Apr 2023 00:08:33 +0100 Message-ID: <31e6d9f7-3e2b-59aa-f57f-2f18473cd33f@youngman.org.uk> Date: Wed, 19 Apr 2023 00:08:32 +0100 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on Content-Language: en-GB To: gentoo-user@lists.gentoo.org References: <3a8a143d-38f0-b7ea-4aa1-10c0b3a2a1e0@gmail.com> <50d5c2a3-76cc-39bc-290a-c6d3d9e0d7c4@gmail.com> <660b8812-817b-8c2b-ccd0-63b002be9888@gmail.com> From: Wols Lists In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Archives-Salt: eac4acfa-b9f0-4934-bb91-4f77245dcb57 X-Archives-Hash: 6b2da38bfbac8f164f3fdaba72385665 On 18/04/2023 23:13, Frank Steinmetzger wrote: >> /var/tmp/portage on tmpfs. And on every disk I allocate a swap partition >> equal to twice the mobo's max memory. Three drives times 64GB times two is a >> helluva lot of swap. > Uhm … why? The moniker of swap = 2×RAM comes from times when RAM was scarce. > What do you need so much swap for, especially with 32 GB RAM to begin with? > And if you really do have use cases which cause regular swapping, it’d be > less painful if you just added some more RAM. Actually, if you know your history, it does NOT come from "times when RAM was scarce". It comes from the original Unix swap algorithm which NEEDED twice ram. I've searched (unsuccessfully) on LWN for the story, but at some point (I think round about kernel 2.4.10) Linus ripped out all the ugly "optimisation" code, and anybody who ran the vanilla kernel with "swap but less than twice ram" found it crashed the instant the system touched swap. Linus was not sympathetic to people who hadn't read the release notes ... Andrea Arcangeli and someone else (I've forgotten who) wrote two competing memory managers in classic "Linus managerial style" as he played them off against each other. I've always allocated swap like that pretty much ever since. Maybe the new algorithm hasn't got the old wanting twice ram, maybe it has, I never found out, but I've not changed that habit. (NB This system is pretty recent, my previous system had iirc 8GB (and a maxed out value of 16GB), not enough for a lot of the bigger programs. Before that point, I gather it actually made a difference to the efficiency of the system as the optimisations kicked in, but everybody believed it was an old wives tale - until Linus did that ... Cheers, Wol