Re: curious crashes when under memory pressure

From: Miroslav Lachman <000.fbsd_at_quip.cz>
Date: Sat, 04 Jan 2025 18:47:16 UTC
On 04/01/2025 18:36, Karl Denninger wrote:
> 
> 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 AM Peter 'PMc' Much

[..]

>> 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? If the 
> issue is throughput IMHO the answer is to swap to multiple devices.

Redundancy in case of disk failure. I've seen many disk failures over 
the years, and when you have a swap concatenated from partitions on 2 
disks, the whole system mirrored on 2 disks, and 1 disk fails, the 
system crashes. That's why we've always used swap over gmirrored 
partitions. Then we can pull out one disk when system is running and 
replace it with a new disk.

> 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.

Kind regards
Miroslav Lachman