Live data from Hacker News

Linux 7.3 improves performance when running out of vRAM

pixelcluster.dev

211–220 of 328 posts

Re: Linux 7.3 improves performance when running out of vRAM

#211
post #208

I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.

Wait, how does literally no one in this thread mention swap? 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.

It only postpones the inevitable. It doean't actually fix it. I went for a 64 GB swapfile to hopefully not have to worry about it any more, only to find my swapfile full after a few days anyway, even when configuring swappiness to a minimum. Shit just piles up for no apparent reason. I'm sure someone smarter than me can diagnose the problem, but I just decided to reduce the swapfile size to a more sensible value and reboot every now and then. I should probably try Zram or whatever to see if that mitigates the problem.

Re: Linux 7.3 improves performance when running out of vRAM

#212

I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.

This gripe (that I literally crashed out on recently after maining Fedora for the first time) is top of my list for annoyance/frustration with Linux as a desktop. 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 o…

> 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).

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.

[0]: https://github.com/hakavlad/nohang

Re: Linux 7.3 improves performance when running out of vRAM

#213

I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.

This gripe (that I literally crashed out on recently after maining Fedora for the first time) is top of my list for annoyance/frustration with Linux as a desktop. 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 o…

Which OS are you using? systemd-oomd (or similar) afaik is enabled in many modern releases and fixes it. The default settings (on Arch) make it kill stuff when your CPU is spending 60% of time on reclaiming memory over some time period. So you'll get 20 seconds of lag, then it is fixed.

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.

Re: Linux 7.3 improves performance when running out of vRAM

#214
post #208

Earlier quoted context omitted.

Wait, how does literally no one in this thread mention swap? 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.

It only postpones the inevitable. It doean't actually fix it. I went for a 64 GB swapfile to hopefully not have to worry about it any more, only to find my swapfile full after a few days anyway, even when configuring swappiness to a minimum. Shit just piles up for no apparent reason. I'm sure someone smarter than me can diagnose the problem, but I just decided to reduce the swapfile size to a more sensible value and…

Oh, that's just a garden variety memory leak.

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.

Re: Linux 7.3 improves performance when running out of vRAM

#215

Earlier quoted context omitted.

This gripe (that I literally crashed out on recently after maining Fedora for the first time) is top of my list for annoyance/frustration with Linux as a desktop. 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 o…

Which OS are you using? systemd-oomd (or similar) afaik is enabled in many modern releases and fixes it. The default settings (on Arch) make it kill stuff when your CPU is spending 60% of time on reclaiming memory over some time period. So you'll get 20 seconds of lag, then it is fixed. 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 dou…

Call me an old geezer but I remember having this thing called swap.

Re: Linux 7.3 improves performance when running out of vRAM

#216

I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.

This gripe (that I literally crashed out on recently after maining Fedora for the first time) is top of my list for annoyance/frustration with Linux as a desktop. 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 o…

Possibly an unpopular opinion on this forum, but virtual memory has always been one of the strengths of the NT kernel. (And integration between the cache manager, virtual memory manager, file system (NTFS), overlapped I/O, completion ports, and threading. It’s a very robust and performant foundation when leveraged correctly.)

Re: Linux 7.3 improves performance when running out of vRAM

#217

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.

[flagged]

  > you intend to provoke 
Indeed, I made a small friendly side note to provoke you. Sir/madam, I sincerely think your reasoning is a bit off here, but if you feel you have been done wrong by me, please inform the admins. For the rest, please go back on topic.

Re: Linux 7.3 improves performance when running out of vRAM

#218

Earlier quoted context omitted.

This gripe (that I literally crashed out on recently after maining Fedora for the first time) is top of my list for annoyance/frustration with Linux as a desktop. 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 o…

Which OS are you using? systemd-oomd (or similar) afaik is enabled in many modern releases and fixes it. The default settings (on Arch) make it kill stuff when your CPU is spending 60% of time on reclaiming memory over some time period. So you'll get 20 seconds of lag, then it is fixed. 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 dou…

> how else do you expect it to work

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.

Re: Linux 7.3 improves performance when running out of vRAM

#219

Earlier quoted context omitted.

This gripe (that I literally crashed out on recently after maining Fedora for the first time) is top of my list for annoyance/frustration with Linux as a desktop. 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 o…

> 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). 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; syste…

So your saying the problem I am reporting is not a problem because it is obviously my responsibility to research the dozen available workarounds listed on internet forums, figure out which ones are not brand new footguns or genuine security risks, install sudo level programs from github that as the Warnings section on that repo confess "the daemon runs with super-user privileges and has full access to all private memory of all processes and sensitive user data;"

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!

Re: Linux 7.3 improves performance when running out of vRAM

#220
post #44

Earlier quoted context omitted.

I personally am very excited for the upcoming Windows 11 update which will allow users to move the taskbar to any edge of their screen.

I don't use windows too often, but I remember I was happy with an update a year or two ago which allows changing the volume by scrolling on the tray icon. Now, of course, it still doesn't work with a touchpad, but baby steps, right?

This feature has been was available on GNOME since forever. I'm still waiting for Microsoft to steal another nice thing: MRU (Most Recently Used) keyboard layout switching. If you have two often used keyboard layouts A and B, and less used layouts C, D, E, then pressing the switch shortcut once will switch between A and B without the need to cycle through C, D, E.
Post reply on HN