Linux sucks at dealing with OOM situations 😒
Conversation
Avis
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 00:20:01 CET
muesli
-
Statut de sheik kabouti (carcinopithecus@x0r.be) sur Sunday, 22-Nov-2020 00:21:50 CET
sheik kabouti
@fribbledom sucks compared to what? ::montage miscellaneous windows horror flashbacks::
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 00:21:50 CET
muesli
Compared to anything else that doesn't freeze for minutes when you reach 80% memory usage.
-
Statut de Haelwenn /ɛlwən/ :bzh: (lanodan@queer.hacktivis.me) sur Sunday, 22-Nov-2020 00:24:43 CET
Haelwenn /ɛlwən/ :bzh:
@fribbledom I disabled overcommitting here, which now makes glib sucks with OOM situations, luckily the glib-based programs I have can crash. -
Statut de '';<!--"'hansw' (hansw@mastodon.social) sur Sunday, 22-Nov-2020 00:24:47 CET
'';<!--"'hansw'
@fribbledom Ask rik to solve it 🙂
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 00:31:54 CET
muesli
Agreed yeah. Let me be more specific then:
Linux sucks at dealing with 20% memory avail before OOM situations.
-
Statut de Mans R (mansr@society.oftrolls.com) sur Sunday, 22-Nov-2020 00:31:55 CET
Mans R
@fribbledom OOM situations suck.
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 00:33:00 CET
muesli
That delays the eventual freeze just slightly.
-
Statut de Loweel (loweel@boseburo.ddns.net) sur Sunday, 22-Nov-2020 00:33:02 CET
Loweel
@fribbledom zram.
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 00:34:45 CET
muesli
Possibly, on all of my systems however. Swap or not doesn't matter. When I reach - pretty exactly - 80% RAM usage, my systems freeze for minutes, sometimes hours.
-
Statut de Mans R (mansr@society.oftrolls.com) sur Sunday, 22-Nov-2020 00:34:46 CET
Mans R
@fribbledom You must be doing something weird. Are you hitting swap?
-
Statut de Dissy (dissy614@mastodon.social) sur Sunday, 22-Nov-2020 00:43:04 CET
Dissy
@fribbledom @mansr Well there's your problem!The kernel expected you to have replaced all your 7200rpm swap drives with PCIe NVMe M.2 flash RAID arrays.I mean it's 2020, comon now ;}
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 00:43:51 CET
muesli
Actually it should be rather happy then.
-
Statut de Dissy (dissy614@mastodon.social) sur Sunday, 22-Nov-2020 00:46:55 CET
Dissy
@fribbledom @mansr I.. uh.. oh. I didn't expect that 😟
It was supposed to be a joke on spending more for swap space solutions than on real RAM :{
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 00:48:35 CET
muesli
Guess I'll have to upgrade to 96GB of RAM to keep browsing the web, eh? 🙄
-
Statut de Dissy (dissy614@mastodon.social) sur Sunday, 22-Nov-2020 00:52:49 CET
Dissy
@fribbledom I suppose the minimal requirements will tide you over for a few months, but 256 GB and three GPUs are recommended for web browsing.I've already moved my Chrome instance to an AWS compute center just to be safe
-
Statut de Wayne Dixon (waynedixon@mastodon.social) sur Sunday, 22-Nov-2020 00:58:48 CET
Wayne Dixon
@fribbledom you must be using chrome to need that much ram.
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 01:34:00 CET
muesli
64GB.
-
Statut de Mans R (mansr@society.oftrolls.com) sur Sunday, 22-Nov-2020 01:34:01 CET
Mans R
@fribbledom How much do you have?
-
Statut de sheik kabouti (carcinopithecus@x0r.be) sur Sunday, 22-Nov-2020 01:34:55 CET
sheik kabouti
@fribbledom how many tabs do you have open and how long has it been since you last totally quit the browser? i'm on 8gb and i only run out of memory when browsing porn
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 01:34:55 CET
muesli
Typically between 50 and 100 tabs, probably open for a few days up to two weeks.
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 01:35:15 CET
muesli
Firefox, actually. Same issue with Chromium tho.
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 01:39:14 CET
muesli
Sigh. Better read the entire thread. It doesn't even really OOM, it freezes at pretty much exactly 80% of memory usage, for minutes to hours.
Yes, sorry, I need that many tabs. That's why I got 64GB of RAM in my machine.
-
Statut de Loweel (loweel@boseburo.ddns.net) sur Sunday, 22-Nov-2020 01:39:18 CET
Loweel
well, when I was young my Vic20 was able to do it. It’s perfectly logic to complain about ram usage, while using 50-100 instances of a segregated virtual machine , plus 50-100 instances of a javascript interpreter. Why should you run out of memory? Must be the operating system which sucks….
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 01:56:33 CET
muesli
No, sorry, that's totally off, it's a bit laughable. The memory usage of Firefox for all these tabs is 9.2GB.
The only correct answer here would probably be memory fragmentation.
-
Statut de Loweel (loweel@boseburo.ddns.net) sur Sunday, 22-Nov-2020 01:56:39 CET
Loweel
sorry, no. I don’t drink that. You perfectly know that the last trend about browser is segregation of tabls, which implies no shared memory. so each tab , plus a javascript interpreter, requires more or less 1GB. Plus, the OS must cache the filesystem and keep the VMM.
To open 50-100 of those segregated tabs, ~128Gb should be considered.
Now we can discuss how much this browser sucks, or this html engine sucks, but still, is the browser which sucks. Not the OS. The OS is just running on undersized hardware.
In the image below, you can see how much a single tab is taking to write this answer to you, on both browsers.
So your machine is undersized, and linux has a little to do with the fact browsers are horribly inefficient. Yes, with no swap linux will try its best. But, still you want to keep all of the tabs running, none swapped, and you have more sw than RAM.
What you expect?
-
Statut de Lyra (🎼, 🦄) & Bon-Bon (🅱️, 🍬) (lyrabon@equestria.social) sur Sunday, 22-Nov-2020 02:09:17 CET
Lyra (🎼, 🦄) & Bon-Bon (🅱️, 🍬)
🍬 #OOMkiller isn't hard enough on #Firefox. Also, since when has Firefox used significantly more RAM than Chromium? 🍬
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 02:09:17 CET
muesli
I don't think it does, they're pretty much equal in memory consumption for me.
-
Statut de Joe :fatyoshi: (popekingjoe@mastodon.social) sur Sunday, 22-Nov-2020 02:45:42 CET
Joe :fatyoshi:
@fribbledom Might as well go 128GB.
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 03:58:45 CET
muesli
Nah, that's not it. Happens both with and without swap space.
-
Statut de chmod777@linuxrocks.online sur Sunday, 22-Nov-2020 03:58:46 CET
chmod777
Maybe change your swapiness to something like 5 instead of the default of 20. Then it won't use swap till you hit 95% mem usage.
-
Statut de Steinar Bang (steinarb@mastodon.social) sur Sunday, 22-Nov-2020 11:51:38 CET
Steinar Bang
@fribbledom Hah! Yes!
https://steinar.bang.priv.no/2019/11/28/how-i-learnt-about-linux-oom-killer/
-
Statut de Beko Pharm (bekopharm@social.tchncs.de) sur Sunday, 22-Nov-2020 13:52:34 CET
Beko Pharm
@fribbledom @carcinopithecus I've usually 300 tabs going (yes, yes) and 8gb are enough. Something sounds very wrong with your numbers. FF.
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 13:52:34 CET
muesli
I assume it's memory fragmentation, even though compacting should solve that - to some degree.
The Firefox processes combined use a total of "only" 9.2GB of memory.
-
Statut de midzer@chaos.social sur Sunday, 22-Nov-2020 14:40:46 CET
midzer
@fribbledom I don't know what you have open, but I have no issues multi-tab browsing the web even on my 4GB ancient laptop.
In addition 1GB per tab is not true. When you check your browsers task manager, you will see each page needs max. 100MB (with mastodon using ~90MB right now)
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 14:40:46 CET
muesli
No, of course 1GB per tab isn't true. Whoever it was that claimed that nonsense doesn't understand shared resources or memory management on computers all that well.
The baseline of Firefox/Chromium is roughly 350MB, but how much each tab uses very heavily depends on the website it's displaying.
-
Statut de vaartis von BSD-2-Clause (vaartis@pl.kotobank.ch) sur Sunday, 22-Nov-2020 16:50:15 CET
vaartis von BSD-2-Clause
@fribbledom @carcinopithecus I don't think there is such a thing, on desktop at least. I haven't seen one. I don't think windows even has an OOM killer. Don't know about macs but I had plenty of oom situations on windows which could only be practically resolved with a hard reset, linux at least kills the process off or you can trigger it manually with sysrq -
Statut de :autumnleaf2: :blobboo: Bok (sudoreboot@sunbeam.city) sur Sunday, 22-Nov-2020 16:50:15 CET
:autumnleaf2: :blobboo: Bok
@vaartis@fribbledom @carcinopithecusSupposedly it should kill off offending applications but I have never seen that happen anywhere, for anyone. Hard reset or a couple of hours of patience is the only way.
-
Statut de nighthacker2003@mastodon.social sur Sunday, 22-Nov-2020 16:50:15 CET
nighthacker2003
@sudorebootI've always had Alt+Sysrq+F work, but never seen it triggered manualy, not even with earlyoom.@vaartis @fribbledom @carcinopithecus
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 16:50:15 CET
muesli
Right, I tried that combo as well, but I guess at that point it's already too late: the system seems to actually try to kill "offending" processes, but it freezes in doing so.
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 16:52:20 CET
muesli
Thanks, I'll try that the next time I run into this situation!
-
Statut de vaartis von BSD-2-Clause (vaartis@pl.kotobank.ch) sur Sunday, 22-Nov-2020 16:52:25 CET
vaartis von BSD-2-Clause
@fribbledom @nighthacker2003 @sudoreboot @carcinopithecus the reality is probably that the X server is hanging too and you need to switch to raw mode with sysrq+r, and THEN do sysrq+f. That worked out quite a few times for me, the X usually becomes very unresponsive under pressure. -
Statut de pedro@social.linux.pizza sur Sunday, 22-Nov-2020 17:24:53 CET
pedro
@fribbledom @loweel @carcinopithecus have you tried disabling swap? It will now fail-fast (and kill Firefox) instead of slowing to a crawl.
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 17:24:53 CET
muesli
As mentioned in the thread: I did, no difference really.
-
Statut de Mans R (mansr@society.oftrolls.com) sur Sunday, 22-Nov-2020 20:01:06 CET
Mans R
@fribbledom @midzer Over here Firefox currently has 13 processes with a total RSS of about 5.5 GB. That's with 37 tabs, not all of which have been loaded since I started it 2 days ago.
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 20:01:16 CET
muesli
Yeah, sounds fairly realistic & average for the current state of browsers.
-
Statut de Wetrix (wetrix@social.privacytools.io) sur Sunday, 22-Nov-2020 20:01:53 CET
Wetrix
@fribbledom FF had a recent update for Linux browsers, can't recall what it's called, but maybe it'll help the experience?
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 20:01:53 CET
muesli
Thanks, but already running the latest stable Firefox release here. Unless you're talking about some preview?
-
Statut de Blueberry (blueberry@fosstodon.org) sur Sunday, 22-Nov-2020 20:33:22 CET
Blueberry
@fribbledom nohang has worked flawlessly for me
-
Statut de muesli (fribbledom@mastodon.social) sur Sunday, 22-Nov-2020 20:33:22 CET
muesli
That looks nice, thank you!
-