News for hackers. Stuff that matters.
Re:ECC matters by nostrademons on Sunday January 03, 2021 @01:29PM (#25623764)
I still remember Craig Silverstein being asked what his biggest mistake at Google was and him answering "Not pushing for ECC memory."

Google's initial strategy (c. 2000) around this was to save a few bucks on hardware, get non-ECC memory, and then compensate for it in software. It turns out this is a terrible idea, because if you can't count on memory being robust against cosmic rays, you also can't count on the software being stored in that memory being robust against cosmic rays. And when you have thousands of machines with petabytes of RAM, those bitflips do happen. Google wasted many man-years tracking down corrupted GFS files and index shards before they finally bit the bullet and just paid for ECC.

Re:ECC matters by ksec on Sunday January 03, 2021 @03:58PM (#25625191)
>I still remember Craig Silverstein being asked what his biggest mistake at Google was and him answering "Not pushing for ECC memory."

Did they ( Google ) or He ( Craig Silverstein ) ever officially admit it on record? I did a Google search and results that came up were all on HN. Did they at least make a few PR pieces saying that they are using ECC memory now because I dont see any with searching. Admitting they made a mistake without officially saying it?

I mean the whole world of Server or computer might not need ECC insanity was started entirely because of Google [1] [2] with news and articles published even in the early 00s [3]. And after that it has spread like wildfire and became a common accepted fact that even Google doesn't need ECC. Just like Apple were using custom ARM instruction to achieve their fast JS VM performance became a "fact". ( For the last time, no they didn't ). And proponents of ECC memory has been fighting this misinformation like mad for decades. To the point giving up and only rant about every now and then. [3]

[1] https://blog.codinghorror.com/building-a-computer-the-google...

[2] https://blog.codinghorror.com/to-ecc-or-not-to-ecc/

[3] https://danluu.com/why-ecc/

Re:ECC matters by djur on Sunday January 03, 2021 @08:22PM (#25626997)
Your [3] has a footnote quoting a Google book that reads "Modern DRAM systems are a good example of a case in which powerful error correction can be provided at a very low additional cost... The following machine generation at Google did include memory parity detection, and once the price of memory with ECC dropped to competitive levels, all subsequent generations have used ECC DRAM"
Re:ECC matters by ksec on Tuesday January 05, 2021 @05:54AM (#25644200)
Well They made a big deal out of it and lots of PR out of not having use ECC, and only quietly adding back ECC and listed it out in a book that barely any one reads.
Re:ECC matters by sitkack on Sunday January 03, 2021 @08:56PM (#25627198)
The fact that ECC isn't the default across everything is a failure of human cognition and Capitalism.
Re:ECC matters by jandrese on Sunday January 03, 2021 @09:57PM (#25627513)
I have always been angry that ECC was treated as an "enterprise" feature and increased the price way more than it should have.
Re:ECC matters by buran77 on Monday January 04, 2021 @04:49AM (#25629308)
It's treated as enterprise because most regular users had no realistic reason to care about it. The practical consequences of not having this on your phone or home PC are completely invisible for the vast majority of people. Because of this and the fact that in the consumer space prices matter most the situation is quite expected.
Re:ECC matters by behringer on Monday January 04, 2021 @11:16AM (#25633268)
Users most definitely want it. They just aren't technically literate enough to know about it.

Hello user, for an extra 10 dollars, would you like to guarantee that cosmic radiation never affects your computing experience, including having to reformat, reinstall, or otherwise reboot your phone/computer randomly when one day something just doesn't work anymore?

Was it an update? Was it cosmic radiation? Was it a bad capacitor? Who knows!

Why do you think so many problems are solved by rebooting? Sure 99 out of 100 might be software bugs, but the other 1 out of 100 is straight up cosmic radiation, and that 1 percent is growing more and more every year as software becomes more robust and bug free with better tooling.

Re:ECC matters by buran77 on Monday January 04, 2021 @11:56AM (#25634036)
Indeed, users don't know enough to care but more than that, for most users this is simply not a problem because they haven't been practically affected. Most may never experience a bit flip, and most of the flips won't be obvious anyway (e.g. no visible effect).

So your hypothetical dialogue will sound more like a scam to a regular user. You're charging money to tackle a problem they don't have or see, only addressing a single one of the root causes that trigger that same result, and in the end you're not even completely fixing it, just reducing the already infinitesimal odds it happens.

It will become mainstream when manufacturers just decides to include it everywhere and not really give the user a choice. Apple is a prime candidate for a company with enough clout to afford this.

Re:ECC matters by behringer on Monday January 04, 2021 @12:32PM (#25634801)
My point is, they have been affected. I think most people have seen bitflips.

>2009 Google's paper "DRAM Errors in the Wild: A Large-Scale Field Study" says that there can be up to 25000-75000 one-bit FIT per Mbit (failures in time per billion hours), which is equal to 1 - 5 bit errors per hour for 8GB of RAM after my calculations. Paper says the same: "mean correctable error rates of 2000–6000 per GB per year".

https://stackoverflow.com/questions/2580933/cosmic-rays-what...

I believe bitflips are far more common than people realize. I see weird shit all the time from my users that is only explainable due to bizarre software bugs or bitflips.

Re:ECC matters by Dylan16807 on Monday January 04, 2021 @09:56PM (#25641507)
Bit flips are reasonably common, but mean is of very little use when one stick can throw no errors and another stick can throw thousands. A more useful quote is "About a third of machines and over 8% of DIMMs in our fleet saw at least one correctable error per year."
Re:ECC matters by buran77 on Monday January 04, 2021 @01:15PM (#25635519)
But behringer, regular users don't see bitflips, they see "a random error", a random reboot, a random green pixel in a photo. That's if they even consciously observed anything at all. You yourself said those could have a dozen other root causes. I for one have not actually observed a bitflip (so something that I can actually consciously detect as an issue) in a decade. No unexpected reboots, no unexpected file corruption, etc., nothing that made me say "weird, must be some memory corruption".

Don't get me wrong, I'm all for ECC memory, I practically showed the value of ECC after intentionally running the same multi-day Matlab job several times on a non-ECC machine with different results just to prove this very point. But you use your deeper knowledge to assume what someone with shallow knowledge and interest wants or needs, and that will almost always be off mark. Your car does not have a roll cage. Normal computers do not have ECC memory.

Re:ECC matters by projct on Monday January 04, 2021 @02:56PM (#25636965)
"Your car does not have a roll cage" No but the crash structures are one of the areas where we are absolutely trying to recreate the effect of a rollcage without the weight. The weight putting constraints on fuel efficiency is the big issue there.

For ECC, there's no reason to really expect that adding ECC to everything would really make things too expensive or slow long term. For a long time the reason why desktops did not have ECC was pretty much because intel wanted people who really need ECC to buy Xeons.

Re:ECC matters by buran77 on Tuesday January 05, 2021 @03:35AM (#25643438)
> No but the crash structures are one of the areas where we are absolutely trying to recreate the effect of a rollcage without the weight

Exactly like how we try to recreate the effect of ECC hardware but without its "weight" (cost, complexity). For a problem that's not nearly as visible or life and death.

> too expensive or slow long term

Not "too" expensive long term still means more expensive especially short term, like when the person buys it. For an issue no average consumer is actually frustrated about. Why are we still debating why those consumers don't care about ECC? How is it different from hot swappable RAM for the average Joe? They'll upgrade or expand their RAM more often than they'll get frustrated about the effect of bitflips. So why not have hot swappable memory? Because as much as I'd love hot swappable anything, regular consumers neither care about it nor want to pay for it.

Re:ECC matters by smegger001 on Friday January 08, 2021 @10:17AM (#25685483)
>So your hypothetical dialogue will sound more like a scam to a regular user. You're charging money to tackle a problem they don't have or see,

I don't know the same argument could be made and ecc be swapped with surge protectors and people still purchase those.

Re:ECC matters by sneak on Sunday January 03, 2021 @11:45PM (#25627990)
I feel this way about all software.
[dead]
Re:ECC matters by klodolph on Monday January 04, 2021 @03:11AM (#25628793)
Just because capitalism fails to provide something does not mean that communism would solve the problem, or that criticism of capitalism as a system is uncalled for. This is not some kind of binary capitalism/communism world we live in.
Re:ECC matters by shrewduser on Monday January 04, 2021 @06:53AM (#25630188)
i'm just struggling to find the link between capitalism and ECC memory.
Re:ECC matters by eptcyka on Monday January 04, 2021 @07:46AM (#25630601)
It's the act of maximizing profits by segmenting the market that creates artificially bad products that end up being the mainstream because of the price difference. If the companies responsible for making these decisions were optimizing just a tad bit more for practicality and usability rather than just profit, ECC would be the standard and that would be the end of that. Similar to how a lot of luxury and non-luxury cars will have seemingly essential and cheap equipment only available as part of an expensive options package - the cost of producing and installing the extra equipment is a mere fraction of the total package cost, a large majority will end up buying the package anyway (and 100% would if money was no object). One might argue that this practice is part and parcel of modern industrial markets, and is almost fair - prices are arbitrary and consumers get to pay for the value they get out of something, there is no optimal, moral way to determine what someone's margins should be, yadda yadda. In my opinion, usually the market will choose what are acceptable margins on a given product and/or service, but with 2 thousand dollar parking sensors and double-the-price ECC memory, with artifical segmentation, I'm paying not for the manufacturing and delivery of a product with a feature I want, but instead I'm having to pay for the opportunity of being able to have the product with the features I want + the manufacturing and delivery.
Re:ECC matters by DaiPlusPlus on Monday January 04, 2021 @09:49AM (#25631971)
> double-the-price ECC memory

I was buying DDR4 RAM last week and the cost for a 4x8GB ECC+Registered DDR4 3200 RAM kit for a Xeon W build I’ll be doing soon was about 5% more expensive than for a kit of otherwise identical RAM kit for a non-ECC Core i7 rig - which also came with tacky RGB LED heatspreader - about $230 in total for each of them.

The fact the pricing was so similar does make me wonder about the claims that non-ECC RAM is really ECC RAM just without the CPU/MMU being made aware of it - I think that’s possible if the RAM is already Buffered/Registered.

Re:ECC matters by eptcyka on Monday January 04, 2021 @10:29AM (#25632516)
Oh wow, the prices have normalized a bit - about 18 months ago I had to pay about twice the money to get 64 gigabytes of ECC goodness.
Re:ECC matters by Dylan16807 on Monday January 04, 2021 @09:59PM (#25641532)
> The fact the pricing was so similar does make me wonder about the claims that non-ECC RAM is really ECC RAM just without the CPU/MMU being made aware of it - I think that’s possible if the RAM is already Buffered/Registered.

Who claims that? And can't you just count the chips?

Re:ECC matters by versteegen on Monday January 04, 2021 @07:38AM (#25630534)
Market segmentation.
Re:ECC matters by rcoveson on Monday January 04, 2021 @04:56PM (#25638780)
There is no link. Segmentation of ECC support was an Intel decision which other chip manufactures have copied to a greater or lesser extent. For what it's worth, ECC support is spotty in Chinese-designed chips as well.

Intel's decision could just as well have been made by a socialist government's regulatory body (in the form of "minimum requirements for consumer chip" legislation), or by a committee of decision makers in an employee-owned company. We may never know, because we only have 2-4 data points and they're all basically capitalist.

Honestly, I'm not sure it was intended to be a serious comment. It could just as easily have been "...failure of human cognition and Obama."

Re:ECC matters by starfallg on Sunday January 03, 2021 @03:10PM (#25624788)
Recent advances have blurred the lines a bit. The ECC memory that we all know and love is mainly side-band EEC, with the memory bus widened to accommodate the ECC bits driven by the memory controller. However as process size shrink, bit flips become more likely to the point that now many types of memory have on-die EEC, where the error correction is handled internally on the DRAM modules themselves. This is present on some DDR4 and DDR5 modules, but information on this is kept internal by the DRAM makers and not usually public.

https://semiengineering.com/what-designers-need-to-know-abou...

There has been a lot of debate regarding this that was summarised in this post -

https://blog.codinghorror.com/to-ecc-or-not-to-ecc/

Re:ECC matters by wtallis on Sunday January 03, 2021 @07:40PM (#25626757)
> This is present on some DDR4 and DDR5 modules, but information on this is kept internal by the DRAM makers and not usually public.

On-die ECC is going to be a standard feature for DDR5. I'm not aware of any indication that anyone has implemented on-die ECC for DDR4 DRAM, and Hynix at least has made clear statements that on-die ECC is new for their DDR5 and was not present in their DDR4.

Re:ECC matters by starfallg on Sunday January 03, 2021 @10:15PM (#25627603)
Re:ECC matters by tyoma on Sunday January 03, 2021 @03:01PM (#25624691)
Figure this is as good of a time as any to ask this:

There are many various DRAMs in a server (say, for disk cache). Has Google or anyone who operates at a similar scale seen single bit errors in these components?

Re:ECC matters by bsder on Sunday January 03, 2021 @05:28PM (#25625820)
This is as old as computing and predates Google.

When America Online was buying EV6 servers as fast as DEC could produce them, they used to see about about 1 double bit error per day across their server farm that would reboot the whole machine.

DRAM has only gotten worse--not better.

Re:ECC matters by gh02t on Sunday January 03, 2021 @03:31PM (#25624941)
The supercomputing community has looked at some of the effect on different parts of the GPU.

https://ieeexplore.ieee.org/abstract/document/7056044

Re:ECC matters by sitkack on Thursday January 07, 2021 @01:20AM (#25667868)
Yes.

Bit flips (for all reasons) occur in buses, registers, caches, etc. Anything that has state can have state changed incorrectly.

This is why filesystems like ZFS exist and storage formats have pervasive checksums.

Re:ECC matters by itisit on Monday January 04, 2021 @01:46AM (#25628456)
New Yorker article that credits Jeff Dean and Sanjay Ghemawat with discovering the company’s bitflip issue:

https://www.newyorker.com/magazine/2018/12/10/the-friendship...

Re:ECC matters by grishka on Sunday January 03, 2021 @06:19PM (#25626230)
I remember reading how someone registered some google domains with a single bit flipped, and saw actual requests coming to them.
Re:ECC matters by andrewstuart2 on Sunday January 03, 2021 @06:22PM (#25626263)
If you or anybody can remember the source article, that sounds like an interesting read!

Edit: found one with a quick search. https://nakedsecurity.sophos.com/2011/08/10/bh-2011-bit-squa...

And https://www.researchgate.net/publication/262273269_Bitsquatt...

Re:ECC matters by garaetjjte on Sunday January 03, 2021 @06:29PM (#25626313)
Here's original paper: http://media.blackhat.com/bh-us-11/Dinaburg/BH_US_11_Dinabur...

But I'm not entirely convinced that most of these requests weren't just typos. Though those requests with mismatched Host header surely were true bitflips.

Re:ECC matters by tyoma on Sunday January 03, 2021 @09:39PM (#25627430)
There was some follow up work as well: http://blog.dinaburg.org/2013/09/bitsquatting-at-defcon21-an...

And I am beyond certain they were not typos; the requests were for long URLs that no one would be typing by hand. A few were for services that humans never enter urls into (like the Windows crash reporter).

Re:ECC matters by fart32 on Monday January 04, 2021 @12:54AM (#25628271)
Also here: https://www.youtube.com/watch?v=gXY3jm34RFU

I can't find it right now, but I also saw someone doing this with some version of Google Now (or what it was back then) and serving different assets into it.

Re:ECC matters by Faaak on Monday January 04, 2021 @03:56AM (#25629012)
A long time ago I did that with "CDN" domains. I bought ~10 of them (variations of fbcdn, akamai, and ytimg). I _did_ see some traffic (some hits per hour if I remember well), and many of them were from cheap handheld phones (from the user-agent).
Re:ECC matters by NickNameNick on Sunday January 03, 2021 @06:23PM (#25626268)
That works for any domain that's busy enough.

Random bit flips happen on client machines and on routers.

If there are enough requests for a domain name, some of those requests will be subject to one one of those bit-flips.

Re:ECC matters by saagarjha on Sunday January 03, 2021 @06:23PM (#25626270)
That might just be typos in some cases?
Re:ECC matters by gigatexal on Sunday January 03, 2021 @02:14PM (#25624213)
I mean early on sure at a startup where you’re not printing money I can see how saving on hardware makes sense. But surely you don’t need an MBA to know that hardware will continue to get cheaper whereas developers and their time will only get more expensive: better to let the hardware deal with it than to burden developers with it ... I’d have made the case for ECC but hindsight being what it is ...
Re:ECC matters by colejohnson66 on Sunday January 03, 2021 @02:34PM (#25624417)
But if you can save $1M+ now, then throw the cost of fixing it onto the person who replaces you, why do you care? You already got your bonus and jumped ship.
Re:ECC matters by gigatexal on Sunday January 03, 2021 @06:24PM (#25626278)
Such a short sighted incentivisation structure harms the business in the long run I think.
Re:ECC matters by finiteloop on Monday January 04, 2021 @01:13AM (#25628336)
One of the best quotes in the Google quotes file an early Googler maintained (I am sure I am screwing it up):

“I’ve heard of defensive programming, but never adversarial memory.” — Ben Gomes

Re:ECC matters by fragmede on Monday January 04, 2021 @02:04AM (#25628513)
Close!

> I've never thought of defensive programming in terms of adversarial memory.

Re:ECC matters by maria_weber23 on Sunday January 03, 2021 @02:01PM (#25624068)
ECC memory can't eliminate the chances of these failures entirely. They can still happen. Making software resilient against bitflips in memory seems very difficult though, since it not only affects data, but also code. So in theory the behavior of software under random bit flips is well... Random. You probably would have to use multiple computers doing the same calculation and then take the answer from the quorum. I could imagine that doing so would still be cheaper than using ECC ram, at least around 2000.

Generally this goes against software engineering principles. You don't try to eliminate the chances of failure and hope for the best. You need to create these failures constantly (within reasonable bounds) and make sure your software is able to handle them. Using ECC ram is the opposite. You just make it so unlikely to happen, that you will generally not encounter these errors at scale anymore, but nontheless they can still happen and now you will be completely unprepared to deal with them, since you chose to ignore this class of errors and move it under the rug.

Another intersting side effect of quorum is that it also makes certain attacks more difficult to pull off, since now you have to make sure that a quorum of machines gives the same "wrong" answer for an attack to work.

Re:ECC matters by giantrobot on Sunday January 03, 2021 @02:46PM (#25624537)
I don't think ECC is going to give anyone a false sense of security. The issue at Google's scale is they had to spend thousands of person-hours implementing in software what they would have gotten for "free" with ECC RAM. Lacking ECC (and generally using consumer-level hardware) compounded scale and reliability problems or at least made them more expensive than they might otherwise had been.

Using consumer hardware and making up reliability with redundancy and software was not a bad idea for early Google but it did end up with an unforeseen cost. Just a thousand machines in a cosmic ray proof bunker will end up with memory errors ECC will correct for free. It's just reducing the surface area of "potential problems".

Re:ECC matters by Animats on Sunday January 03, 2021 @05:14PM (#25625733)
consumer hardware...

That's Intel's PR. Only "enterprise hardware", with a bigger markup, supports ECC memory. Adding ECC today should add only 12% to memory cost.

AMD decided to break Intel's pricing model. Good for them. Now if we can get ECC at the retail level...

The original IBM PC AT had parity in memory.

Re:ECC matters by giantrobot on Sunday January 03, 2021 @06:54PM (#25626470)
When I said consumer hardware I was meaning early Google literally using consumer/desktop components mounted on custom metal racks. While Intel does artificially separate "enterprise" and "consumer" parts, there's still a bit of difference between SuperMicro boards with ECC, LOM features, and data center quality PSUs and the off the shelf consumer stuff Google was using for a while.

I don't know if AMD really intended to break Intel's pricing model. Their higher end Ryzen chips you'd use in servers and capital W Workstations don't seem to have a huge price difference from equivalent Xeons. Even if they're a bit cheaper you still need a motherboard that supports ECC so it seems at first glance to be a wash as far as price.

That being said if I was putting together a machine today it would be Ryzen-based with ECC.

Re:ECC matters by jfim on Sunday January 03, 2021 @06:03PM (#25626127)
> Now if we can get ECC at the retail level

You can actually, most AMD consumer chips (except the ones with integrated graphics) have ECC support, even though it's not officially supported. See this Reddit thread for more details: https://www.reddit.com/r/Amd/comments/ggmyyg/an_overview_of_...

Re:ECC matters by esgwpl on Sunday January 03, 2021 @09:23PM (#25627345)
Small nit, the PRO version of Ryzen APUs do support ECC[0], also ASRock has been quoted saying that all of their AM4 motherboards support ECC, even the low end offerings with the A320 chipset.

[0] https://www.asrock.com/mb/amd/a320m-hdv%20r4.0/index.asp#Spe...

Re:ECC matters by Animats on Sunday January 03, 2021 @06:43PM (#25626408)
The CPU chip can do it. Some motherboards bring out the pins to do it, but they're often called "workstation" boards and cost 2x the price of a standard desktop motherboard. ECC memory itself is overpriced. $60 for 16 GB DDR4 without ECC, $130 for 16 GB DDR4 with ECC.

This is the legacy of Intel's policies.

Re:ECC matters by buran77 on Monday January 04, 2021 @05:03AM (#25629414)
Because if you give consumers a choice between having ECC or LEDs on otherwise identical boards with identical price, most will go for the LEDs. In reality the price isn't even the same because ECC realistically adds to the BOM (board, modules) more than LEDs do. So the price goes up with seemingly no benefit for the user.

As such features that are unattractive to the regular consumer go into workstation/enterprise offerings where the buyer understands what they're buying and why.

Re:ECC matters by Dylan16807 on Monday January 04, 2021 @10:01PM (#25641548)
> Because if you give consumers a choice between having ECC or LEDs on otherwise identical boards with identical price, most will go for the LEDs.

Citation needed.

I would bet that your typical ram-purchasing consumer is not seeing or even considering the existence of the ECC model.

> ECC realistically adds to the BOM (board, modules) more than LEDs do. So the price goes up with seemingly no benefit for the user.

LEDs are a great opportunity to increase profit margin, so I'm not sure about your price conclusions.

Re:ECC matters by buran77 on Tuesday January 05, 2021 @03:28AM (#25643404)
That's pretty much exactly my conclusion

> Citation needed.

It really isn't. It was a hypothetical choice between 2 models, with ECC or LEDs, at the same price. Hypothetical because most boards don't offer the ECC support at all, and certainly not at the same price.

> LEDs are a great opportunity to increase profit margin, so I'm not sure about your price conclusions

You confused manufacturing costs, price of the product, and profit margins. LEDs cost far less to integrate than ECC but command a higher price premium (thus better profit margins) from the regular consumer. Again supporting my statement that even if presented with 2 absolutely identical parts save for ECC vs. LEDs the vast majority of consumers will go for LEDs because they don't care or know about ECC.

Re:ECC matters by Dylan16807 on Tuesday January 05, 2021 @05:59AM (#25644223)
> It really isn't. It was a hypothetical choice between 2 models, with ECC or LEDs, at the same price. Hypothetical because most boards don't offer the ECC support at all, and certainly not at the same price.

You're making a claim about what people would choose. If you have no related data, and logic could support multiple outcomes, then a claim like that is basically useless.

> You confused manufacturing costs, price of the product, and profit margins.

I'm not sure why you think this.

> Again supporting my statement that even if presented with 2 absolutely identical parts save for ECC vs. LEDs the vast majority of consumers will go for LEDs because they don't care or know about ECC.

Sure, if you don't tell them that it's ECC they won't pick the ECC part.

If you actually do a fair test, and put them side by side while explaining that one protects them from memory errors and the other looks cooler, you can't assume they'll all pick the LED.

When people never even think of ECC, that is not evidence that they wouldn't care or know about it in a head-to-head competition.

Re:ECC matters by buran77 on Tuesday January 05, 2021 @07:03AM (#25644653)
> You're making a claim

My claims are common sense and supported by the real life: regular people don't know what ECC is, and those who do find the problem's impact is too minor to get palpable benefits from fixing it. Why are you being pedantic if you aren't actually going to bring arguments at the same level you expect from me?

> If you actually do a fair test, and put them side by side while explaining that one protects them from memory errors and the other looks cooler, you can't assume they'll all pick the LED.

Isn't this exactly the kind of claim you yourself characterize one paragraph above as "useless" because "you have no related data, and logic could support multiple outcomes"? Sure, if people were more tech-educated then my assumption might be wrong. But people aren't more educated so...

The benefits of LEDs are hard to miss (light) all the time. The benefits of ECC are hard to observe even in that fraction of a percent of the time. Human cellular "bitflips" happen every hour but they don't visibly affect you so you also consider it's not an issue that demands more attention, like constant solar protection. People aren't keen on paying to solve problems they never suffered from, or even noticed, especially when you tell them they happen so often still with no obvious impact. Unless they have no choice, like OEMs selling ECC RAM only devices.

Sell me ECC memory when my (actual real life) 10 year old desktop or 5 year old phone never glitched. Sell me ECC RAM when my Matlab calculations come back different every time. See the difference?

> When people never even think of ECC, that is not evidence that they wouldn't care or know about it in a head-to-head competition.

Well then, I guess none of us has any evidence except today people buy LEDs not ECC RAM. Educate people or wait until manufacturing process and design are so susceptible to bitflips that people notice and it will be a different conversation.

Re:ECC matters by Dylan16807 on Tuesday January 05, 2021 @12:58PM (#25648530)
> My claims are common sense and supported by the real life: regular people don't know what ECC is, and those who do find the problem's impact is too minor to get palpable benefits from fixing it. Why are you being pedantic if you aren't actually going to bring arguments at the same level you expect from me?

Regular people aren't given the choice! The things you're quoting about the real world to support your argument are incompatible with a scenario where someone is actually looking at ECC and LED next to each other. And I'm not being "pedantic" to say that, it's a really core point.

> Isn't this exactly the kind of claim you yourself characterize one paragraph above as "useless" because "you have no related data, and logic could support multiple outcomes"?

A claim of a specific outcome is useless. "you can't assume" is another way of phrasing the lack of knowledge of specific outcomes.

> Sure, if people were more tech-educated then my assumption might be wrong. But people aren't more educated so...

It's the kind of thing that can go on a product page. But first someone has to actually make a consumer-focused sales page for ECC memory, and the ECC has to be plug-and-play without strong compatibility worries.

And just like when LEDs spread over everything, it's something that you can teach people about and create demand for with a bit of advertising.

> Sell me ECC memory when my (actual real life) 10 year old desktop or 5 year old phone never glitched. Sell me ECC RAM when my Matlab calculations come back different every time. See the difference?

That's a clear picture of one person. But "never glitched" is a very dubious claim, and you can't blindly extrapolate that to how everyone would act.

Re:ECC matters by wolrah on Sunday January 03, 2021 @06:28PM (#25626311)
I think they may have been referring to the actual mainstream retail availability of ECC RAM. I can buy non-ECC RAM at almost any retailer that sells computers. If I need non-ECC RAM right now I can have it in my hands in 30 minutes. ECC on the other hand I pretty much have to buy online. Microcenter stocks a single 4GB stick of PC4-21300, and I can't think of a single use case where I'd want ECC but not more than 4GB.
Re:ECC matters by jfim on Sunday January 03, 2021 @08:35PM (#25627084)
You're right, rereading the parent post with that angle makes it clearer that they were complaining about the unavailability of memory and other hardware.

It would definitely be great to have more reliable hardware generally available and at less of a price premium.

Re:ECC matters by Animats on Sunday January 03, 2021 @10:57PM (#25627802)
Yes. I'd pay an extra 25%, but not an extra 110%.
Re:ECC matters by AaronFriel on Sunday January 03, 2021 @02:17PM (#25624239)
It can't eliminate it but:

1. Single bitflip correction along with Google's metrics could help them identify algorithms they've got, customer's VMs that are causing bitflips via rowhammer and machines which have errors regardless of workload

2. Double bitflip detection lets Google decide if they say, want to panic at that point and take the machine out of service, and they can report on what software was running or why. Their SREs are world-class and may be able to deduce if this was a fluke (orders of magnitude less likely than a single bit flip), if a workload caused it, or if hardware caused it.

The advantage the 3 major cloud providers have is scale. If a Fortune 500 were running their own datacenters, how likely would it be that they have the same level of visibility into their workloads, the quality of SREs to diagnose, and the sheer statistical power of scale?

I sincerely hope Google is not simply silencing bitflip corrections and detections. That would be a profound waste.

Re:ECC matters by tjoff on Sunday January 03, 2021 @02:39PM (#25624466)
ECC seems like a trivial thing to log and keep track of. Surely any Fortune 500 could do it and would have enough scale to get meaningful data out of it?
Re:ECC matters by AaronFriel on Sunday January 03, 2021 @08:53PM (#25627178)
It's not just tracking ECC errors, which as you point out is not hard, but correlating it with the other metrics needed to determine the cause and having the scale to reliably root cause bitflips to software (workloads that inadvertently rowhammer) or hardware or even malicious users (GCP customers that may intentionally run a rowhammer.)
Re:ECC matters by watersb on Sunday January 03, 2021 @07:30PM (#25626698)
IBM does. They will probably sell you the information if you rent the machines from them.
Re:ECC matters by saagarjha on Sunday January 03, 2021 @06:30PM (#25626318)
There was an interesting challenge at DEF CON CTF a while back that tested this, actually. It turns out that it is possible to write x86 code that is 1-bit-flip tolerant–that is, a bit flip anywhere in its code can be detected and recovered from with the same output. Of course, finding the sequence took (or so I hear) something like 3600 cores running for a day to discover it ;)
Re:ECC matters by rfoo on Sunday January 03, 2021 @10:31PM (#25627675)
Nit: not for a day, more like 8 hours, and that's because we were lazy and somebody said he "just happened" to have a cluster with unbalanced resources (mainly used for deep learning, but all GPUs occupied with quite a lot CPUs / RAMs left), so we decided to brute force the last 16 bits :)

Also, the challenge host left useful state (which bit was flipped) in registers before running teams' code, without this I'm not sure if it is even possible.

Re:ECC matters by saagarjha on Monday January 04, 2021 @03:37AM (#25628929)
Sure, all's fair in a CTF. That story came to me through the mouths of at least a handful of people, who might have a bit of an incentive to exaggerate given that they hadn't quite been able to get to zero and might be a just a little sour :P

The state was quite helpful, yes–for x86 it seems like a "clean slate" shellcode would be quite difficult, if impossible, to achieve as we saw. However, I am left wondering how other ISAs would fare…perhaps worse, since x86 is notoriously dense. But maybe not? The fixed-width ones would probably be easy to try out, at least.

Re:ECC matters by rfoo on Monday January 04, 2021 @12:24PM (#25634615)
Maybe being notoriously dense is not a bad thing? While those ModRM bytes popping up everywhere is annoying as f* (too easy to flip an instruction into a form with almost-guaranteed-to-be-invalid memory access), at least due to the density there won't be reserved bits. For example, in AArch64 if bit 28 and bit 27 is both zero the instruction will almost certainly be an invalid one (hitting unallocated area), and with a single bit flip all branch instructions will have [28:27] = b'00...

[1] https://developer.arm.com/docs/ddi0596/h/top-level-encodings...

Re:ECC matters by saagarjha on Monday January 04, 2021 @04:33PM (#25638416)
Right, I was saying that the other ISAs would do wore because they aren't as dense and will hit something undefined much more readily. But the RISCs in general are much less likely to touch memory (only if you do a load/store from a register that isn't clean, maybe). From a glance, MIPS looks like it might work, since the opcode field seems to use all the bits and the remaining bits just encode reg/func/imm in various ways. The one caveat I see is that I think the top bit of opcode seems to encode memory accesses, so you may be forced to deal with at least one.
Re:ECC matters by exikyut on Monday January 04, 2021 @12:45PM (#25635025)
This sounds really cool and interesting.

Was any code dumped anywhere?

I found this which corroborates everything you're saying but provides no further details: https://www.cspensky.info/slides/defcon_27_shortman.pdf

Re:ECC matters by saagarjha on Monday January 04, 2021 @04:36PM (#25638481)
Oh, hey, it's Chad's slides!

Coverage of the finals is usually much less detailed, unfortunately, since the number of teams is much smaller and the challenges don't necessarily go up. However, https://oooverflow.io/dc-ctf-2020-quals/ has a couple more writeups linked from it; https://dttw.tech/posts/SJ40_7MNS#proof-by-exhaustion from PPP and http://www.secmem.org/blog/2019/08/19/Shellcoding-and-Bitfli... from SeoulPlusBadass.

Re:ECC matters by exikyut on Tuesday January 05, 2021 @05:39AM (#25644131)
I see. Thanks very much for this info.

Binary bitflip resilience is really cool. The radiation-hardened-quine idea (https://codegolf.stackexchange.com/questions/57257/radiation..., https://github.com/mame/radiation-hardened-quine) is cool, but these source-based approaches depend on a perfectly functioning and rather large (Ruby, V8, whole browser) binary stack. A bitflip-protected hex monitor or kernel, on the other hand...

Re:ECC matters by tomxor on Sunday January 03, 2021 @05:49PM (#25625994)
> Making software resilient against bitflips in memory seems very difficult though, since it not only affects data, but also code.

There is an OS that pretty much fits the bill here. There was a show where Andrew Tanenbaum had a laptop running Minix 3 hooked up to a button that injected random changes into module code while it was running to demonstrate it's resilience to random bugs. Quite fitting that this discussion was initiated by Linus!

Although it was intended to protect against bad software I don't see why it wouldn't also go a long way in protecting the OS against bitflips. Minix 3 uses a microkernel with a "reincarnation server" which means it can automatically reload any misbehaving code not part of the core kernel on the fly (which for Minix is almost everything). This even includes disk drivers. In the case of misbehaving code there is some kind of triple redundancy mechanism much like the "quorum" you suggest, but that is where my crude understanding ends. AFAIR Userland software could in theory also benefit provided it was written in such a way to be able to continue gracefully on reloading.

Re:ECC matters by Jedd on Sunday January 03, 2021 @08:11PM (#25626930)
At some point, whatever's watching the watchers is going to be vulnerable to bitflip and similar problems.

Even with a triple-redundant quorum mechanism, slightly further up that stack you're going to have some bit of code running that processes the three returned results - if the memory that's sitting on gets corrupted, you're back where you started.

Re:ECC matters by axiolite on Sunday January 03, 2021 @09:16PM (#25627299)
> At some point, whatever's watching the watchers is going to be vulnerable to bitflip

One advantage of microkernels is that the "watcher" is so small that it could be run directly from ROM, instead of loaded into RAM. QNX has advocated that route for robotics and such in the past.

Minix may not be the best example of the type. While it is a microkernel, it's real world reliability has been poor in the past. More mature microkernel operating systems like QNX and OpenVMS are better examples.

Re:ECC matters by exikyut on Monday January 04, 2021 @12:57PM (#25635216)
> While it is a microkernel, it's real world reliability has been poor in the past.

Nitpick/clarification: it currently supervises the security posture, attestation state and overall health of several billion(?) Intel CPUs as the kernel used by the latest version of the Management Engine.

If ME is shut down completely apparently the CPU switches off within 20 minutes. Presumably this applies across the full uptime of the processor, and not just immediately after boot, and iff this is the case... percentage of Intel CPUs that randomly switch off === instability/unreliability of Minix in a tightly controlled industrial setting.

Re:ECC matters by KMag on Sunday January 03, 2021 @10:02PM (#25627536)
Anyone have any idea why there haven't been any open-source QNX clones, at least not any widely known ones? Even before their Photon MicroGUI patents expired, the clones could have used X11.

I used to occasionally boot into QNX on my desktop in college. It was a very responsive and stable system.

Hypervisors are, to a first approximation, microkernels with a hardware-like interface. All of this kernel bypass work being done by RDBMSes, ScyllaDB, HFTs, etc. is, to a first approximation, making a monolithic kernel act a bit like a microkernel.

Re:ECC matters by fulafel on Monday January 04, 2021 @01:47AM (#25628458)
There are well known open source microkernels, like Minix 3 and L4. Probably not that attractive.

Why something hasn't been done is always a hard question to answer, since to succeed a lot of things have to go right, and by default none of them do. But one thing is that microkernels were more trendy in the 90s - r&d people are mostly doing things like "the cluster is the computer", unikernel, exokernel, rump kernel, embedded (eg tock), remote attestation since then (I'm not up to date on the latest).

Re:ECC matters by KMag on Monday January 04, 2021 @06:15AM (#25629889)
Thinking about it a bit more, QNX clones might suffer from something akin to second system syndrome. There's a simple working design, and it likely strongly invites people to jump right to their own twist on the design before they get very far into a clone.
Re:ECC matters by tomxor on Monday January 04, 2021 @07:04AM (#25630253)
> Minix may not be the best example of the type. While it is a microkernel, it's real world reliability has been poor in the past. More mature microkernel operating systems like QNX and OpenVMS are better examples.

You might be referring to the previous versions. Minix 3 is basically a different OS, it's more than an educational tool - in fact it's probably running inside your computer right now if you have an Intel CPU (it runs Intel's ME chip - for better or worse).

Re:ECC matters by tomxor on Monday January 04, 2021 @07:35AM (#25630509)
Yes, but this is the entire principle around which microkernels are designed: making the the last critical piece of code as small and reliable as possible. Minix3's kernel is <4000 lines of C.

As far as bitflips are concerned, having the critical kernel code occupy fewer bits reduces the probability of a bitflip causing an irrecoverable error.

Re:ECC matters by Jedd on Monday January 04, 2021 @08:32PM (#25640888)
Yes, I understand this -- basic risk mitigation by reducing the size of your vulnerability.

(I'll archaic brag a bit by mentioning I used to be a heavy user of Minix - my floppy images came in over an X25 network - and saw Andy Tanenbaum give his Minix 3 keynote at FOSDEM about a decade ago. I'm a big fan.)

Anyway, while reducing risk this way is laudable, and will improve your fleet's health, as per TFA it's a poor substitute, with bad economics and worse politics behind it, than simply stumping up for ECC.

I'll also note that, for example, Google's sitting on ~3 million servers so that ~4k LoC just blew out to 12,000,000,000 LoC -- and that's for the hypervisors only.

Multiply that out by ~50 to include VM's microkernels, and the amount of memory you've now got that is highly susceptible to undetected bit-flips is well into the mind-blowing range.

Re:ECC matters by tomxor on Tuesday January 05, 2021 @07:01AM (#25644638)
Oh i'm not saying it's the single best solution, I guess I got carried away in argument - It's simply a scenario where the concept shines, yet it's entirely artificial scenario and I agree ECC is the correct way.
Re:ECC matters by aquadrop on Monday January 04, 2021 @08:12AM (#25630857)
You can have two watchers watching each other's integrity.
Re:ECC matters by artifact_44 on Monday January 04, 2021 @08:23AM (#25630974)
Re:ECC matters by slumdev on Sunday January 03, 2021 @02:15PM (#25624223)
Error-correcting code (the "ECC" in ECC) is just a quorum at the bit level.
Re:ECC matters by eevilspock on Sunday January 03, 2021 @02:46PM (#25624529)
I'm surprised that the other replies don't grasp this. This is the proper level to do the quorum.

Doing quorum at the computer level would require synchronizing parallel computers, and unless that synchronization were to happen for each low level instruction, then it would have to be written into the software to take a vote at critical points. This is going to be greatly detrimental both to throughput and software complexity.

I guess you could implement the quorum at the CPU level... e.g. have redundant cores each with their own memory. But unless there was a need to protect against CPU cores themselves being unreliable, I don't see this making sense either.

At the end of the day, at some level, it will always come down to probabilities. "Software engineering principles" will never eliminate that.

Re:ECC matters by slumdev on Sunday January 03, 2021 @03:02PM (#25624706)
I would highly recommend a graduate-level course in computer architecture for anyone who thinks ECC is a 1980s solution to a modern problem.

There are a lot of seemingly high-level problems that are solved (ingeniously) in hardware with very simple, very low-level solutions.

Re:ECC matters by bollu on Sunday January 03, 2021 @04:10PM (#25625273)
Could you please link me to such a course that displays the hardware level solutions? I'm super interested!
Re:ECC matters by slumdev on Sunday January 03, 2021 @04:18PM (#25625339)
Re:ECC matters by andrewaylett on Sunday January 03, 2021 @04:16PM (#25625324)
https://en.wikipedia.org/wiki/NonStop_(server_computers)

My first employer out of Uni had an option for their primary product to use a NonStop for storage -- I think HP funded development, and I'm not sure we ever sold any licenses for it.

Re:ECC matters by sobriquet9 on Sunday January 03, 2021 @03:08PM (#25624767)
Modern error correction codes can do much better than that.
Re:ECC matters by DSingularity on Sunday January 03, 2021 @10:22PM (#25627634)
You need two alpha particles hitting the same rank of memory for failure to happen. Although super rare, even then it is still correctable. You need three before it is silent data corruption. Silent corruption is what you get with non ECC with even a single flip.
Re:ECC matters by klodolph on Monday January 04, 2021 @03:17AM (#25628836)
Where are you getting this from? My understanding is that these errors are predominantly caused by secondary particles from cosmic rays hitting individual memory cells, and I've never heard something so precise as "you need two alpha particles". Aren't the capacitances in modern DRAM chips extremely small?
Re:ECC matters by DSingularity on Monday January 04, 2021 @06:53AM (#25630181)
The structure of the ECC is at the rank level. This allows for correcting single bit flips in ranks and detecting double bit flip in ranks. So when you grab a cache line each 64bit is corrected and verified.
Re:ECC matters by hn3333 on Sunday January 03, 2021 @02:16PM (#25624230)
Bit flips can happen, but regardless if they can get repaired by ECC code or not, the OS is notified, iirc. It will signal a corruption to the process that is mapped to the faulty address. I suppose that if the memory contains code, the process is killed (if ECC correction failed).
Re:ECC matters by wtallis on Sunday January 03, 2021 @04:53PM (#25625596)
> I suppose that if the memory contains code, the process is killed (if ECC correction failed).

Generally, it would make the most sense to kill the process if the corrupted page is data, but if it's code, then maybe re-load that page from the executable file on non-volatile storage. (You might also be able to rescue some data pages from swap space this way.)

Re:ECC matters by gizmo686 on Sunday January 03, 2021 @05:29PM (#25625827)
If you go that route, you should be able to avoid the code/data distinction entirely; as data pages can also be completly backed by files. I believe the kernel already keeps track of what pages are a clean copy of data from the filesystem, so I would think it would be a simple matter of essentially pageing out the corrupted data.

What would be interesting is if userspace could mark a region of memory as recomputable. If the kernel is notified of memory corruption there, it triggers a handler in the userspace process to rebuild the data. Granted, given the current state of hardware; I can't imagine that is anywhere near worth the effort to implement.

Re:ECC matters by wtallis on Sunday January 03, 2021 @07:30PM (#25626692)
> What would be interesting is if userspace could mark a region of memory as recomputable.

I believe there's already some support for things like this, but intended as a mechanism to gracefully handle memory pressure rather than corruption. Apple has a Purgeable Memory mechanism, but handled through higher-level interfaces rather than something like madvise().

Re:ECC matters by colejohnson66 on Sunday January 03, 2021 @02:33PM (#25624412)
> You probably would have to use multiple computers doing the same calculation and then take the answer from the quorum.

The Apollo missions (or was it the Space Shuttle?) did this. They had redundant computers that would work with each other to determine the “true” answer.

Re:ECC matters by EvanAnderson on Sunday January 03, 2021 @02:55PM (#25624629)
The Space Shuttle had redundant computers. The Apollo Guidance Computer was not redundant (though there were two AGCs onboard-- one in the CM and one in the LEM). The aerospace industry has a history of using redundant dissimilar computers (different CPU architectures, multiple implementations of the control software developed by separate teams in different languages, etc) in voting-based architectures to hedge against various failure modes.
Re:ECC matters by buildbuildbuild on Sunday January 03, 2021 @03:03PM (#25624725)
This remains common in aerospace, each voting computer is referred to as a "string". https://space.stackexchange.com/questions/45076/what-is-a-fl...
Re:ECC matters by sroussey on Sunday January 03, 2021 @03:46PM (#25625071)
In aerospace where this is common, you often had multiple implementations, as you wanted to avoid software bugs made by humans. Problem was, different teams often created the same error at the same place, so it wasn’t as effective as it would have seemed.
Re:ECC matters by patates on Monday January 04, 2021 @03:49AM (#25628982)
Forgive my ignorance, but wouldn't the computer actually reacting to the calculation (and sending a command or displaying the data) still be very vulnerable to bit-flips? Or were they displaying the results from multiple machines to humans?
Re:ECC matters by haolez on Sunday January 03, 2021 @02:36PM (#25624433)
Sounds similar to smart contracts running on a blockchain :)
Re:ECC matters by sobriquet9 on Sunday January 03, 2021 @03:04PM (#25624741)
If you use multiple computers doing the same calculation and then take the answer from the quorum, how do you ensure the computer that does the comparison is not affected by memory failures? Remember that all queries have to through it, so it has to be comparable in scale and power.
Re:ECC matters by rovr138 on Sunday January 03, 2021 @03:35PM (#25624978)
> how do you ensure the computer that does the comparison is not affected by memory failures?

You do the comparison on multiple nodes too. Get the calculations. Pass them to multiple nodes, validate again and if it all matches, you use it.

Re:ECC matters by sobriquet9 on Sunday January 03, 2021 @03:44PM (#25625057)
> validate again

Recursion, see recursion.

Re:ECC matters by wtallis on Sunday January 03, 2021 @04:45PM (#25625551)
Re:ECC matters by Guvante on Sunday January 03, 2021 @05:49PM (#25625998)
I mean raft and similar algorithms run multiple verification machines because a single point of failure is a single point of failure.
Re:ECC matters by sobriquet9 on Sunday January 03, 2021 @07:06PM (#25626546)
Raft, Paxos, and other consensus algorithms add even more overhead. Imagine running every Google query through Raft and think how long it will take and how much extra hardware would be needed.

ECC memory is just as fast as non-ECC memory, and only cost a little more.

Re:ECC matters by Guvante on Sunday January 03, 2021 @07:40PM (#25626760)
Your comment sounded like "your recursive definition is impossible".

I am totally for ECC and was flabbergasted when it went away. But the article makes sense since I remember Intel pushing hard to keep it out of the consumer space. The freaking QX6800 didn't support ECC and it retailed for over a grand.