Linux 7.3 improves performance when running out of vRAM(pixelcluster.dev) |
Linux 7.3 improves performance when running out of vRAM(pixelcluster.dev) |
I am curious about the bit on virtual memory fragmentation. Would it make sense for the kernel to occasionally defragment that memory in place? I assume that would create a noticeable hitch, but might improve performance otherwise and allow for some applications to just fit in.
I now have btop permanently running in a Terminal and I habitually Alt-Tab to it to watch my swap. As soon as my free memory gets less than 1 Gb I kill any Firefox tabs (the memory black hole).
I know this won't be popular, but Linux people have some kind of Stockholm Syndrome on this. They tell you all of the obscure configuration files you have to edit, the additional programs you install. They insist that just having the OS kill a random program to save the DE is a good plan. It's the typical "your holding it wrong" mantra.
I run both Windows and MacOS and have done so for decades. I cannot remember the last time I had a hard freeze like I get on Fedora. On the exact same box running Windows I was able to have VS Code, Chrome with 15+ tabs, terminals, docker, etc. all running with zero issues. On Fedora I have a handful of Terminals and Firefox with less than ten tabs and nothing else running and I have to watch btop like a hawk.
The excuses people make are mind bending, and the shifting of blame from the system onto the user is shameful.
By killing a program, yes, but how else do you expect it to work? If your RAM is not enough you have to kill stuff. And I really doubt you mean to say that Windows is _more RAM efficient_ than Linux, because that's kind of absurd. Maybe Firefox is less RAM efficient than Chrome.
Edit: MacOS I wouldn't doubt being better in RAM management than the others because they have been selling their devices with ridiculously low amounts of RAM for decades.
Meanwhile if I try something similar on a 32GB Linux system, it will sputter or outright freeze. Suspend the system at 16GB used and on wakeup it takes 15 seconds to get back to full responsiveness.
Yes, some of this can be addressed with swappiness settings, however that behavior isn't partically clear and doesn't take into account that depending on your workflow on a given day (e.g. coding then video editing) different swap behaviors may be more optimal. Nor does it help for people who are trying to get good productivity out of a 16GB or lower system.
The one thing that has helped is moving to Brave Origin. Whether that's loading less JS ad SDKs or general optimization, it does seem to use a lot less ram than Edge/Chrome.
I use it when I am doing exploratory work and might materialize something too big. It has always killed the Python process or terminal program which did something silly.
At work I ran the same Firefox profile in Windows, with 16 GB of RAM, it used to eat RAM more eagerly, and restarting only helped for a few hours. I never understood why, but GMail and WhatsApp tabs were usually the biggest memory drains.
I'm just happy I don't have to deal with that anymore, since we were moved to iMacs at work, and the same Firefox profile gives no trouble with 24 Gb or RAM. WhatsApp is still the hungriest tab, but it stabilizes. Maybe there's a sweet spot between which tabs are opened and how much RAM do you have?
Is it acceptable? No. Did it solve my endless crashes that I used to get every day? Yes.
I don't love Ubuntu, I just hate modern Windows and find my ubuntu for work popos for gaming setup to be better for me. Ymmv.
Well, As a bizarre counter thought...
My work PC, at least with all of the corporate fuckware installed...
I tend to see two behaviors when moving between work and home.
Either:
A - It won't go out of sleep, it basically forces a reboot.
Or,
B - It leaks memory that I can't free without a hard reboot, to where even copy-pasting becomes absolutely jank (my favorite nasty behavior; it double-processes paste operations, not fun when dealing with credentials...)
I do have 'local admin' and while I only checked a couple of times, both times it looked like even then I couldn't do a force kill/restart of whatever was jacking the thing up.
Meanwhile my wife's current 'my old' PC with the same amount of RAM as work laptop and probably lower/older CPU spec could last between forced windows updates without a reboot and a lot more general churn.
-----
If there's one reason I'm bringing this up, it's because I know my work PC has a lot more 'kernel' type management stuff installed...
And yeah, workplace people in charge of that stuff gives that same weird 'blame the user' focus as what you describe.
Where did the technology go?
This is what nohang [0] does. There is no reason to do that by hand. Obscure configuration files to edit?
Yeah it's kind of annoying that it's not built in to most desktop distros, but... literally `apt install nohang; systemctl enable --now nohang.service`. Hardly that difficult.
When I run in a frozen system because of RAM, I'm a happy user of the Magic SysRq 'f' [2], it bypasses most kernel scheduling so it works even on frozen systems
Docs https://docs.kernel.org/admin-guide/mm/multigen_lru.html#thr...
I don't use Windows much, nor do I care much about that environment, but from what I've seen it seems to keep RAM usage below 100% most of the time. What I do see pretty often is the drive getting stuck at 100% usage instead, which makes the whole system ridiculously unusable anyway.
But Windows has always handled both OOM and out of disk space very well. The system will be extremely sluggish, but it typically continues operating.
The Linux design is to keep using memory, then push to swap, and then when you OOM you hard lock. The built in kernel OOM module can miss when RAM usage spikes rapidly. You can enable OOM monitors like systemd-oomd or earlyoom, but they do not run by default, and their behavior is to term the offending process.
The thing about Windows is that when you request memory, you're only granted memory if it can be guaranteed in the first place. The application will get a "not enough memory" error. On Linux, you're permitted to request more memory than the system actually has, with the idea that you won't actually use that much memory. It's optimistic that way. But if you do use it, then you're screwed.
Linux uses lazy allocation and overcommits, so what dies isn’t necessarily what you would expect thanks to the OOM killer.
With a fixed swap size windows doesn’t necessarily slow down as it runs out of memory.
YMMV if you don’t have 64 gigs of RAM and a 64 gig swap.
Linux OOM handling is just atrocious.
Chrome/Vivaldi are the only browsers where, when i have a long HN page open, when i resize it, my laptop freezes for like a minute. Not a full freeze, the mouse still moves, but like it's the year 1999 with a refresh rate of 4 seconds.
echo 2 | sudo tee /proc/sys/vm/overcommit_memory
is there on Linux if you want it.https://www.kernel.org/doc/html/latest/mm/overcommit-account...
Of course I did this when RAM was cheap but one of the best decisions I have ever made in life.
IME, many default installations in recent years don't configure swap by default. Dedicate a few tens-of-gigabytes on your hard drive and memory overflows there instead of borking.
https://kubernetes.io/docs/concepts/scheduling-eviction/pod-...
https://kubernetes.io/docs/concepts/configuration/manage-res...
https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#... (New feature)
So normally if you overcommit it might be undefined behavior if you not have enough memory. However if everything is fine pods can preempt based on prio to new nodes.
With the right settings only the faulty app might fail. Without it it can be a real pain to find the rouges
When your OOM killer isn't aggressive enough, not having swap makes you go fully unresponsive sooner. You still get into a situation where the OS keeps having to purge pages and read them again from disk. But without swap one hand is tied behind its back and it can only purge code pages, not data pages.
But yeah it’s completely ridiculous and frustrating that the default is to just lock up your DE
If you disable pagefile (like I did for some of my servers) and your program mallocs more than what you have in available space (even without ever dirtying a page) you will observe this.
I'm sure that this helps Windows a lot, even if it's not counted as actually used until the page is dirty.
Linux programs very often have virtual addresses many times the amount of physical ram, because there's never been any restriction. It's then very easy to just malloc huge chunks and use what you need and don't care about it too much.
Especially with many "tiny" allocations, python for example has huge sized objects which consume gobs of RAM dynamically, so any long running python process not only fragments memory but ends up having a bunch of objects consuming virtual memory...
idk why I felt the need to rant about this, but it's a difference that I've noted.
all these electron apps and invisible virtual machines (looking at you Claude) really don't help.
The communication is more direct too with GPT5.6 family of LLM. No more belt and suspenders.
What’s a decent amount? No idea. Don’t test it :)
Both Windows and Linux allow applications to map memory in an uncommitted state. However, in Linux, uncommitted memory can magically become committed by simply trying to use it, whereas on Windows you have to first actually commit it with a separate API call.
You might wonder why you would even bother allocating uncommitted memory on Windows if you have to explicitly commit it later. Simple: just to reserve a contiguous slice of address space for later.
The consequence of this is that on Windows an allocation failure usually occurs at an API call where it can return a failure, and indeed does. On Linux though, an allocation can fail during a page fault that is entirely transparent to the application. So instead, the default behavior is to allow overcommit, where applications are allowed to commit more memory than the system actually has, under the assumption that in many cases it won't all be in use at once. Instead of an application hitting an error or crashing on a failed allocation, if there is no memory left, a process simply hangs.
Here's my take on why this is the way it is:
- Because programs are written without any knowledge of what memory pages are committed, applications will allocate physical memory pages transparently even if they didn't malloc or mmap anything. Because of that, when an allocation fails under memory pressure, it's pretty likely the first page to stall on overcommit isn't really related to the actual memory pressure.
- To try to mitigate this, during high memory pressure situations, mechanisms like the OOM killer have to score tasks based on several factors to try to guess which ones are causing the problem.
- When you have something like make -j running, it is pretty easy for it to choose Firefox instead of the 200 instances of Clang, since individually none of those Clang instances are really using much memory. This, of course, doesn't fix the bleeding, it just kills your browser. There are ways to mitigate this problem, but they are not often implemented and nothing will ever be perfect.
One may wonder if it is worth the trouble... Probably not, but it does have its advantages, particularly when it comes to databases and caches, which can aggressively reserve memory and mmap files and heavily lean on demand paging for memory management. It's just that in this case, managing memory pressure becomes somewhat heuristics-based, and tools like cgroups are often desired to isolate failure domains and control memory allocations in production systems.
This is a tough problem to solve. Many improvements to the Linux OOM situation have been made, from simply fixing problems that made the wedging even worse, to tweaking the OOM scoring, to usermode daemons like systemd-oomd that try to catch memory pressure earlier. However, so far this is a solidly unsolved problem - the same exact wedging is still possible today.
As hopeless as it seems, I am still open-minded here. The Linux desktop moves slow, but nonetheless it seems pretty good at overcoming challenging obstacles.
Maybe not in the same way then.
Anyways, you've unlocked an old memory of mine, where Windows would crap itself due to low RAM and the fonts and interface elements would render in a "compatible" way, like using "fixedsys" font everywhere.
But only in veeery old Windows, think Win95B or the like.
What does this mean for compute workloads? Specifically, LLM inference.
Does it mean anything at all, or is this purely a games-thing?
Meanwhile in the Windows world, users hate updates... Like I genuinely can't think of a single instance that made users exclaim, "oh boy I just can't wait for the next Patch Tuesday!".
As a side note, it strikes me how much we owe to young trans people for low level performance engineering.
The commits they authored in [0] match and all of what they have mentioned in the article and this is how you know the author knows exactly what they are talking about and have explained it well.
Puts all the vibe-coders, and the so-called "AI Engineers" to shame. I know that if I ask about the basic system design of amdgpu and drm (direct rendering manager) infrastructure in Linux, a small handful will be able to explain it without using AI or googling.
[0] https://gitlab.freedesktop.org/pixelcluster/kernel/-/commits...
To quote myself from another comment: «I am inclined to rather point out remarkable things than unremarkable things. There seems to be relatively many trans people in this niche.» That's all. I didn't know this required a trigger warning.
> virtue signaling points
I didn't know about them but you do. Can I sell them to you?wtf?
I remember having this problem when I used an NVIDIA 750 Ti with 2 GB of memory. Just opening a few Firefox or Ghostty terminals (both are GPU accelerated) would result in those apps crashing or not being able to render their contents. Sometimes the compositor would crash or become unstable too (kwin, niri, etc.). I had to reboot every few hours. Complete system instability.
This problem only happened with Wayland, when I switched to X windows these problems went away.
Since then I switched to an AMD RX 480 (8 GB) GPU and never had an issue here with Wayland, if GPU memory gets full, system memory gets seamlessly used instead. It felt like with the NVIDIA card, it never allocated back to system memory if no VRAM was available. This was only a problem on Linux since that same NVIDIA card was fine in Windows for 10+ years with zero issues related to instability around VRAM allocation.
Tons of people reported the same issue on Linux on NVIDIA's forums for years.
I wrote a lot more details and recorded demo videos around 9 months ago here https://nickjanetakis.com/blog/gpu-memory-allocation-bugs-wi..., but since then a lot of these things have been resolved from switching over to AMD.
I guess an LRU with priority would handle VRAM for games pretty decently without going getting too application specific.
What about VRAM to Disk specifically NVME, would direct to disk be feasible for large workloads, I know it is used for streaming in assets directly via. PCIE, but i wonder how the performance would be on compute workloads running with NVME as a swap for GPU VRAM.
4x as slow in absolute best case, NVMe drives have 4 PCIe lanes usually
Just be careful where you click
> Not only does the display hardware like scanned-out images to be in VRAM, it also completely skips past the GPU’s virtual memory architecture and works with physical addresses exclusively.
Well there's your problem. Only so smart your memory management can be when you have to pay the cost of doing it manually. Although presumably this only applies to a small fraction of the VRAM?
They did mention they saw 4GiB of eviction for a single 32MiB scan out image.
So while I would call the image allocation small, it seems to cause an avalanche of evictions. Amplified by the fact that each frame has one of these images, though I expect subsequent frames might have a better chance of already fitting into evicted space.
What I don't exactly understand is: doesn't it make sense to always reserve the contiguous physical memory for this case and not allow anything else to be put in it?
On my M4 Max Mac Studio if I try to load too big of an AI model with protections off, the desktop starts glitching back and forth between the past few hundred frames. It looks bad when it happens but CtrlC still works to kill llama.cpp and if you were using LM Studio, SSH also works. Once you kill the offending process, or if macOS does it for you, the desktop comes back immediately.
Game developers often aren't super careful with this stuff, and there could be literal gigabytes of data which isn't used at all.
Before the recent increase in RAM prices, it was not difficult to have a generous amount of RAM in a PC, that would make very unlikely the out-of-memory situations.
When OOM really happened, it was much better to become aware of this immediately, and reduce the number of concurrent threads for a running job, or whatever caused that, instead of having reduced performance or even freezing.
Now, of course, it still doesn't work with a touchpad, but baby steps, right?
I haven't touched MS in this decade, but I swear that used to be a thing at least through 7...
Tabs on the other hand (and of the other type) should be able to move freely between all edges of all windows.
Which means next time I have something to do on Windows that in reality takes ~30 seconds once I'm in, it'll instead take 15 minutes because Windows decides that my time is worth nothing to them.
Add in that I use Windows maybe once a month or something, and every single experience with using Windows for me is this fucked up process of time wasting.
https://wayland.app/protocols/fractional-scale-v1
Also, I wouldn't hold the rendering quality of macOS as a high standard at all, since all it does is render at a multiple and then downsample, wasting energy and introducing blurriness.
Gnome >= 47 is fine, you will need to do:
`gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer', 'xwayland-native-scaling']" ` That stops being necessary as some point around 49/50 I think.
Meanwhile 4 separate windows pcs have not had problems with updates for at least 6 years
If you want a stable Linux experience though, pick something like Fedora, or even better, pick an immutable distro like Aurora or Bazzite, if you really, really care about stability.
That said, I do occasionally deal with quirks due to the rolling distro nature of Arch. The benefits far outweigh the occasional upgrade pain IMO though.
Majority of Windows users are not programming enthusiasts and just don't care.
OS works. Programs continue to work. Good. Keep it that way.
This goes especially when used with more powerful GPUs from nVidia - so perhaps arrogance here isn't warranted?
You say (in your blog post) "Linux" didn't work well so you reverted to "Windows", but as is so often the case you buried the distro/version info. You don't seem to have been using Win11 (later you mention Win7 & Win10Pro) ... So it's cutting edge software didn't work on my 2014 system, but older software did. The Linux/Windows aspects aren't particularly relevant AFAICT.
Nvidia refused for many years to properly support Linux, whilst AMD have supported it. So no surprise if a Nvidia card didn't work well/stably but an AMD one did.
Not sure what you mean. The post directly mentions I'm using Arch and was using the official drivers from NVIDIA (the latest at the time). I also didn't switch back to Windows. Although now the experience is much better with an AMD card. Totally worth the switch.
As for 2 GB on Wayland, I think it affects other cards too, but a low GB card feels it more. If you have 8-16 GB of VRAM you might not ever notice it's a problem since you have enough of a buffer to open up many more things.
I had thought that one of the biggest "selling" points of Linux is the ability to extend the useful lifetime of older hardware. And if the distros are going to turn away from X11, well.
Here’s one for example: https://forums.developer.nvidia.com/t/kwin-6-7-x-causes-mass...
Just search KWin Nvidia memory leak or Wayland Nvidia memory leak or kwin wayland Nvidia memory leak. It’s constantly issues and I remain convinced some intermixing of the two + monitors is at fault.
It's GPU drivers freaking out when they run out of VRAM, but it might only be specific to NVIDIA cards since AMD seems to handle this better.
But, if it's driver specific that means it could be fixed at the kernel level I suppose, especially since Windows handles it seamlessly?
Genuinely, everything starts feeling super sluggish, even long after the process has terminated -- cmd+tab gets slow, apps constantly hang for a few seconds at a time, the cursor position starts lagging and videos are slow to pause/play -- and the only way I've found to fix it is to reboot the entire machine. Clearing memory, restarting apps etc. doesn't work.
Don't get me wrong, the performance and QoS system works really well while the model is still in memory, but after a few cycles of loading and unloading, performance just ends up getting bad in general. Doesn't matter if I'm loading it with llama.cpp, MLX, native Metal, if I start using the GPU for machine learning the machine just gets really upset.
This sucks man... macOS is not supposed to need reboots like that, my Intel Mac could run for months on end without slowing down at all and I could push it as hard as I wanted. As far as I can tell, this behavior is new as of either macOS 26 or the 27 beta. Apple really has been betraying their true Unix roots lately.
I am on 15.7.9 and I have had uptimes in the high 50s with weekly local model usage, I even tried GLM5.2 streaming from SSD and I have not noticed any slowdowns after at all. I guess you are right about 26 and 27. Dang, the more I hear about 26 I am just so glad that I did not update. What version of macOS are you on? 26 or 27? Have you considered doing a custom backup and restoring manually to 15.7?
And then I scroll down and see the install instructions for my distro:
> To install on Fedora:
>
> Orphaned for 6+ weeks, not available.
It's funny I hear people slag npm all the time for developers just YOLO installing any dependency for the webservers they run.But hey, just sudo install this package! What could go wrong? You only use your desktop to access your online banking, etc. Forget the trust mechanism of your distro and just live a little!
Most applications these days are very good about that; you likely have just a single app that you use regularly that leaks. If you kill the process the memory will be recovered, save for some allocations the kernel maintains.
I prefer the Windows approach, it's more predictable and has better behavior under memory pressure. But it can cause issues with software written under the assumption that the OS uses memory overcommit
To be honest I think the reason I stopped care was more that I started using Linux as an OS in the 90's and over time more and more of my computing life was on Linux (except gaming) so by 2004 (or a little earlier) Windows was just for games.
That said, even some fixed release linux distros break things almost every release. That's because Windows updates is just windows base + kernel + drivers, while most linux updates are everything all at once with no distinction between base system and user applications. Plus windows and macOS present certain things more or less as a blackbox to user - I never had broken DE and keyboard layout switcher during windows update, while every ubuntu update used to break everything for me.
I cant wait for the number one gripe of all my users to finally be catered for.
Win11 wouldn't work on 2 year old hardware (no compatible TPM was the complaint, but I worked around it with hacks that MS didn't publicise). I should probably have used that as a chance to move that family member to a friendly Linux distro ...
This has so many variables that it's practically useless as a data point. We have a few Ubuntu VMs running complex business web applications and their Postgres database on only 4 GB or RAM and 20-50 GB of storage, no swap space. Ocassional high load, but Zero OOM problems for many years.
We could upgrade the RAM, but we were stingy when we created them, and it has worked well so far, so why waste resources? Incidentally, using no swap was a deliberate choice, as it would slow things down too much. We preferred to see and correct any memory/OOM issues beforehand, but fortunately we had none.
Running out of memory on a linux server sounds more like a skill issue than something comparable to how a desktop OS should behave :\
The only way to save my file system was to boot into recovery mode and run a verification with Disk Utility, then I was able to remove some files and get my space back.
I still remember how Windows ME looked at first, the feeling of something better. That didn't last long
I don't even mind making an MS account, I have one, just don't want Windows using that account and thus constantly freaking out about stuff like "you haven't enabled 3-factor auth." For all I know could also lock me out one day like they did with Minecraft.
I’ve found a few idle YouTube tabs is enough to bring macOS to its knees. Though I do wonder if uBlock Origin is the hidden cause rather than Firefox itself.
But this has worked in KDE since version 3, like, 20 years ago? And also with pasystray running under i3, since before win11 was a thing. They both support scrolling with the touchpad, too.
It drove me up a wall not being able to do this when I had to use Windows at work.
As for your MRU layout thing, I'm not sure I'd like it. While I like MRU for alt-tab, i like my not-so-often-used functions to be predictable. For this specific case, I always use us-macintosh, so I'd like to be sure that if I press the shortcut X times I'll get Y layout, without having to remember the order in which I used them. Now, to be fair, in my case I only have US-Mac available since it does everything I need.
The Linux world is a different kind of beast. I too went through the same motions as many newbies but at some point I just stopped complaining and started fixing what I didn't like.
If you start screaming for corporate money which should fix things that's another can of worms, corporate doesn't really do good will, they are usually buying control whenever they pour money into a project. Which can become tricky for Linux.
What a fucking joke lmao. I'll just keep buying Macs.
> Who should do it for you?
People who want me to use it.
The vast majority of my computer use has been on MacOS for the last 15+ years, since a Macbook Pro is the standard issue dev environment at every company I have worked at. I had a Windows desktop entirely for gaming that I've repurposed to be a Linux dev box. I genuinely thought all of the hype about Linux desktop that I have seen lately was an indication that it was finally ready for general use.
Now that I am vigilant watching RAM I haven't had the freezes. And I refuse to let the OS roll the dice on what program it wants to kill in its last ditch attempt to save itself from a problem it shouldn't have in the first place. And since Firefox seems to demand 800MB-1GB per tab process, it is a reliable scheme to just close heavy tabs when I see memory dip into the danger zone.
I just wish RAM wasn't so expensive right now, since I'd buy as much as I could just to avoid this pain.
So Apple can build a whole user-controlled GUI workflow around memory exceptions, which Linux cannot.
Maybe what needs to happen is new Linux syscalls + signals for DEs to utilise for building memory exception UIs? But the problem then with that is you’re impacting the portability of those DEs. So some maintainers might still refuse to work with Linux to provide this.
That all said, I’m pretty sure KDE does provide GUI tools for when this kind of scenario arises.
If I see a soil that is unusually rich in iron, I would be more inclined to point that out. If I come across a piece of soil that is as average as the 98% of the surrounding lands I wouldn't be less likely to point out "hey look, this soil is unremarkable average."
Also, it was just an aside from me. It is unclear what your problem is exactly, and I am also not sure if a tech forum could provide counsel for that.
> It is unclear what your problem is exactly, and I am also not sure if a tech forum could provide counsel for that.
So now you are making this personal and trying to say that I have some sort of problem? That's very interesting and I think you might be projecting here a little bit
I don't think I would downgrade though. I just hope this gets fixed someday... I can deal with the terrible memory bandwidth but I don't like to reboot.
(That said, macOS is so, so much better at reboots than Windows)
But my GLM5.2 is not 8TB, it is only around 200GB and works pretty well. (0.9tok/sec from a 40Gbps NVMe)
They seem to be focused on performance improvements because of the MacBook Neo pressure and RAM crisis, but right now, I'm mostly excited for the right-click menu and taskbar improvements. You can already do this with third-party software, but it's not the best experience unfortunately.
reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
Should restore the old right click menu (it did last time I used it at any rate).So much of windows 11 configuration is removing things you never asked for and putting things back.
Source: https://learn.microsoft.com/en-us/answers/questions/2287432/...
sysctl -w vm.overcommit_memory=2 sysctl -w vm.overcommit_ratio=50
It is probably a bad idea to do that though as it will limit the amount of virtual address space an application can use
In the short time between fork() and execve(), the new process duplicates the entire virtual memory of the old one. None of this is physically allocated due to copy-on-write, but still all counts as virtual memory.
I suppose this could be an historic thing, GPUs can have a type of DMA now, and disk access is much faster too, so paging perhaps makes sense when it didn't before?
AMD's GPU do use system memory seamlessly as a fallback, but NVIDIA's don't, at least not back in January 2026. Hundreds of people reported it in their forums too, or variations of the problem.
As the other comment says, I suspect it to do with GPU as the built-in displays are usually driven by intel and external displays are always driven by my Nvidia 4090.
But surprisingly, when I drive my e-paper monitor using original Jetson Nano (Ubuntu 20.04 ESM / Nvidia Maxwell); the fractional scaling is quite good perhaps even better than macOS.
Contrary to Windows, this also works well when hotplugging screens. Menus don't end up a blurry mess, and apps seem to work fine. On Windows, even some 1st-party apps are borked (task manager comes to mind).
Also, it's very rare for people to have the 8TB option on Macs - it's got to be a $1600+ option, huh? So not very common, which is why I assumed it meant something else.
I don’t use Windows on any personal machines, so there’s no way for this to benefit me. I hope it helps others who are frustrated by this though!
Also we cannot use the reasoning Linux means distributions, instead of using GNU/Linux for it, and other times Linux is just the kernel, depending on convenience.
You did. But without examples, it’s a meaningless throwaway.
Personally, I can’t say I’ve pushed many other UNIX desktops that far that they’ve OOMed. Except maybe OpenSolaris and FreeBSD, neither of which faired much better. But they’d also suffer from the same kind of DE development issues I described for Linux.
> Also we cannot use the reasoning Linux means distributions, instead of using GNU/Linux for it, and other times Linux is just the kernel, depending on convenience.
I’m not saying it for convenience. I’m saying it because it matters in this specific situation.
Surely you must understand that the reason Windows and macOS have arguably better GUI support for OOM is because the same company that owns the kernel also writes the frontend too? It’s hardly rocket science as a concept.
As I said in my previous comment, there are ways Linux (the kernel) could work with DEs to bridge that gap. But at present, they’re entirely separate concerns.
In any case, Xenix, DG/UX, SunOS/Solaris, Aix, HP-UX, z/OS UNIX, NeXTSTEP.
How does it work on Windows and MacOS where I don't get the same freezes and random programs aren't killed by the OS? Because I'd expect it to work like that.
There is this false dichotomy, a black and white kind of thinking on display.
> And I really doubt you mean to say that Windows is _more RAM efficient_ than Linux
What I'm saying ought to be clear to anyone willing to listen. My system should not get into an unrecoverable freezing state when I am doing routine tasks on a fresh install of an OS. And the community that is supposed to champion this OS should not then shift the blame to me if I complain about it.
This video from Mark Russinovich is a classic explaining it. It is old but still relevant.
https://m.youtube.com/watch?v=AjTl53I_qzY&ra=m
"My system should not get into an unrecoverable freezing state[..]"
There is a good precedent for what you want: Safety critical embedded systems. Your car ECU should not be in an unrecoverable freezing state when you want to break.
These embedded systems also are known to be terribly memory inefficient because every bit of memory is statically assigned and never reused.
So, it is not that what you want is impossible, it's just wasteful and expensive.
Linux and Windows sit on slightly different points on this spectrum (opposite of said embedded systems) and what you perceive as Windows' better behavior under memory pressure has a price too.
I've moved to Linux from Windows some years ago but the first thing that shocked me was precisely the abysmal performance around low memory availability.
Got my system stabilized eventually by means of some magical incantations but this wasn't a pleasant experience and I wouldn't want to repeat it.
It's beyond me how come Linux is so decrepid in this particular area compared to Windows.
And back when I was forced into running Windows, I used to get memory-related freezes daily. Literally daily.
So I’m really not convinced the situation is drastically different there. I mean if it were that simple, Linux would have fixed it already.
On Windows it's usually the hard drive being over-used that makes things drag for me.
You can pick applications from that list and choose between "Resume" (for "paused" applications) or "Force Quit".
At no point the system becomes unresponsive.
Surely that's obvious to other people aside from me. It's an attended system, not a headless server in a rack hundreds of miles away that must not ever alert someone.
Linux already does this. The issue is when your swap is full too, or you’ve exhausted your RAM at such a rapid pace that the disk IO cannot keep up with the read and writes to swap.
I’ve seen Windows choke under the same conditions too.
> do something like pre-X macOS, where it would provide a warning when you are getting close to running out of memory, so that a user might have the chance to do something before the current process starts getting swapped out.
This is where the desktop and the kernel being entirely separate organisations (not even projects, but literal organisations) makes things a touch harder. And those DEs aren’t even Linux specific either. So any tooling would have to portable (which, in fairness, should be possible with POSIX in this particular scenario).
I think KDE does provide tools here for gracefully handling memory constraints. But that’s just one desktop environment of many.
And I've run out of memory while compiling packages (I'm looking at you, composable-kernel) on Gentoo. It's not like it can notify me and I close things in the milliseconds it takes for a few more GCC processes to spawn and allocate and fault all the remaining memory.
Also I know linux has `cgroup_enable=memory` setting in /etc/default/grub, that's for Docker/K8S to be able to watch over containers RAM. It's not enabled by default as it slows down OS a little. Don't know if it's related to my first point.
It's been less than 24 hours since an OOM killer was identified as responsible for a bug I was experiencing.
The context of the thread is about the UX.
And the OS crashing isn’t a better option than an OOM killer. Frankly, there’s no good automated options. That’s why modern desktop OSs present users with a warning. And hence why we are talking about GUIs.
> In any case, Xenix, DG/UX, SunOS/Solaris, Aix, HP-UX, z/OS UNIX, NeXTSTEP.
Listing OSs doesn’t explain how they handle things better.
For example you’ve cited SunOS and I already said previously, I’ve seen SunOS completely die on its arse when OOM.