From owner-freebsd-questions@freebsd.org Tue Jan 22 07:47:05 2019 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 A156C14B1C51 for ; Tue, 22 Jan 2019 07:47:05 +0000 (UTC) (envelope-from ml@netfence.it) Received: from soth.netfence.it (net-2-44-121-52.cust.vodafonedsl.it [2.44.121.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mailserver.netfence.it", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C72777380 for ; Tue, 22 Jan 2019 07:47:03 +0000 (UTC) (envelope-from ml@netfence.it) Received: from alamar.ventu (alamar.local.netfence.it [10.1.2.18]) (authenticated bits=0) by soth.netfence.it (8.15.2/8.15.2) with ESMTPSA id x0M7kpS2015165 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 22 Jan 2019 08:46:58 +0100 (CET) (envelope-from ml@netfence.it) X-Authentication-Warning: soth.netfence.it: Host alamar.local.netfence.it [10.1.2.18] claimed to be alamar.ventu Subject: Re: The mysterious kern.maxswzone To: "Kevin P. Neal" Cc: freebsd-questions@freebsd.org References: <20190116022046.GA45024@admin.sibptus.ru> <50f1f8d5-7db6-4abb-6beb-c82f17396304@netfence.it> <20190121204421.GA20854@neutralgood.org> From: Andrea Venturoli Message-ID: <6556ab0d-d250-b418-6704-2b32c8b3cf08@netfence.it> Date: Tue, 22 Jan 2019 08:46:51 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190121204421.GA20854@neutralgood.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 6C72777380 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.31 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.90)[0.905,0]; IP_SCORE(0.23)[ip: (0.66), ipnet: 2.44.0.0/16(0.33), asn: 30722(0.08), country: IT(0.06)]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[netfence.it]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.94)[0.938,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mx.netfence.it]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.36)[0.356,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:30722, ipnet:2.44.0.0/16, country:IT]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2019 07:47:05 -0000 On 1/21/19 9:44 PM, Kevin P. Neal wrote: > With the difference in performance between a CPU and disk, does relying > on swap space make sense anymore? I think it still does. Of course performance will be terrible, but it can be acceptable for short periods of time: e.g. I've got a box which will swap considerably when periodic is run, but that happens at night and no one will notice. Also, I prefer an occasional slow down to processes being occasionally killed. If the machine constantly and heavily swapping, it's time for either a software diet or hardware upgrade. > The x1 and x2 rules of thumb come from a different era. One thing to keep in mind are crash dumps: they are written in a swap partition, so, if you don't have enough and your box panics, you won't be able to debug it. I've been hit in the past by this: a box's swap was be taylored to RAM size, the RAM was doubled and crash dump could not be obtained anymore. I also heard something about "minidumps", or compressed dumps, but did not investigate... so yes, all this *might* be obsolete; however, with modern HD sizes (1TB at the least) I prefer to "waste" some more space for swap, than to be sorry later. That's also why I don't bother about kern.maxswzone: I have some swap space I don't need *now*; it's just sitting there for eventual future needs :) > Oh, and won't swapping to a GEOM mirror cause deadlocks? I thought so, but > I wouldn't take my word for it. I have several boxes with swap on GMIRRORs and I've never seen any deadlock due to this fact. Just my experience... perhaps there are corner cases? bye av.