News for hackers. Stuff that matters.
Re:Do not buy RAM, compress by cpeterso on Thursday November 19, 2026 @01:15PM (#50563792)
[delayed]
Re:Do not buy RAM, compress by cxr on Thursday November 19, 2026 @01:34PM (#50564137)
[delayed]
Re:Do not buy RAM, compress by kevincox on Thursday November 19, 2026 @01:41PM (#50564264)
This sounds like a bad idea. No one has logged in via SSH for a while so the daemon hasn't touched any pages (or only pre-auth relevant pages) then when you log in it gets killed. Or if someone sends a rarely used request to an HTTP server then it crashes accessing some data unique to that request.

Sure, they will get restarted, but not great.

Re:Do not buy RAM, compress by cxr on Thursday November 19, 2026 @02:24PM (#50564950)
[delayed]
Re:Do not buy RAM, compress by tadfisher on Thursday November 19, 2026 @04:27PM (#50566630)
You have described the current state of Android development if you want your app to stay alive and be useful without its GUI in the foreground. It is an insidious process that has essentially broken the OS more with each release, and broken apps that were mindful of battery usage but didn't pull the correct magical levers.
Re:Do not buy RAM, compress by braiamp on Thursday November 19, 2026 @08:49PM (#50569150)
"All means are fair except solving the problem"
Re:Do not buy RAM, compress by onjectic on Thursday November 19, 2026 @05:58PM (#50567756)
I think what they are saying is if OOM was going to kill the process anyways, it can defer this a bit and only fault on read or write on the rarely used memory.

So don’t change the OOM descision making, just the action taken.

I think the person below makes a good point though, that this encourages or permits buggy code.

Re:Do not buy RAM, compress by cwillu on Thursday November 19, 2026 @07:04PM (#50568370)
OOM triggers when memory pressure is critical; it's not practical to further defer addressing it at that point.
Re:Do not buy RAM, compress by onjectic on Friday November 20, 2026 @01:22PM (#50579394)
Huh? Defer addressing? The memory would be reclaimed in this scenario, it is entirely “practical” in that sense.
Re:Do not buy RAM, compress by cwillu on Friday November 20, 2026 @01:27PM (#50579479)
Defer /addressing/fixing/solving/ the problem.

If the oomkiller is running, it's too late to wait and see: some process or kernel thread needs memory that the kernel can't currently provide

Re:Do not buy RAM, compress by onjectic on Friday November 20, 2026 @01:31PM (#50579539)
No one said we were deferring fixing the problem. Memory is reclaimed. We would only be delaying or avoiding the part where the process is killed.
Re:Do not buy RAM, compress by dotancohen on Thursday November 19, 2026 @01:50PM (#50564422)
Or swap it to a less expensive medium, such as the SSD.
Re:Do not buy RAM, compress by TheSoftwareGuy on Thursday November 19, 2026 @01:56PM (#50564529)
That’s actually a very old idea, called paging or swapping. And it totally works
Re:Do not buy RAM, compress by dotancohen on Thursday November 19, 2026 @05:42PM (#50567552)
Yes, that is what I am referring to.
Re:Do not buy RAM, compress by ChoGGi on Friday November 20, 2026 @08:32AM (#50574407)
Gonna party like it's 1969, I love AI!

Not how I expected the next big optimization push, but I'll take it.

Re:Do not buy RAM, compress by InsidiousWombat on Thursday November 19, 2026 @03:55PM (#50566241)
I'd rather not have it waste write cycles

... but reading say libraries directly and only putting in RAM the parts often used, now we're talking

Re:Do not buy RAM, compress by dotancohen on Friday November 20, 2026 @02:27PM (#50580490)
You could page to an HDD too. Or /dev/null
Re:Do not buy RAM, compress by origini on Thursday November 19, 2026 @04:06PM (#50566364)
I thought about something similiar but more in context of applications like JVM based or go based tools which are loaded in memory and then do not touch certain memroy pages for ages anymore.

Apparently though, tracking pages and access and stuff would be very slow.

I continued thinking about it on how to structure go or jvm apps that you split it in processes so they are more bound to when they are needed and you unload parts of your tool/programm by just handing over the results from one process to the other and kill it.

Re:Do not buy RAM, compress by gpapilion on Thursday November 19, 2026 @06:41PM (#50568183)
I thought this is what Meta ended up doing, as well as making it very aggressive to push data into compressed memory on servers.
Re:Do not buy RAM, compress by varenc on Thursday November 19, 2026 @08:14PM (#50568919)
[delayed]
Re:Do not buy RAM, compress by chmod775 on Thursday November 19, 2026 @11:33PM (#50570211)
That would break about a billion kinds of daemons. For example it might take down dbus and various system daemons when you open your settings, because some stuff is only accessed then. It would likely also trivially crash cron, various audio daemons when rare functionality is accessed by a program or you switch the output, etc.

I have trouble thinking of a daemon this wouldn't break. It might break even a simple clipboard manager when you go back through the history.

Re:Do not buy RAM, compress by throw0101d on Friday November 20, 2026 @07:59AM (#50574091)
> If the daemon tries to access that memory, let it crash.

Why not just change Linux's vm.overcommit_memory to not allow overcommitting, so that when a daemon/process does a malloc() an error is returned and it can be handled right away?