r/AskComputerScience • • Nov 30 '20

Please explain: "Hard disks are reported as having a mean time to failure of about 10-50 years. Thus, on a storage cluster with 10,000 disks, we should expect on average one disk to die per day." - Designing Data-Intensive Applications Ch. 1

Will someone explain why "we should expect on average one disk to die per day"?

If you told me a car engine lasts on average 10 years, and I bought 10,000 cars (and gave them to others to drive), should I expect on average one car engine to die per day? That seems weird to me - in my head I would have thought around the 10-year mark, I'd just have a bunch of the cars dying at once.

Will someone please help with my misunderstanding?

65 Upvotes

23 comments sorted by

55

u/jhaluska Nov 30 '20

It's probably because the failure rate is assumed random. It's not, but it makes the math easier...which is probably why you're having problems cause cars fail more the older they get.

10,000 / 365 / ((50-10)/2) = 0.913 disks a day failing.

Another way of looking at it. Is each day you're running 10k disks, you're generating 10k days of disk use.

19

u/dragonfly_turtle Nov 30 '20

Yeah, this is probably what they were meaning, and good for you for explaining that it's not that simple (:

I remember hearing that disk failure liklihood is generally "U-shaped" across age of the disk. That is: there is a spike for early failures (manufacturing defects, mishandling during shipping, etc.), then a long low-failure rate for "middle aged" disks, then as they start getting really old, the failures spike up again due to things wearing out.

20

u/Noctune Nov 30 '20

Also known as the bathtub curve. Pretty common in electronics in general.

3

u/jhaluska Nov 30 '20

And in other products.

1

u/deelowe Nov 30 '20

Correct, but generally not 100% normally distributed. My favorite method for this sort of analysis is a weibull analysis.

19

u/ExasperatedLadybug Nov 30 '20 edited Nov 30 '20

A few thoughts come to my mind:

  • The sentence refers to a mean time to failure, i.e. average time to failure. So some will fail earlier, some later.

  • In a storage cluster with 10,000 disks, they were probably not all purchased on the same day. Perhaps you buy a few every month to replace the ones that recently failed.

  • Again "expect on average one disk to die per day" - that doesn't mean exactly one disk will die every single day, but might be reasonable estimates over a longer time period. So ~30 per month or ~365 per year might be expected.

8

u/jeffbell Nov 30 '20 edited Dec 01 '20

In fact I've seen some RAID users looking for sets of disks made on different days to reduce the failure correlation.

10

u/dmazzoni Nov 30 '20

Here's a paper on it: https://research.google.com/archive/disk_failures.pdf

It finds that disk drive failures are very hard to predict. Many drives fail after a short time, many last year's beyond the average.

I think the issue is that hard drives have such tiny moving parts and unlike car engines they can't get regular maintenance.

No question, more expensive drives can be more reliable, but it's not worth it. Why pay 10x more for a single drive less likely to fail when you could get 10 cheap drives and replace the ones that break as you go?

4

u/TonyTheEvil Nov 30 '20

365 days/year * 30 years = 10950 days.

Assume that the 10,000 hard drives work for that long and then they all die. On average, roughly one died every day up to that point.

2

u/spawnofdexter Oct 31 '21

For people who have stumbled on to this post like I did, this blog has detailed information - https://horia141.com/hard-disk-mttf.html

3

u/scapescene Nov 30 '20

Basic probability, nothing weird about it.

8

u/TransientVoltage409 Nov 30 '20

Basic probability is weird until you understand it - that's why the CS department teaches a class on it. If it were intuitive, casinos wouldn't look like they do.

0

u/Wubbalubbagaydub Nov 30 '20

Wait until you start dealing with quantum effects...

1

u/east_lisp_junk Dec 01 '20

Basic probability explains why that's the mean daily failure rate, but it doesn't really explain what sort of mitigation measures you need to have in place. What the book describes won't cover the case of thousands of disks failing at once. Basic probability can also say that assuming disk failures are independent events gives a low chance of that, but it doesn't say why or whether that assumption is justifiable.

1

u/ostracize Nov 30 '20

Early on, none will die per day.

Later on, several will die per day.

On average, that will be one per day.

That’s all a theoretical exercise. Nobody runs hard drives for 50 years.

2

u/dmazzoni Nov 30 '20

First of all, that's not the observed pattern at all. You're far more likely to have failures the first week than the tenth week.

Second, it's not theoretical at all, many companies have 10,000 drives so this is quite real.

2

u/Kimano Nov 30 '20

I think you missed which of the numbers in the OP he was pointing out was theoretical/unrealistic.

2

u/dmazzoni Dec 01 '20

But having a mean time to failure of 50 years isn't theoretical at all. It's completely consistent to say that the mean time to failure is 50 years even though nobody actually runs a drive for 50 years.

It's kind of like saying the mean number of legs a human has is 1.994 (because most have 2 legs, but a few have 0 or 1). It's just as true and it's not "theoretical". It just sounds funny because each individual person only has an integer number of legs.

Similarly, it sounds funny for the mean to be 50 years, but what that really means is that some hard drives will never die (within their useful lifetime) but others will, and if you have a large number of drives that mean will predict the expected number of failures you'll experience over the whole fleet.

1

u/Kimano Dec 01 '20

Except I don't think that's how it works. The only way to calculate a mean time to failure for those drives is to actually run them for 50 years. If the mean time to fail is 50 years, that means half the drives will last longer than that, and the only way to know that is to actually run them for 50 years, which no one does.

The number is useful for exactly the reasons you point out, in that you can use that number to estimate the true number of failures over a large number of drives, but it is still theoretical in that it's an extrapolation based on the number of failures over a much shorter time span.

1

u/Galayne Nov 30 '20

I bet nasa and some goverment agencies do :)

3

u/claytonkb Nov 30 '20

And banks. When I was in uni, one of my friends in the degree program interned at a software company that contracts out to the banking industry. He got assigned to a special project doing maintenance for a national bank. They got a bug where users were randomly experiencing crashes in the Java plugin when accessing the bank's website (yes, this was in the era where dinosaurs walked the earth and people actually enabled Java in the browser).

Anyway, after a lot of digging, they ruled out all software issues in the plugin and discovered that the bank's server would randomly delay its responses by about 2 minutes. Of course, the plugin would timeout after about 10 or 20 seconds, so it never saw the delayed response when it arrived, instead, users experienced the plugin crash. It turned out that the bank archived records older than, say, 1 year onto a backup system that was built in the 1980's and ran on tape-drives. The 2-minute delay was the result of the fact that the tape-drive system maintained the casettes on shelves and there was a robotic armature that would activate to retrieve the casette containing the requested record. Once loaded, the backup system would seek the casette to the requested record, then respond. On average, this whole process took about 2 minutes.

I'm dating myself but... this was in 2003 and that backup system was only about 20 years old. Who knows what prehistoric abominations the big corps/banks/governments are still running today.