Conversation

Daphne Preston-Kendal

ULT the OOM killer (and the kernel’s memory management in general) is one of the biggest annoyances with Linux for me, having used Macs for decades and *knowing* that we don’t have to still handle memory shortages like it’s 1975 any more

2
0
0

I’m pretty sure Mac OS inherited its ability to swap out to any available disk space from Mach, which came out in 1985

1
0
0

@dpk As someone who switched from Linux on desktop to a MacBook a few months ago, I find it completely absurd and annoying how Linux sometimes handles certain things :>

1
0
0

@dpk what's the difference between MacOS/Linux here, I don't follow? Is it that Linux needs a preconfigured fixed size swap partition / file?

1
0
0

@fraggle See retooted thread https://mastodon.social/@verdre/116182376380456569

Yes, Linux (without a third-party hack in userspace) needs fixed-size pre-allocated swap space. But also, Mac OS won’t kill processes just because it’s running out of memory; it will pause them instead (as if by SIGSTOP)

1
0
0
@amy @dpk i find it odd how uncommon it seems nowadays for linux users / distros to set up swap on desktops / laptops. there must be common myths or something.
0
0
0

@dpk @fraggle

Yes, Linux (without a third-party hack in userspace) needs fixed-size pre-allocated swap space.

As far as I know on MacOS dynamic swapfile creation is also handled by a userspace process. Not a third-party one, but on Linux everything in userspace is third-party since Linux is just the kernel. I don’t see how swapd is any more of a hack than MacOS’s dynamic_pager.

Mac OS won’t kill processes just because it’s running out of memory; it will pause them instead (as if by SIGSTOP)

How does SIGSTOP help if you’re out of memory? It won’t free anything.

1
0
0

@noisytoot @dpk if a process is continually allocating more memory, SIGSTOP will prevent it from allocating any more. Also a stopped process can be entirely paged out to disk; a process that's still being scheduled will cause thrashing as its pages will keep being brought back into RAM

0
0
0