From nobody Sat Jan 04 17:36:20 2025 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YQSKp1SkNz5j4Z2 for ; Sat, 04 Jan 2025 17:36:30 +0000 (UTC) (envelope-from karl@denninger.net) Received: from colo1.denninger.net (colo1.denninger.net [104.236.120.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4YQSKm2yHJz4ql4 for ; Sat, 4 Jan 2025 17:36:28 +0000 (UTC) (envelope-from karl@denninger.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of karl@denninger.net designates 104.236.120.189 as permitted sender) smtp.mailfrom=karl@denninger.net; dmarc=pass (policy=none) header.from=denninger.net Received: from denninger.net (syn-071-015-252-132.res.spectrum.com [71.15.252.132]) by colo1.denninger.net (Postfix) with ESMTP id D62652110DC for ; Sat, 04 Jan 2025 12:36:23 -0500 (EST) Received: from [192.168.10.28] (D18.Denninger.Net [192.168.10.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by denninger.net (Postfix) with ESMTPSA id 9C1BC36E1BD for ; Sat, 04 Jan 2025 12:36:21 -0500 (EST) Message-ID: <33db3282-25c4-42fb-8d97-1918d52fa9e2@denninger.net> Date: Sat, 4 Jan 2025 12:36:20 -0500 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: curious crashes when under memory pressure To: freebsd-hackers@freebsd.org References: <9e71d8eb-74c3-4bcb-89b1-90d4f9746168@quip.cz> Content-Language: en-US From: Karl Denninger Autocrypt: addr=karl@denninger.net; keydata= xsFNBF1Rd+gBEACmLAH7SAzdQq57ZN56QQEy0jDFfH5BvGOMZgCaP+Y5lJQ5u9WphCoCALMs Rg0o1Q9DRNWgUmy/cgsxioXAEzZFXXzOHPJhwplVOgfjxnoByD5KQhWG8Owm9QmATdtiZPSV 4UYVNUIbZv7btSnnAXysG2OUHajYS5PVeFQxFbhNFq/SS8VaXr1WEVTFa8NFKp2W3/KY1A+U KKDUlYwnOauK3fnY9chF2IRSoxAbBJFrJ4lPGz04HtzNos4Q9CBfTphKcdFjcPntNS9wrqs3 sm+7hLNTH9B2Kj6aekG5UhD03eyP+gevTgBy51RL6ULzI13Kc4aeyOByuBXrA8D2m2Ee67iy 4+ZSxM9Wn1gQce5624OWzCYIGBH2r75Bshp1KHKu36N2rN//kyKYnwl/z6UZB/S9cMUFKZgL gFx7QxpFX/HvSiBcPfcGS0meModpg6qma7/2jRoQAXacslpiT+uOfRGspNbnglkbw435RzX/ kMUclJQNZBBBUpPiGjVCjeBTiAfN8TyjS+pWzwxNCUZWbYO5xVaS0gbIhgVNoBOGn1rdTsdA PP65SRjaoL5KY6bzkkzrXLB2Djx8/p4vr0qIqxIQWbewJq3xKyKGiqI46ae77BF7k0B++Ndx g9K9UeWKl/iJ0eoI0ftR+xH3aIHTU1Or3j/tj4j8Z0tnVSyt1wARAQABzSNLYXJsIERlbm5p bmdlciA8a2FybEBkZW5uaW5nZXIubmV0PsLBfwQTAQgAKQUCZj4NhwIbIwUJDK6K2AcLCQgH AwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEG8twBXrj1l42DQP/A0AGcBuGhHzGh2aFyW94B29 ECEkmkxigmQt++AG9xr3Qv4gC6UtSGzKo50SWAdek5peBRTbeDALa/tQvBsbi2aJgYWxZVOV N2XLe89ZjvJuTZqXaG/iaV50es56/cWBlG7VR+5/ijw3u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3DneXcPS1BgxO57Rko5Hx3NUSVK83ovFb+Ofes9SLNdqNu3xAUcfpRdS DyxzpVbCq6Y2CIojiaweiYe5BOBhmR9OPGhqP8YD7GukYmQufAVuOrIVyctBlVPHgMBb+UX+ ItYXuX4weSJWLOsmM45xd/EYvBq2DWFpKlyihoktNzTGqxGsNeG7gCOEUTAnUwARAQABwsFl BBgBCAAPBQJmPg2HAhsMBQkMrorYAAoJEG8twBXrj1l4s28P/icoshBPgHA86zWSiBYWtR4M TXbg86Yo5tMm64gO2ipXHlDnS0fQOjkJvfo+1e8soq0Rf4RxvKGEDLF9sxLD3z0ptF4Lj8aN zddLPlWFUZ9iOGbDGZhdvnB6YfCWEOXnkXJHfdheYOd/cni54Y4MT1sPMUiPGDlB4Fpu1voL wMZdGfplQYuV+zYv2ezd6Aoc/YwmhixX3YSjy6vFa+7x8OXrGUK69XaZ649GGHpeZzYuLTPw jAfCjbYBk9a24GtQlO/sk9SHRlxIU1e/AflNMtOMYDwuEDLuPgTLe4pRt4lnSdnQSVsFoYz1 nO7XBtyJdUa2rrhcLfhmSxlbJF/4cmNB4ebyT+5v+9ChpMVqzpKBCjyxPm4s+WVq4aYQ7D24 caCcUknD82iMFDFvbV0dm/xAQKZ3k+L/apMhHtUS23dzhJemxWdeQ6Cs2l0FYoGtrEzfUguR Hj7U3opGU6F4dnH1nQt4CbaXAOXM2Zh4ik+z5xRv9ro7fZUG8KSaz8dHKc2scpnJsqdS5XEk NwcHQUCCwSOEPzbugPJY1vjkjlTGWu6ihN7mjxxfthNPGU21/Vfv0d+mlBNdTkl2YOlQtKci YBqkhRb5Re9KC+6O7dWFf5qPZQiD3iUOxUOWsaQhj/CxO+EYk7kxEJxV4tMZfesE90LgTINX Z7FdWd0DYG+m In-Reply-To: <9e71d8eb-74c3-4bcb-89b1-90d4f9746168@quip.cz> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------EAgpQzSbyAyhwdGuXUSGPjU8" X-Rspamd-Queue-Id: 4YQSKm2yHJz4ql4 X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.79 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[denninger.net,none]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,multipart/alternative,text/plain]; MIME_BASE64_TEXT(0.10)[]; XM_UA_NO_VERSION(0.01)[]; RCPT_COUNT_ONE(0.00)[1]; FREEFALL_USER(0.00)[karl]; HAS_ATTACHMENT(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:14061, ipnet:104.236.64.0/18, country:US]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:+,4:~,5:~] This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------EAgpQzSbyAyhwdGuXUSGPjU8 Content-Type: multipart/mixed; boundary="------------zMTbqTn62I4CetP0V08DHolQ"; protected-headers="v1" From: Karl Denninger To: freebsd-hackers@freebsd.org Message-ID: <33db3282-25c4-42fb-8d97-1918d52fa9e2@denninger.net> Subject: Re: curious crashes when under memory pressure References: <9e71d8eb-74c3-4bcb-89b1-90d4f9746168@quip.cz> In-Reply-To: <9e71d8eb-74c3-4bcb-89b1-90d4f9746168@quip.cz> --------------zMTbqTn62I4CetP0V08DHolQ Content-Type: multipart/alternative; boundary="------------0y070muRTkQYtLjvUW4RHETX" --------------0y070muRTkQYtLjvUW4RHETX Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 DQpPbiAxLzQvMjAyNSAxMjozMCwgTWlyb3NsYXYgTGFjaG1hbiB3cm90ZToNCj4gT24gMDQv MDEvMjAyNSAxNzoyNywgQ2hyaXMgVG9yZWsgd3JvdGU6DQo+PiBPbiBTYXQsIEphbiA0LCAy MDI1IGF0IDc6MDHigK9BTSBQZXRlciAnUE1jJyBNdWNoDQo+PiA8cG1jQGNpdHlsaW5rLmRp bm9leC5zdWIub3JnPiB3cm90ZToNCj4+Pj4gSSdtIHN3YXBwaW5nIHRvIGEgemZzIG1pcnJv cg0KPj4+DQo+Pj4gV2VsbCwgWW91IHNob3VsZG4ndCBkbyB0aGF0Lg0KPj4NCj4+IFdoeSBu b3Q/IFN3YXBwaW5nIHRvIGEgKmZpbGUqIG9uIHpmcyBoYXMgb2J2aW91cyBpc3N1ZXMsIGJ1 dCBzd2FwcGluZw0KPj4gdG8gYSBtaXJyb3JlZCBzd2FwIHBhcnRpdGlvbiBzZWVtcyBsaWtl IGl0IHNob3VsZCBiZSBlbnRpcmVseSBzYWZlLiBBDQo+PiBiaXQgc2xvdyAoZG91YmxlIHdy aXRlcykgYnV0IEkgc3BlbnQgJCBvbiBSQU0gcmF0aGVyIHRoYW4gTS4yIGRyaXZlcw0KPj4g b24gdGhlIHRoZW9yeSB0aGF0IEkgY2FuIGFkZCB0aG9zZSBsYXRlciBhcyBuZWVkZWQuDQo+ DQo+IERvIHlvdSBoYXZlIHN3YXAgb24gWkZTIG9yIG5vdCAoaW4gdGhlIGZpcnN0IHBvc3Qg eW91IHNhaWQgInN3YXBwaW5nIA0KPiB0byBhIHpmcyBtaXJyb3IiKT8gSWYgeWVzIHRoZW4g aXQgY2FuIGNhdXNlIHRoZSBwcm9ibGVtcyBpbiBtZW1vcnkgDQo+IHByZXNzdXJlIGJlY2F1 c2Ugc3lzdGVtIGhhcyBubyBmcmVlIG1lbW9yeSBidXQgWkZTIG5lZWRzIG1lbW9yeS4NCj4g SWYgeW91IHdhbnQgdGhlIHN3YXAgb24gYSBtaXJyb3IsIHRoZW4gdXNlIHNlcGFyYXRlIHBh cnRpdGlvbiBvbiAyIA0KPiBkaXNrcyBhbmQgYWRkIGdtaXJyb3Igb24gdG9wIG9mIHRoZW0u DQo+DQo+IEtpbmQgcmVnYXJkcw0KPiBNaXJvc2xhdiBMYWNobWFuDQo+DQpXaGF0J3MgdGhl IGFyZ3VtZW50IGZvciBzd2FwcGluZyB0byBhIG1pcnJvciBpbiB0aGUgZmlyc3QgcGxhY2U/ IElmIHRoZSANCmlzc3VlIGlzIHRocm91Z2hwdXQgSU1ITyB0aGUgYW5zd2VyIGlzIHRvIHN3 YXAgdG8gbXVsdGlwbGUgZGV2aWNlcy4NCg0KUHV0dGluZyBzd2FwIHRocm91Z2ggYSBmaWxl c3lzdGVtIGFic3RyYWN0aW9uIGFzIG5vdGVkIGFib3ZlIHJ1bnMgdGhlIA0KcmlzayBvZiBy ZXF1aXJpbmcgYW4gYWxsb2NhdGlvbiBvZiBSQU0gZm9yIHRoZSBvcGVyYXRpb24gdG8gY29t cGxldGUgDQp3aGVuIHlvdSdyZSBkZXNwZXJhdGVseSBzaG9ydCBvbiBpdCBpbiB0aGUgZmly c3QgcGxhY2UgcmVzdWx0aW5nIGluIA0Kc2VyaW91cyB0cm91YmxlLg0KDQotLSANCkthcmwg RGVubmluZ2VyDQprYXJsQGRlbm5pbmdlci5uZXQNCi9UaGUgTWFya2V0IFRpY2tlci8NCi9b Uy9NSU1FIGVuY3J5cHRlZCBlbWFpbCBwcmVmZXJyZWRdLw0K --------------0y070muRTkQYtLjvUW4RHETX Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 1/4/2025 12:30, Miroslav Lachman wrote:
On 04/01/2025 17:27, Chris Torek wrote:
On Sat, Jan 4, 2025 at 7:01=E2=80=AFAM Pe= ter 'PMc' Much
<pmc@citylink.dinoex.sub.org> wrote:
I'm swapping to a zfs mirror

Well, You shouldn't do that.

Why not? Swapping to a *file* on zfs has obvious issues, but swapping
to a mirrored swap partition seems like it should be entirely safe. A
bit slow (double writes) but I spent $ on RAM rather than M.2 drives
on the theory that I can add those later as needed.

Do you have swap on ZFS or not (in the first post you said "swapping to a zfs mirror")? If yes then it can cause the problems in memory pressure because system has no free memory but ZFS needs memory.
If you want the swap on a mirror, then use separate partition on 2 disks and add gmirror on top of them.

Kind regards
Miroslav Lachman

What's the argument for swapping to a mirror in the first place?=C2= =A0 If the issue is throughput IMHO the answer is to swap to multiple devices.

Putting swap through a filesystem abstraction as noted above runs the risk of requiring an allocation of RAM for the operation to complete when you're desperately short on it in the first place resulting in serious trouble.

--
Karl Denninger
karl@denninger.net
The Market Ticker
[S/MIME encrypted email preferred]<= /div> --------------0y070muRTkQYtLjvUW4RHETX-- --------------zMTbqTn62I4CetP0V08DHolQ-- --------------EAgpQzSbyAyhwdGuXUSGPjU8 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEvWWSxnGhSYSUSaCtby3AFeuPWXgFAmd5cZQFAwAAAAAACgkQby3AFeuPWXiO Qg//Qpnh4trQsNHcbxnGEjrsGnDsSJCcnamrmZasGC06buWWhpQTwMNJVISwlJzIyij07E0dP0RG /HG0uPRZ/Nh5HCOg35YCI3nyCRLRAiCcoLwWjT1qxRSBIcX8Pi+3ThxoyJWlyJmcwXaZvcQnPTDV Go+15C6DQ73lSitOO7Y8ws/sq2XP7x2GP+MGX7v3Te0DLIoLpHZlF5muYKZ8Vypm3BxqTq7VjpMt WeRECTlV408sw7qyRzMFn80Ej71GuvJxBEi7nMNj/09woE/pDt3A4lYb39nMrPk7ZMlM9QXUdJGM 3gTxE/mxgk/0pIsr7apcT9xHUjO9BiZT9UrfkTc3eYUiyuEBvA4O1wreYr7bVFpddVuo6NSuBEjo 4LHdUms5JYKwXDBiJU5/LHkBnXnZjYSn2j1C9TYlDK23qduFJztW/TrS7KNDOLxJ0ySRubKGpxjf mfP/ylM9kOW+jXxUt5KyQyDDJIr9XcLC3OSh1c+QvBPrdSZT2QCkxI4ZvNYaRViSVAq8t31wuHHl msiYlVDHP+1cjLfrK35wBvZqX4kpTxqgGC92TwjmJrpaXdikP33IeRZ+xwRQUgypOfHQ1o28Moio b71eT/NafEOu8TvKBWhP9bA3J+PwBSjx1aON1mHErQItK7Q3VmPlp3gWOKLN9dkedx+4YlAAbuOj TQY= =v0xb -----END PGP SIGNATURE----- --------------EAgpQzSbyAyhwdGuXUSGPjU8--