Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- A curious thing happens in my Ubuntu 24 system, maybe that's just the normal OoM killer algo but no matter what process is hogging, Firefox is killed. Chrome eating too much memory? Firefox dies. Too many apps open? Firefox dies. Its funny.by dormento
- ... Why would you be running Chrome and Firefox simultaneously?by zahlman
- I have a Z1 Extreme that has 16GB shared between the CPU and GPU (what AMD calls the APU). I've noticed that mangohud, the SteamOS utility that shows performance diagnostics, often reports RAM + VRAM numbers that exceed 16GB. I've been curious as to why. I presume it has to do with compression or something.by bsimpson
- I would assume virtual memory.by burnte
- Well written and very informative. I am glad we have these enthusiastic people around for Linux kernel development!by Lunar5227
- Enthusiasm seems proportional to the number of exclamation marks (28)! (:by cubefox
- You know what I would like to have? An application that sends a kill / kill -9 signal to a specific app, example Chromes, when things go south.by Beijinger
- How is that sufficiently different from the Halting Problem?by dessimus
- Last I checked the OOM killer was configurable. However the process of configuring it was so convoluted I doubt anyone has successfully done it.by bluGill
- Like xkill? [1]
Just be careful where you click
- This post focuses on performance, but what about crashing due to apps seeing no RAM available to allocate once VRAM is filled up?
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.
by nickjj - I gave myself 32GB of swap since SSDs are quite fast and the pages sent to disk seem to intelligently be rarely referenced ones. Feels amazing to run 4 VMs and 12 Claude Code instances on my mid tier hardwareby OsrsNeedsf2P
- I have this problem with an 8gib 2080. Nvidia drivers have bugs with Wayland or Vulkan which is at least partially a memory leak.
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.
by vlovich123 - It's got to be an edge case for Wayland to be used with a 2GB VRAM card? Targeting recent cards and letting people using older hardware install x-windows, or whatever, seems sensible.
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.
by pbhjpbhj - Your last sentence sums it all: AMD is the only serious option on Linux. Not perfect, but far better than Nvidia, thanks to their open drivers that anyone (and especially Valve) can improve.by flaburgan
- Great article! I share the same hunch as the author does; when allocating memory ultimately the application itself is in the best position to inform the kernel about the desired stickiness to VRAM. The best a kernel can do is guessing.
As a side note, it strikes me how much we owe to young trans people for low level performance engineering.
by exceptione - > As a side note, it strikes me how much we owe to young trans people for low level performance engineering.
wtf?
- Can someone please explain to me why it is apparently off-topic to point out that someone is bringing up irrelevant issues of gender identity, but not off-topic to do so in the first place?by zahlman
- I imagine "we" "owe" a lot more to young men or just men in general for the same, but I guess there's no virtue signaling points to be harvested from making that observation.by sfn42
- They'll get old soon enough.by eru
- Of course. These are the people that the industry needs who understands proper performance-level 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...
by rvz - I'm mostly excited for the VRAM savings from apps and games which have loads of unused or super rarely used textures.
Game developers often aren't super careful with this stuff, and there could be literal gigabytes of data which isn't used at all.
- Are there any people out there doing this optimisation post-release for existing games ?by stuaxo
- I worked on a PC/PS4/Xbox One game once. I wish I remembered more details, but at some point when looking at memory usage I found a 2048x2048 (or something like that) texture for something on a character. This texture was never anywhere near occupying the full screen. It got downsized once I told one of the artists, but I wouldn't be surprised if some games are inadvertently shipping with that kind of waste.
- Gosh, 7.2 literally just dropped with a bunch of awesome of performance/gaming related improvements (large folios, cache-aware scheduling, improved MGLRU reclaiming, Fair GPU Scheduler etc)... and I already can't wait for 7.3 to come out.
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!".
by d3Xt3r - Any improvements with fractional scaling? Can anyone please link to any material reg the work being done for improving fractional scaling in Linux; it would be great if it could match the rendering quality of macOS.
- Phoronix.com is my go to place for good news. It always gives me a sense of progress and makes me feel humble since so many smart people share their workby Prunkton
- Didn't we eagerly await on updates in the good old days of Windows?by toredash
- The best thing about Win10 reaching EOL is not being at the mercy of Windows Update any more. It was by far the biggest risk to having a functioning system.by mrec
- I might be in the minority here, but some of the latest Windows updates that dropped in the Insider channel are really cool, and I'm excited to see those coming to main.by timpera