News for hackers. Stuff that matters.
Re:Do not buy RAM, compress by varenc on Thursday November 19, 2026 @11:13AM (#50562008)
[delayed]
Re:Do not buy RAM, compress by trollbridge on Thursday November 19, 2026 @11:42AM (#50562441)
Wait until people find out about swapping.
Re:Do not buy RAM, compress by Sharlin on Thursday November 19, 2026 @12:35PM (#50563224)
Paging to disk has also become vastly more transparent, and less of a last resort, with M.2 SSDs. No more things slowing down 10x and endless HD noise when out of RAM.
Re:Do not buy RAM, compress by _carbyau_ on Thursday November 19, 2026 @07:42PM (#50568673)
Is that transparency good though?

I was there man. I heard the constant HDD stuttering away. And it was a clear signal I had to go hunting for memory hogs.

If it happens in perfect silence and also doesn't slow your computer much then.. you wonder if some essential process is talking back and forth to the internet while your SSD wears down possibly for days on end?!?

Re:Do not buy RAM, compress by qball on Thursday November 19, 2026 @09:33PM (#50569455)
It's also something that Optane was basically purpose-built to solve, to the point of just shipping on DIMMs directly.

A shame it's dead.

Re:Do not buy RAM, compress by 8n4vidtmkvmk on Friday November 20, 2026 @12:48AM (#50570643)
Running out of VRAM and swapping to normal RAM still seems crazy expensive.
Re:Do not buy RAM, compress by bayindirh on Thursday November 19, 2026 @01:15PM (#50563802)
Oh we found out about it. In the old days, a machine with a load of 57380 (probably not the highest number I have seen) means the machine has run out of memory and started swapping heavily.

Fun days.

Now, we find out when the SSD wears out, in the worst case.

Re:Do not buy RAM, compress by Lerc on Thursday November 19, 2026 @03:47PM (#50566139)
How long does a wear leveling SSD take to fail if it is set to constantly write at it's fastest possible bandwidth?
Re:Do not buy RAM, compress by svnt on Thursday November 19, 2026 @04:48PM (#50566932)
Two weeks to six months, depending on the drive and the rate.
Re:Do not buy RAM, compress by ksec on Thursday November 19, 2026 @05:04PM (#50567104)
>constantly write at it's fastest possible bandwidth?

Not very long especially on modern consumer SSD. Depending on Drive size, at that speed we are talking about full drive write in ~5 to 10 min. On a 5-year warranty SSD that is about 1 - 2 weeks. We have tested Consumer SSD to last beyond their warranty. But even doubling that would only give you 2 - 4 weeks max.

Re:Do not buy RAM, compress by Lerc on Thursday November 19, 2026 @06:10PM (#50567871)
Ouch. Seems like there's a market for something between RAM and Flash in terms of price per bit and dynamic usage.

Volatile memory that was significantly slower than RAM but could be parallelised to wide pipes for wide bandwidth.

Maybe just more flash to allow for more redundancy. Even if flash only lasted a week it's only two or three orders of magnitude to allow for practically usable lifetimes.

A rather amusing idea would be to have a box containing 1024 MicroSDs with a 512 byte block write. Wire them in parallel and you could do a swap drive with 512k blocks with rather impressive bandwidth. Setting them to actively use 0.1% of their data space and wear level across the whole thing they should last a fair few years at full usage. If you were treating them purely as swap you could tune your data size and consider the flash as a consumable. A quick google suggests that RAM is 100x flash, and that micro-SD and SSDs are roughly comparable now at price per bit. Maybe the sweet spot is around 10x redundancy in storage capacity. Then for the price of RAM you could get 10x that in swap with a really big pipe. 10x and cleverness might be ok (reads dominating in real world usage, even for swap, error correction might be able to squeeze quite a lot out with redundancy space.

I look forward to a crazy youtuber making one.

Re:Do not buy RAM, compress by xarope on Thursday November 19, 2026 @06:55PM (#50568322)
an intel optane card will solve this for you, I'm still waiting to see if I should get one for an slog, but my home lab isn't write heavy enough for this
Re:Do not buy RAM, compress by ssl-3 on Friday November 20, 2026 @12:45AM (#50570622)
Optane is a fine choice for SLOG, but SLOG only helps with performance for synchronous writes.

And even then: It doesn't reduce RAM use. Sync writes that are ultimately bound for spiny-rust-disk still reside in RAM (in TXG) until they lands on rust.

SLOG is thus mostly write-only in practice.

The performance boost is that it returns as soon a sync write successfully is recorded on the SLOG device (but before it lands on rust), which can improve performance for things that are limited by sync write speed.

On reboot or remount or whatever, SLOG gets reviewed and outstanding sync writes (if any) are permanently committed to the pool. That's really the only time it gets read.

---

Should a person play around with SLOG for performance? Yeah, sure, especially if they've got processes that are being held back by bursty sync writes.

Small-ish Optane devices are still available inexpensively, so as far as tweaky homelab computer tricks go in 2026: It's a cheap way to play with something new.

And small can be fine. It depends on the workload.

(Double-extra bonus point for using a redundant pair of them, though.)

Re:Do not buy RAM, compress by ksec on Saturday November 21, 2026 @05:12AM (#50587746)
I mean unless there are some specific needs or bugs, most consumer usage simply dont blown out SSD in their life time. Even in cases with 8GB memory and Safari being still appalling with memory management on many tabs, you are at worst doing 100 - 200GB write per day. On a modern Mac with 16GB base memory, you could be doing 20 - 50GB write per day. Your SSD would easily last 10+ years.
Re:Do not buy RAM, compress by solyin on Saturday November 21, 2026 @05:15AM (#50587756)
Here's a bug that's relevant: https://github.com/openai/codex/issues/32496
Re:Do not buy RAM, compress by NekkoDroid on Thursday November 19, 2026 @07:38PM (#50568649)
I recently looked at my SSD health with crystal disk info and one of my SATA SSDs is rated for 150TBW and is currently at ~350TBW. It is currentlly at 56k hours power on.
Re:Do not buy RAM, compress by literalAardvark on Friday November 20, 2026 @01:01AM (#50570734)
One of my less proud moments was blowing half the life of a new datacenter ssd by forgetting to set limits on the burn in test and assuming it'd be fine like any other drive I ever tested.

Came back the next morning and was happy to find that the tests hadn't failed, unfortunately they had also gone far quicker than I had anticipated and had something silly like 2PB written.

Luckily the other half was more than plenty

Re:Do not buy RAM, compress by AnthonBerg on Friday November 20, 2026 @02:14AM (#50571196)
SSD has been retconned to stand for "Storage. Speedy. and… Disposable".

Kidding/not kidding.

I've come to regard SSDs as ephemeral. I stripe-RAID them in my workstation to sum their speed as well as their failure rate. (Which actually also distributes the wear, so…)

And then I use the combined speed and terror to kindle the motivational fire of getting a proper backup solution underneath it.

Re:Do not buy RAM, compress by bayindirh on Friday November 20, 2026 @03:00AM (#50571534)
It depends. I have seen consumer SSDs die in weeks, write oriented SSDs (Specifically designed to be LOG disks of Sun ZFS storage units) run for years under heavy load.

Currently we run some datacenter SSDs which handle constant load just fine, despite being TLCs.

I believe they really put some magic smoke in these chips, because the endurance numbers are just black art at this point. Even my system SSD, which is an EVO860 256GB shows its wear level at 33% after 44K hours.

My /home disk, a 980 Pro 2TB, shows 1% wear after 835 hours. That machine is on 24/7.

Re:Do not buy RAM, compress by trollbridge on Friday November 20, 2026 @07:15AM (#50573672)
That’s odd. Load averages usually aren’t high when swapping; swapping means the CPU isn’t busy.
Re:Do not buy RAM, compress by bayindirh on Friday November 20, 2026 @07:38AM (#50573853)
Try swapping a couple of high performance and multi-core jobs which makes tons of random read & write from RAM to a couple of SATA drives (you can use a good RAID adapter as well), and you'll have nice IOWAIT values pinned to 99%.

Give it some time and you'll see numbers you believe was impossible to display on the output of uptime command. (:

Re:Do not buy RAM, compress by dotancohen on Thursday November 19, 2026 @01:49PM (#50564398)
Why the downvotes? I also was thinking that's a perfect candidate for swapping to disk.
Re:Do not buy RAM, compress by hobo123 on Thursday November 19, 2026 @02:58PM (#50565442)
You can also combine both. Linux has zswap.
Re:Do not buy RAM, compress by dotancohen on Thursday November 19, 2026 @05:43PM (#50567566)
Tell me more. I'm on Debian, using mostly ext4 filesystems.
Re:Do not buy RAM, compress by hobo123 on Friday November 20, 2026 @12:29AM (#50570523)
Sorry, not familiar with details, I just know it's there.
Re:Do not buy RAM, compress by tmtvl on Friday November 20, 2026 @04:24AM (#50572206)
There's Chris Down's Debunking zswap and zram myths (<https://news.ycombinator.com/item?id=47500746>).

If you want to check out whether your system has zswap enabled, you can look at /sys/module/zswap/parameters/enabled, which will be 0 if zswap isn't enabled and 1 or Y if it is. You can look at the kernel docs (<https://docs.kernel.org/admin-guide/mm/zswap.html>) for more.

Re:Do not buy RAM, compress by dotancohen on Friday November 20, 2026 @02:28PM (#50580509)
Terrific, thank you, I will look into this.
Re:Do not buy RAM, compress by lproven on Friday November 20, 2026 @05:31AM (#50572746)
> Tell me more.

I tried to summarise hows and whys here, in case it helps:

https://www.theregister.com/on-prem/2026/03/13/ram-is-gettin...

Re:Do not buy RAM, compress by dotancohen on Friday November 20, 2026 @02:28PM (#50580502)
I will go over that, thank you.
Re:Do not buy RAM, compress by varenc on Friday November 20, 2026 @01:28PM (#50579502)
[delayed]
Re:Do not buy RAM, compress by davidkwast on Thursday November 19, 2026 @12:28PM (#50563111)
It's like having a room that shrinks everything to 1/5th of its size but you never come back to get anything. It will work until gets full.
Re:Do not buy RAM, compress by AnthonBerg on Friday November 20, 2026 @02:07AM (#50571146)
I… this is a surprisingly accurate metaphoric abstraction for narcissism. Long story. I mean it though.

Apologies for the off-topicness?

—This is in earnest. The brain does operate according to information theory, certainly has memory, and does compress things.

Re:Do not buy RAM, compress by davidkwast on Friday November 20, 2026 @07:54AM (#50574020)
Nice one
Re:Do not buy RAM, compress by 01HNNWZ0MV43FF on Thursday November 19, 2026 @12:56PM (#50563504)
If the user was feeling stochastic, the OS could theoretically just drop pages that haven't been accessed in, say, 2 days, and send the process a segfault if it tries to access them.

Thus solving memory leaks forever...

Re:Do not buy RAM, compress by bayindirh on Thursday November 19, 2026 @01:14PM (#50563770)
I believe one can create a kernel module called leaky_ram to make this possible. No?
Re:Do not buy RAM, compress by kccqzy on Thursday November 19, 2026 @03:52PM (#50566193)
No need for a kernel module. Create a FUSE filesystem in user space on which to create a swap file. Once any written block is more than 2 days old just discard it. When they are accessed give EIO. This IIRC translates to a SIGBUS signal in the process.
Re:Do not buy RAM, compress by JoshTriplett on Thursday November 19, 2026 @10:44PM (#50569885)
If you actually do this, make sure no use of that system ever reports a bug on any software they use, ever.
Re:Do not buy RAM, compress by cpeterso on Thursday November 19, 2026 @01:15PM (#50563792)
[delayed]
Re:Do not buy RAM, compress by cxr on Thursday November 19, 2026 @01:34PM (#50564137)
[delayed]
Re:Do not buy RAM, compress by kevincox on Thursday November 19, 2026 @01:41PM (#50564264)
This sounds like a bad idea. No one has logged in via SSH for a while so the daemon hasn't touched any pages (or only pre-auth relevant pages) then when you log in it gets killed. Or if someone sends a rarely used request to an HTTP server then it crashes accessing some data unique to that request.

Sure, they will get restarted, but not great.

Re:Do not buy RAM, compress by cxr on Thursday November 19, 2026 @02:24PM (#50564950)
[delayed]
Re:Do not buy RAM, compress by tadfisher on Thursday November 19, 2026 @04:27PM (#50566630)
You have described the current state of Android development if you want your app to stay alive and be useful without its GUI in the foreground. It is an insidious process that has essentially broken the OS more with each release, and broken apps that were mindful of battery usage but didn't pull the correct magical levers.
Re:Do not buy RAM, compress by braiamp on Thursday November 19, 2026 @08:49PM (#50569150)
"All means are fair except solving the problem"
Re:Do not buy RAM, compress by onjectic on Thursday November 19, 2026 @05:58PM (#50567756)
I think what they are saying is if OOM was going to kill the process anyways, it can defer this a bit and only fault on read or write on the rarely used memory.

So don’t change the OOM descision making, just the action taken.

I think the person below makes a good point though, that this encourages or permits buggy code.

Re:Do not buy RAM, compress by cwillu on Thursday November 19, 2026 @07:04PM (#50568370)
OOM triggers when memory pressure is critical; it's not practical to further defer addressing it at that point.
Re:Do not buy RAM, compress by onjectic on Friday November 20, 2026 @01:22PM (#50579394)
Huh? Defer addressing? The memory would be reclaimed in this scenario, it is entirely “practical” in that sense.
Re:Do not buy RAM, compress by cwillu on Friday November 20, 2026 @01:27PM (#50579479)
Defer /addressing/fixing/solving/ the problem.

If the oomkiller is running, it's too late to wait and see: some process or kernel thread needs memory that the kernel can't currently provide

Re:Do not buy RAM, compress by onjectic on Friday November 20, 2026 @01:31PM (#50579539)
No one said we were deferring fixing the problem. Memory is reclaimed. We would only be delaying or avoiding the part where the process is killed.
Re:Do not buy RAM, compress by dotancohen on Thursday November 19, 2026 @01:50PM (#50564422)
Or swap it to a less expensive medium, such as the SSD.
Re:Do not buy RAM, compress by TheSoftwareGuy on Thursday November 19, 2026 @01:56PM (#50564529)
That’s actually a very old idea, called paging or swapping. And it totally works
Re:Do not buy RAM, compress by dotancohen on Thursday November 19, 2026 @05:42PM (#50567552)
Yes, that is what I am referring to.
Re:Do not buy RAM, compress by ChoGGi on Friday November 20, 2026 @08:32AM (#50574407)
Gonna party like it's 1969, I love AI!

Not how I expected the next big optimization push, but I'll take it.

Re:Do not buy RAM, compress by InsidiousWombat on Thursday November 19, 2026 @03:55PM (#50566241)
I'd rather not have it waste write cycles

... but reading say libraries directly and only putting in RAM the parts often used, now we're talking

Re:Do not buy RAM, compress by dotancohen on Friday November 20, 2026 @02:27PM (#50580490)
You could page to an HDD too. Or /dev/null
Re:Do not buy RAM, compress by origini on Thursday November 19, 2026 @04:06PM (#50566364)
I thought about something similiar but more in context of applications like JVM based or go based tools which are loaded in memory and then do not touch certain memroy pages for ages anymore.

Apparently though, tracking pages and access and stuff would be very slow.

I continued thinking about it on how to structure go or jvm apps that you split it in processes so they are more bound to when they are needed and you unload parts of your tool/programm by just handing over the results from one process to the other and kill it.

Re:Do not buy RAM, compress by gpapilion on Thursday November 19, 2026 @06:41PM (#50568183)
I thought this is what Meta ended up doing, as well as making it very aggressive to push data into compressed memory on servers.
Re:Do not buy RAM, compress by varenc on Thursday November 19, 2026 @08:14PM (#50568919)
[delayed]
Re:Do not buy RAM, compress by chmod775 on Thursday November 19, 2026 @11:33PM (#50570211)
That would break about a billion kinds of daemons. For example it might take down dbus and various system daemons when you open your settings, because some stuff is only accessed then. It would likely also trivially crash cron, various audio daemons when rare functionality is accessed by a program or you switch the output, etc.

I have trouble thinking of a daemon this wouldn't break. It might break even a simple clipboard manager when you go back through the history.

Re:Do not buy RAM, compress by throw0101d on Friday November 20, 2026 @07:59AM (#50574091)
> If the daemon tries to access that memory, let it crash.

Why not just change Linux's vm.overcommit_memory to not allow overcommitting, so that when a daemon/process does a malloc() an error is returned and it can be handled right away?

Re:Do not buy RAM, compress by fl0ki on Thursday November 19, 2026 @03:46PM (#50566131)
The BackRAMs
Re:Do not buy RAM, compress by jedbrooke on Thursday November 19, 2026 @04:52PM (#50566967)
I discovered something similar when I tried to recreate a rudimentary version of the Billion Laughs Attack[0] on my macbook. It just compressed all the “ha”s so the 10 GB string only ever took a few MB

0: https://learn.microsoft.com/en-us/archive/msdn-magazine/2009...

Re:Do not buy RAM, compress by razster on Thursday November 19, 2026 @07:41PM (#50568665)
But why? Curious as to the reason. Fascinating though.
Re:Do not buy RAM, compress by jedbrooke on Friday November 20, 2026 @12:25AM (#50570502)
oh hah, I’m not a security researcher or anything. I was just a high schooler messing around with computers. The rudimentary version I tried was just doing something like this in the python repl

    a = “ha”
    b = 10 * a
    c = 10 * b
and so on and watching the memory climb in the activity viewer. I was surprised when the 10GB or even 100GB one (confirmed with len() ) didnt crash my 8GB laptop or even cause it to swap.

Interestingly I tried the python version just now on modern macos, currently activity monitor shows 192GB ram used, 184GB compressed, on a machine with 36GB physical.

Actually something really weird happened, zsh killed the python proc, activity monitor shows it still alive, but the physical ram value is bugged and showing 0 bytes physical and 1.7 GB swap. So compressing RAM does have some limitations.

Re:Do not buy RAM, compress by AnthonBerg on Friday November 20, 2026 @02:05AM (#50571130)
haha!!
Re:Do not buy RAM, compress by varenc on Friday November 20, 2026 @02:30PM (#50580541)
I had a similar experience, but with Apple's APFS on-disk file compression! I accidentally generated a log file that just contains 300+ million lines of the same message repeated constantly. The log file was supposedly over 100GB in size, but I hadn't noticed my disk filling up. I investigate more, and discovered that APFS had compressed the file on my disk!

Apple's on-disk file compression is very mysterious, hard look up, and harder to intentionally trigger. The only clue in the Finder GUI is comparing the file size vs size on disk. Using the 3rd party `afsctool` you can tell APFS to compress a file on disk manually, but I believe there's no native macOS way to do this. The official way is that macOS decides for mysterious reasons when to compress a file on disk and it rarely does. But apparently generating a 100GB log file with million of repeated lines is enough to convince macOS to use APFS compression. (and having a disk that's nearly full probably)

Re:Do not buy RAM, compress by oso2k on Thursday November 19, 2026 @09:39PM (#50569500)
Zram also became default in Fedora 33.
Re:Do not buy RAM, compress by wenc on Friday November 20, 2026 @09:38AM (#50575246)
[delayed]
Re:Do not buy RAM, compress by surajrmal on Friday November 20, 2026 @10:22AM (#50575963)
Apple chips have hardware offload for compression that allows for higher compression ratios without paying a substantial latency or power penalty. Android also does this, but with a less optimal compression ratio due to having to do it via CPU instructions.