33 points · by AdmiralAsshat · 4y ago · 44 comments
Instead, a few errant lines of javascript on a web page or in an extension is all that is needed to cause a web browser to consume every byte of available ram on a system and drive it into swap. :-/
I really miss the 90s web sometimes.
It sounds like the issue can be easily avoided by ensuring that the size of your FS + the memory you're running applications are using never exceeds 60% of usable RAM.
I had to check to make sure this wasn't posted on April 1st.
systemd is glorious, but I'm happily using a 90's-era init, FWIW.
Whether this systemd implementation is any better is, of course, another question entirely.
All that seems to have happened here is that Ubuntu may have rolled out systemd-oomd with some overly-conservative settings, so if we could all avoid having a collective pointless shit-fit about systemd again that would be great.
I've had the opposite experience. Usually when I'm out of memory, it's because some single process has gone crazy with memory allocation. Killing it brings the system back to "normal", but killing anything else would just lead to said crazy process gobbling up the newly-freed memory, and then being back to where I started.
> And it does it late enough that everything is broken anyway and the system sits thrashing forever.
This part I agree with.
For example Linux used to have a sleep mode which worked perfectly. Now it does not sleep reliably. For example if I move the mouse while it sleeps, it wakes up, even with the screen closed and uses the battery until there is no more energy in them. So the computer is unusable when I need it.
Another example is copy/paste. Today it works sometimes, some other times it paste another previous content. I use now Ubuntu 20.0.4 LTS. I just copied/pasted the version number from the system monitor panel to write this post, it pasted a previous content I copied in my browser!
A third example when I use a right click on Ubuntu's Chromium (a snap browser) then I have garbage on the screen. This browser can't display correctly non western characters.
So I do not know if its because systemd but a few years ago I used Trisquel Linux which did not used systemd at the time, and everything worked perfectly as I remember in the 2000'.
Power issues are always a pain. I built out the Linux OS for a fleet of mobile robots and found that the defaults for power management were very poor, but everything is there to get a bulletproof system. I could see how there would be issues with more unique laptop setups or external monitors/keyboards and whatnot.
It’s little more than a sales funnel for them to make sure people use Ubuntu servers as well, at this point.
I think a lot of people make the same, understandable, but incorrect, assumption that an LTS release is more stable than a normal release.
In my experience, Ubuntu LTS releases are equally stable/unstable as non-LTS release - the only distinction is that it is supported for a longer period of time, and hence tends to acquire more stability over time. Recently released LTS versions are quite frequently messy, and quite often new features make their debut in LTS releases - sometimes disruptively.
[Edit: Turns out this is one such case - systemd-oomd made its Ubuntu debut in 22.04]
[1] https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/19721...
That being said, the real solution here for "critical production" is to not run on a release that just came out, period. There's a reason Ubuntu LTS doesn't actually let you upgrade to the next LTS until the .1 release comes out. People should be deploying 20.04 if they want stability, and then upgrading to 22.04.1 when it comes out. Our infra team is still upgrading from 18.04->20.04, they won't be looking at 22.04 for a few years yet.
Stop using Ubuntu.
If you like Ubuntu but value reliability you should be using Debian.
I came to the same conclusion as well.
I've been using Debian for 1+ years. This is the best decision I've made regarding an OS ever since I started using Ubuntu many years ago.
It feels like the whole system is designed so that it can only do the least sensible thing when it runs out of memory.
Macos will just kill your latest app and throw an idiotic dialog box that's of no use now that the biggest offender has already been killed.
It seems Linux has similar issues.
It isn't fixed until systemd v251, released 7 days ago.
https://github.com/systemd/systemd/commit/030bc91cb98385904b...
I worked on UI compositors in my early twenties or so and they can consume large amounts of RAM generally because backing layers aren't typically compressed. Though I think most people associate web bloat with JavaScript, I would assume these two comprise a majority of consumption, maybe with JavaScript being a distant second place, though I'm not confident about that.
I upgraded to 22.04 (with GNOME) in my 2GB laptop and still is very usable.
If only it was the first time...
> systemctl disable --now systemd-oomd
and doesn’t need to be installed in the first place.
This comes up every time the systemd discussion happens and it's a little absurd that people need constant reminders that replacing a decent chunk of a base Linux install piecemeal is not viable.