News for hackers. Stuff that matters.
Re:The Linux kernel's inability to gracefully handle low mem... by throwaway3627 on Monday August 05, 2019 @10:02PM (#20621371)
Linux resource scheduling and prioritization and is pretty awful compared to its popularity.

TBH, there are very few OSes that get high-pressure resource scheduling and prioritization right under nearly all normal circumstances.

The hackaround for decades on Linux is always adding a tiny swap device, say 64-256 MiB on a fast device in order to 0) detect average high memory pressure with monitoring tools 1) prevent oddities under load without swap (as in OP example).

Re:The Linux kernel's inability to gracefully handle low mem... by ddingus on Tuesday August 06, 2019 @01:36AM (#20622449)
Sgi IRIX nailed this, FWIW.

I would have thought some of the IRIX scheduler made it into Linux by now.

Re:The Linux kernel's inability to gracefully handle low mem... by Annatar on Tuesday August 06, 2019 @02:17AM (#20622640)
No way, any sufficiently advanced technology is indistinguishable from magic and IRIX was so very, very advanced. IRIX hasn't been in development for almost two decades now and it's still more advanced in aspects like guaranteed I/O and software management (inst(1M))... What does that say about it and what does it say about the engineers who worked on it?
Re:The Linux kernel's inability to gracefully handle low mem... by ddingus on Tuesday August 06, 2019 @03:04PM (#20628385)
And you are right on all counts. Inst was magic. The things I did, often on live systems...
Re:The Linux kernel's inability to gracefully handle low mem... by twic on Tuesday August 06, 2019 @03:57AM (#20623157)
XFS is still better than any version of that ext dreck!
Re:The Linux kernel's inability to gracefully handle low mem... by vthriller on Tuesday August 06, 2019 @08:31AM (#20624520)
That's debatable. Better at losing file contents after hard reset? Maybe.
Re:The Linux kernel's inability to gracefully handle low mem... by ddingus on Tuesday August 06, 2019 @02:04PM (#20627784)
Makes me want to gather them in a room and continue the process. Irix was so very good.
Re:The Linux kernel's inability to gracefully handle low mem... by IcePic on Friday August 09, 2019 @12:57PM (#20656167)
Irix even had "virtual swap" which had no (or very insufficient sized) backing store for it, just to handle all the superlarge allocations from which it only uses a tiny amount.
Re:The Linux kernel's inability to gracefully handle low mem... by nathell on Tuesday August 06, 2019 @01:59AM (#20622561)
As crazy as it sounds, can that fast device be a ramdisk?
Re:The Linux kernel's inability to gracefully handle low mem... by LargoLasskhyfv on Tuesday August 06, 2019 @03:56AM (#20623152)
Not crazy at all, very useful.

https://en.wikipedia.org/wiki/Zram

https://wiki.gentoo.org/wiki/Zram

https://wiki.debian.org/ZRam

Or Armbian, a Debian derivative for many RaspberryPi-like ARM boards, where it helps avoiding trashing the usual sd-cards, and holds the logs, with different compression algorithms for /var/log, /tmp and swap.

Their script is here:

https://github.com/armbian/build/blob/master/packages/bsp/co...

I really like how this enables a tiny NanoPi Neo2 with one GB Ram booting from a 64GB SD-Card in an aluminum case with SATA-adapter and a 2,5" HDD mostly idling to draw only about 1W from the wall socket, while clocking up from about 400Mhz to 1,3Ghz if it needs to. It's not the fastest, but sufficient.

Re:The Linux kernel's inability to gracefully handle low mem... by GuB-42 on Tuesday August 06, 2019 @03:25AM (#20622968)
Exactly what I thought. Losing <5% of your RAM as swap space probably won't do much difference.

But if it solves problems, why doesn't the kernel automatically assign part of RAM as a virtual swap device, if the user allows it. It can help monitoring tools, and because the kernel knows it is not a real swap device, it can optimize its use.

Re:The Linux kernel's inability to gracefully handle low mem... by pantalaimon on Tuesday August 06, 2019 @04:15AM (#20623247)