Out-of-memory victim selection with BPF
Out-of-memory victim selection with BPF
Posted Aug 19, 2023 14:49 UTC (Sat) by khim (subscriber, #9252)In reply to: Out-of-memory victim selection with BPF by roc
Parent article: Out-of-memory victim selection with BPF
> Modern applications continually save your data so you lose practically nothing if the application dies for any reason --- a much better approach, which also makes specialized OOM handling unnecessary.
Tell that fairy tale to someone else, please. People wouldn't have clamored for phones with gigabytes of RAM if that approach actually worked. Apple Lisa provided that capability fourty years ago and in Apple's walled garden this even works, to some degree. But still with a lot of glitches.
Everywhere else? Nope.
> Popping up a messagebox, receiving input, and handling document close events without allocating memory is a lot of hard work and as the OS components involved became more complex (e.g. window compositor, more complex graphics) that work became harder and harder, so people stopped trying.It's not hard to set aside some emergency memory which can be used for showing such message boxes. TurboVision and OWL did that and it worked.
That's not entirely trivial, but certainly is much easier than robustly saving the app state and restoring it after crash. Saying that solution to the task which nobody was able to show is easier than something that was done routinely in the post is just useless posturing.
But as I have said: at some point computers got enough memory for the problem not to become obvious in 2 weeks in which you may demand your money back and thus incentive to write robust programs which one may actually trust disappeared.
In places where it actually matters they are still written and used.
> Personally I don't hark back to those "good old days".History doesn't repeat itself, but it rhymes. I don't think we would ever return back to “good old days”, but after collapse of our modern infrastructure people would, hopefully, rebuild it in more robust fashion.
Not 100% bullet-proof one, but, hopefully, in a way that doesn't require throwing 1000x more resources on a problem then it intrinsically needs.
Posted Aug 20, 2023 5:12 UTC (Sun)
by roc (subscriber, #30627)
[Link] (3 responses)
Posted Aug 20, 2023 10:02 UTC (Sun)
by khim (subscriber, #9252)
[Link] (2 responses)
Let me try. “Reply to this comment”, type something, kill the tab (like OOM killer would do), try to reload. “Conform form resubmission” and no matter what you do comment is lost. Let's try Reddir. “Comment”, kill. Same. Or maybe GitHub… nope. Or do you want to say that they are saving “before doing important work” like Turbo Pascal did 40 years ago which could save file before trying to compile and run it? That's not a new trick and is not a replacement to proper handling of memory. And the same with Android apps. Android assumes that it may kill them at any moment and they would just restore their state, somehow, but that's hit-and-miss and that's why phones with many gigabytes of memory are valuable. That's mostly thanks to modern OSes which properly isolate apps. The apps themselves are not any better and in data retention aspects they are even worse than they were 40 years ago. You just could afford to turn on various “auto-save” options because modern SSDs are so much faster than old floppies. But these options, themselves, existed for decades and were available way before memory sloppy programming have become the norm.
Posted Aug 21, 2023 15:29 UTC (Mon)
by jkingweb (subscriber, #113039)
[Link] (1 responses)
I can't speak to Web apps and closing tabs (and LWN is not a Web app, anyway), but if I type into the comment form and kill my Android browser (Vivaldi) explicitly, the text is retained when I start it back up. If I close the tab and use Vivaldi's "undo" function immediately the text is retained. If I wait for the "undo" prompt to go away and re-open the tab from the list of closed tabs the text is gone (but this is not very surprising).
Posted Aug 21, 2023 15:55 UTC (Mon)
by khim (subscriber, #9252)
[Link]
Yes. Some web apps are preserving content. Some Android apps are preserving it, too. Vivaldi is pretty good there. But, as I have said, auto-save is not a new invention and yet it was always spotty. It's still spotty thus I'm not sure what kind of “progress” is discussed here.
Out-of-memory victim selection with BPF
> Personally I'm pretty satisfied with the Android apps and Web apps I use not losing data.
Out-of-memory victim selection with BPF
Out-of-memory victim selection with BPF
>
> Let me try. “Reply to this comment”, type something, kill the tab (like OOM killer would do), try to reload. “Conform form resubmission” and no matter what you do comment is lost.
Out-of-memory victim selection with BPF