Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you are on Linux you can 'download' some RAM. Enable zram, configure sysctl variables to make good use of it.

Note that it won't help you if your workload makes use of all your RAM at once.

If you have a bunch of stuff running in the background it will help a lot.

I get 2 to 3 compression factor at all times with zstd. I calculated the utility to be as if I had 20GB extra RAM for what I do.



Back in the day if you could find a deal on defective RAM (that wasn't going to degrade further?), Linux could be configured to avoid the defects. Unfortunately this isn't allowed with secure/UEFI boot.

https://www.gnu.org/software/grub/manual/grub/html_node/badr...


I helped someone turn that on because we still didn’t have full furniture sets in our houses and new memory was going to have to wait a couple paychecks.

Several times I set about trying to turn it on and found out a whole chip was fried and that means the 7th bit of every read was stuck, so nothing much you can do there.


That’s not particularly unique, Mac OS and Windows have had compressed memory for years. No fiddling with setting needed either.


On windows there is a compensation control in the form of start menu written in react that needs 7 msedgewebview processes to run so that you can search for an app.


It's not just that it's compressed - the OS is also intelligently handling which memory should be on hardware vs. virtual. Effectively a lot of the memory concerns have been offloaded to the OS and the VM where one exists.


Isn't that literally every modern OS, always, unless you tell it to act differently?


Yes - I didn't mean to imply it was only one of the OSes. Further up the comments people were talking about how memory efficiency is now more important but I was trying to make the point that with compression and virtual memory it still doesn't matter all that much even if memory is double the price.


If running low on memory seems to matter less now than it did a couple of decades ago, I'd rather say that's because fast SSDs make swapping a lot faster. Even though virtual memory and swapping were available even on PCs since Windows 3.x or so, running out of memory could still make multitasking slow as molasses due to thrashing and the lack of memory for disk cache. The performance hit from swapping can be a lot less noticeable now.

Of course compression being now computationally cheap also helps.


> No fiddling with setting needed either.

It's since become the default in several distributions, including Fedora.


On many modern distros (like Fedora) ZRAM is enabled by default. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: