Live data from Hacker News

Linux 7.3 improves performance when running out of vRAM

pixelcluster.dev

221–230 of 328 posts

Re: Linux 7.3 improves performance when running out of vRAM

#221

Earlier quoted context omitted.

This gripe (that I literally crashed out on recently after maining Fedora for the first time) is top of my list for annoyance/frustration with Linux as a desktop. I now have btop permanently running in a Terminal and I habitually Alt-Tab to it to watch my swap. As soon as my free memory gets less than 1 Gb I kill any Firefox tabs (the memory black hole). I know this won't be popular, but Linux people have some kind o…

Which OS are you using? systemd-oomd (or similar) afaik is enabled in many modern releases and fixes it. The default settings (on Arch) make it kill stuff when your CPU is spending 60% of time on reclaiming memory over some time period. So you'll get 20 seconds of lag, then it is fixed. By killing a program, yes, but how else do you expect it to work? If your RAM is not enough you have to kill stuff. And I really dou…

The ideal would be to go into swap without becoming unresponsive, so that the user can quit a program of their choice to free memory. If you really want to make an issue out of it, do something like pre-X macOS, where it would provide a warning when you are getting close to running out of memory, so that a user might have the chance to do something before the current process starts getting swapped out.

Re: Linux 7.3 improves performance when running out of vRAM

#222

I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.

zram can create a very good buffer for that sort of thing

Re: Linux 7.3 improves performance when running out of vRAM

#223

Earlier quoted context omitted.

Which OS are you using? systemd-oomd (or similar) afaik is enabled in many modern releases and fixes it. The default settings (on Arch) make it kill stuff when your CPU is spending 60% of time on reclaiming memory over some time period. So you'll get 20 seconds of lag, then it is fixed. By killing a program, yes, but how else do you expect it to work? If your RAM is not enough you have to kill stuff. And I really dou…

Call me an old geezer but I remember having this thing called swap.

Right, and when it gets filled, the OOM killer comes along and does its thing.

Re: Linux 7.3 improves performance when running out of vRAM

#224

Earlier quoted context omitted.

Windows does freeze and become unstable, but it's usually because of some ring 0 errors not getting trapped appropriately. But Windows has always handled both OOM and out of disk space very well. The system will be extremely sluggish, but it typically continues operating. The Linux design is to keep using memory, then push to swap, and then when you OOM you hard lock. The built in kernel OOM module can miss when RAM…

Linux can be configured to disable memory overcommit sysctl -w vm.overcommit_memory=2 sysctl -w vm.overcommit_ratio=50 It is probably a bad idea to do that though as it will limit the amount of virtual address space an application can use

Note that the fork()/execve() semantics of Linux pretty much depend on memory overcommit. You may get weird OOM crashes when there is seemingly no memory pressure, if you turn overcommit off.

In the short time between fork() and execve(), the new process duplicates the entire virtual memory of the old one. None of this is physically allocated due to copy-on-write, but still all counts as virtual memory.

Re: Linux 7.3 improves performance when running out of vRAM

#225

I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.

Agreed. I've run into this way too many times, and now with a super aggressive oom killer config it still slows down until vscode or firefox just get closed. I wish it was similar to how it seems to be on MacOS from what I see on friends' screens, where theres some kind of hypervisor running that pops up a nice responsive GUI window saying "hey, xyz is using too much memory, close it or something else" while not locking up. But maybe that's also just the grass being greener on the other side?

Re: Linux 7.3 improves performance when running out of vRAM

#226
post #208

I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.

Wait, how does literally no one in this thread mention swap? IME, many default installations in recent years don't configure swap by default. Dedicate a few tens-of-gigabytes on your hard drive and memory overflows there instead of borking.

[deleted]

Re: Linux 7.3 improves performance when running out of vRAM

#227

Earlier quoted context omitted.

Running an unsupported OS is even more risky, especially with the excessive number of security updates needed while AI finds RCE after RCE.

MS should either fix the RCEs in Windows 10 (it is unsupported but the defects were already there when it was still supported, just undiscovered), or they should refund their customers (since they never managed to release a defect-free version).

These knee-jerk comments are not very interesting to read.

Re: Linux 7.3 improves performance when running out of vRAM

#228

Earlier quoted context omitted.

Which OS are you using? systemd-oomd (or similar) afaik is enabled in many modern releases and fixes it. The default settings (on Arch) make it kill stuff when your CPU is spending 60% of time on reclaiming memory over some time period. So you'll get 20 seconds of lag, then it is fixed. By killing a program, yes, but how else do you expect it to work? If your RAM is not enough you have to kill stuff. And I really dou…

> how else do you expect it to work How does it work on Windows and MacOS where I don't get the same freezes and random programs aren't killed by the OS? Because I'd expect it to work like that. There is this false dichotomy, a black and white kind of thinking on display. > And I really doubt you mean to say that Windows is _more RAM efficient_ than Linux What I'm saying ought to be clear to anyone willing to listen.…

"How does it work on Windows[..]"

This video from Mark Russinovich is a classic explaining it. It is old but still relevant.

https://m.youtube.com/watch?v=AjTl53I_qzY&ra=m

"My system should not get into an unrecoverable freezing state[..]"

There is a good precedent for what you want: Safety critical embedded systems. Your car ECU should not be in an unrecoverable freezing state when you want to break.

These embedded systems also are known to be terribly memory inefficient because every bit of memory is statically assigned and never reused.

So, it is not that what you want is impossible, it's just wasteful and expensive.

Linux and Windows sit on slightly different points on this spectrum (opposite of said embedded systems) and what you perceive as Windows' better behavior under memory pressure has a price too.

Re: Linux 7.3 improves performance when running out of vRAM

#229

I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.

zram can create a very good buffer for that sort of thing

Better use zswap, as zram and swap together can lead to priority inversion. https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-... (found via lwn.net)

Re: Linux 7.3 improves performance when running out of vRAM

#230

I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.

Try changing the Linux scheduler. And yes most desktop OSs are garbage and won’t let you use the fucking keyboard when under load.
Post reply on HN