by jiggawatts · 4y ago · 0 comments
"You're a consumer, you don't need error correcting memory! Only the upper class, I mean... your superiors... err.. sorry, enterprise customers need that feature. It's reserved for them, it is not for the likes of you."
Meanwhile AMD basically sells silicon by unit area. It's like buying gelato at the ice cream shop. You can ask for one scoop, two scoops, or three. You get to decide how hungry you are, that's it. There isn't a flavour with broken glass in it[1] served only to the working class stiffs, and with the glass-free gelato reserved only for the gentry.
[1] This is pretty much what a CPU without ECC is. It randomly crashes and corrupts your data. Look. Not every bite of ice cream has glass in it! There's very little glass in the ice cream. It's super rare, and Intel Pty Ltd tells you that this is an acceptable amount of risk for you to take, because you aren't as important as other people.
I use ECC RAM in systems with error counters.
Error correction is an extremely rare event, if it happens at all. This idea that non-ECC computers are crashing all the time due to memory errors isn’t true. I've also had unstable systems with ECC RAM and no error correction events, so it's not a magic bullet.
You can run something like memtest86 for days on end. You shouldn’t see any errors at all, unless your memory is bad.
The reality is that the average consumer doesn’t really want to pay the extra amount for ECC RAM. As you said, ECC has been available on AMD consumer platforms for a long time and there’s barely any uptake outside of people building servers and workstations with consumer-grade AMD CPUs.
The AMD (Consumer) ECC story isn’t perfect, either. It’s not officially supported so there’s a lot of debate around whether or not it’s actually working on certain consumer motherboards. It’s definitely not equivalent to the official ECC support of their higher-end parts.
Intel, on the other hand, actually did roll out a lot of i3 processors with full, official ECC support. These are (or were) a favorite for low-cost servers for this reason. It worked well and the support was great.
The extra cost for ECC is basically noise in the cost of a desktop system. I buy unbuffered ECC DIMMs for my AMD systems and they're basically maybe 5-10% more than a non-ECC DIMM. The SSD premium is more than that. Registered DIMMs have a higher premium mostly because they need to have additional ICs on the DIMM to handle the higher memory capacities that servers tend to support.
I really wish CPU vendors would just flat out require ECC on every system shipped. Knowing that main memory is failing would save so much time speaking as someone who has encountered DIMM failures in otherwise stable systems. Days of debugging what turns out to be a hardware issue is no fun.
I'm going to claim it wasn't entirely my fault. ARCnet did automatic resends for you so if fixed what the CRC detected, and silently what it didn't detect through. I had no idea the errors were happening.
ECC is nice, but as you say I don't need fancy hardware to correct a malfunctioning RAM chip. I can do that perfectly well with a hammer. What I need is the hardware to tell when and where to deploy the hammer. Things were actually better 30 years ago - back then PC RAM had parity. It's cheap, fast and effective enough. I have no idea what went wrong.
The likelihood that a RAM error is corrupting data silently is slim, given the same corruption could affect the RAM storing the OS kernel or your application stack.
If you have bad non-ECC RAM, you will notice issues that warrant further investigation (i.e. memtest). But that assumes you're savvy enough to understand what failing memory looks like.
Furthermore, your comment reads like someone that has never spent weeks debugging issues that only happen under extreme load stress tests. A single marginal bit is not so simple to track down when memory allocation patterns are non-deterministic. I have no desire to go through that again if it can be avoided by spending an extra $20 per DIMM. My time is worth more than that. Hardware is not perfect, and anyone who trusts hardware blindly should really take a look at what's going on behind the curtain.
Fwiw, the nature of DRAM errors is different now compared to the studies published decades ago when cosmic rays would only disturb a single cell. These days minute physical manufacturing defects and electrical disturbances are the dominant failure modes. Educate yourself: read the papers published about row hammer. Hammering a row with reads can flip bits in adjacent rows, and even DRAMs that have supposed mitigation features can suffer from disturbances a row or two further away. It has already been proven that the DRAM vendors' hardware cannot be trusted! What more proof do you need that this is a real world requirement in 2021?
Where? Are you talking DDR4-3200? These are 40-50% higher than non-ECC UDIMMs. It usually gets worse as capacity increases. Additionally, there are only one or two models of 1x32GB UDIMM in production. These sticks are quite rare. You don't just go to Newegg or Amazon unless you want to pay out the arse for them. And in addition to that, ECC has worse timings which are important for Ryzen.
> Registered DIMMs have a higher premium
You have this backwards. RDIMM are common and cheaper because that's what servers generally use. UDIMM ECC cost more because, well, they barely exist as a thing.
BankGroupSwap: Disabled BankGroupSwapAlt: Enabled Memory Clock: 1800 MHz GDM: Enabled CR: 1T Tcl: 18 Tras: 39 Trcdrd: 22 Trcdwr: 22 Trc: 83 Trp: 22 Trrds: 5 Trrdl: 9 Trtp: 14 Tfaw: 38 Tcwl: 18 Twtrs: 5 Twtrl: 14 Twr: 26 Trdrddd: 4 Trdrdsd: 5 Trdrdsc: 1 Trdrdscl: 5 Twrwrdd: 6 Twrwrsd: 7 Twrwrsc: 1 Twrwrscl: 5 Twrrd: 3 Trdwr: 9 Tcke: 0 Trfc: 630 Trfc2: 468 Trfc4: 288
Yes, they are somehow really hard to get in the US for decent pricing, but in the EU they are quite affordable (according to geizhals.eu ).
"Studies by IBM in the 1990s suggest that computers typically experience about one cosmic-ray-induced error per 256 megabytes of RAM per month"
https://en.wikipedia.org/wiki/Cosmic_ray#Effect_on_electroni...
But these weren't just cosmic-ray-induced errors. The DIMMs with errors were far more likely to have more errors in the future, pointing to faulty memory cells.
"About a third of all machines in the fleet experience at least one memory error per year"
"The median number of errors per year for those machines that experience at least one error ranges from 25 to 611."
The parent comment saying that they never see ECC errors in the wild is missing a few things:
- Server memory tends to be clocked lower than consumer memory, so errors are less frequent to begin with.
- The errors are not evenly distributed. Some memory sticks have a high error rate, others are virtually zero. There's batch-to-batch variations.
- I've done my own tests on hundreds of servers. We run burn-in tests for about 24-48 hours. About 95% have zero errors of any kind, but 5% have a high enough rate that putting them into production would be a mistake. ECC allows us to catch those bit errors instead of silently accepting them and allowing data corruption to creep in.
- I've personally had 3 different personal computers experience high memory error rates, to the point of multiple BSODs per day and data corruption. They all started off "good" and slowly turned "bad". The only reason I knew to look for memory corruption as the root cause is because of my extensive industry experience. A grandma using the same PC would have just blamed Windows for being unstable.
- Vendors like Microsoft simply ignore all crash error reports sent back by telemetry with only 1 or 2 samples, because those are virtually guaranteed to be caused by memory corruption, not programmer error. I've done similar memory dump collection and found that easily 30% of all crashes were unique in this way, suggesting that ECC memory could improve PC stability significantly.
- Suggesting that ECC memory is not needed because "good" memory doesn't need it and only "bad" memory is a problem is missing the point. All memory is bad, it's just that the bit error rates are different!
Eventually I got a corruption in a large Git repository with photos. First I suspected a disk error but reruns of "git fsck" reported different bad objects, run to run. How odd, so I ran memtest86 and it reported a bad 32 MB memory region at offset 4 GB. Never saw any kernel issues or other instability. Booting up the computer does not use up 4 GB of memory (Linux) but starting a bloated web browser does.
The computer is stable after mapping away the bad memory region by using GRUB_BADRAM. That was an new takeaway for me, a machine with ECC memory can do this bad blocks mapping automatically. It's not just beneficial in correcting single bit errors.
I would love to have ECC memory in my machine. I used it for my previous build in 2012 but I think the situation has gotten worse since then. Bigger price difference and ECC memory is not even available at the same clocks as non-ECC memory.
It's true that ECC will catch errors caused by cosmic rays, but in practice most memory errors are just from faulty memory. Large studies in Google datacenters showed that the errors were heavily concentrated in a small number of DIMMs: http://www.cs.toronto.edu/~bianca/papers/sigmetrics09.pdf
The catch is that you don't really know if you have one of these faulty memory sticks. I always run memtest86 overnight to check for obviously faulty memory, but some of these errors could take months to manifest.
I had a laptop with a RAM cell that failed. It would show up in memtest86 in a matter of minutes, yet surprisingly I didn't notice the issue for a very long time in day to day usage. I always wonder if there were random bit flips in anything I worked with during that period, but I'll never know.
With ECC, it's just one less thing to worry about.
Without ECC any of the above will crash an app, or even the entire machine. With ECC you'll get a log message, and if it's a single bit error it will be automatically repaired. If it's not fixable and it's in userspace that application is killed (and the kernel logs the error), if it's in kernel space the kernel will panic.
So generally it makes your machine more reliable, and easier to debug. Generally repeated errors are a fault of some kind and you can easily tell which dimm it is. Without ECC you end up troubleshooting all causes of crashes, and even if you know it's memory, you can't be sure which dimm it is.
So I think it's well worth the minimal premium to make your machine more reliable, and if it's unreliable it's much easier to track and fix the problem.
Amusingly without ECC heavy CPU use with parallel gcc compiles causes a particular error. Not sure if it's in the FAQ, but it's well know that the particular error means you have a CPU/RAM problem, common with memory errors, CPUs that are too hot, or overclocked CPUs.
Sidenote I seem to have experienced Cunningham's Law for the first time semi-consciously, as I was aware my claim is most probably wrong. Still, I wonder if data corruption is a more common scenario rather than crashing, because ever since I use Linux I don't recall experiencing many crashes I couldn't attribute to a driver issue or known instability in the software I used, especially on compatible hardware. Windows days were another story... But maybe the memory modules were worse back then and perhaps having less memory made it more likely to crash?
There are some bugs that get raised on linux once every few years that are so obscure they are suspected to be random memory errors.
your systems must all be running at sea level.
Just about every company in the world that sells things (including AMD) engages in market segmentation.
A classic - https://www.joelonsoftware.com/2004/12/15/camels-and-rubber-...
It has nothing to do with the "class of person" -- that whole notion seems pejorative in this context -- but maximizing how much you can extract in the aggregate.
In the case of Intel, for years (decades?) they were their own primary competitor. They wanted to be sure that for a given customer they could extract the maximum amount possible, and they did this by gating some features (ECC, AVX, etc) to try to avoid business customers deciding to get by on "lesser" processors. And the simple truth is that the overwhelming bulk of consumer products will never, ever have an ECC relevant error event, which is how businesses managed to get by without it.
AMD does the same thing too. Ryzen APUs don't have (even unofficial) ECC support, except if you pony up for a Ryzen Pro one.
(and so do many other SoC providers...)
I've been expecting them to just simplify to a core count/memory channel/socket matrix for a while because they are so close. There really isn't any reason these days to segment by frequency beyond maybe a couple golden parts where all the cores run at the peak frequency.
For Ryzen CPUs (ones without an iGPU), they don't fuse it off, and as such it can unofficially work.
For Ryzen APUs (parts with an iGPU), they fuse it off, and as such it will never work there.
My PC doesn't have ECC memory and it isn't crashing and corrupting my data. I think you are vastly over exaggerating.
Generally by the time you see actual program crashes or notice data corruption your system is really good and screwed. That is part of why people in the know are so afraid of RAM corruption. It can be persisted and exist silently for a very long time before someone tries reading some file/transaction that was corrupted during a write years back, or the database suddenly starts crashing after it updates some index as part of a GC pass/whatever, while the actual bug/HW failure will never be reproduced.
Problem is if you start having unreliable hardware it could be any component of your system. ECC memory helps track down a class of errors that could be in the ram chip, dimm, dimm socket, motherboard, CPU socket, or CPU.
My desktop cost another $100 or so because I got a E3-1230 xeon instead of the similar clocked i7. I bought it in 2015 and it's been fast, and reliable. Sure I might manage 6 month uptimes anyways, but I also might track down a dimm problem in hours instead of weeks.