LWN: Comments on "Flash storage topics" https://lwn.net/Articles/756627/ This is a special feed containing comments posted to the individual LWN article titled "Flash storage topics". en-us Wed, 10 Sep 2025 21:43:57 +0000 Wed, 10 Sep 2025 21:43:57 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Flash storage topics https://lwn.net/Articles/759283/ https://lwn.net/Articles/759283/ nix <div class="FormattedComment"> In rural, particularly forested, parts of North Europe, the one-step-up-from-domestic local power lines come in overhead (because they have to, because running a power line under fifty miles of forest to serve a hamlet of twenty houses is ridiculous). When the trees grow and it snows hard enough (or gloopily enough), the power can go down and stay down for days or even weeks while kilometres of line are restrung. However, unlike in Puerto Rico -- or 1998 Auckland! -- it does not go down for months.<br> </div> Sat, 07 Jul 2018 19:53:41 +0000 Flash storage topics https://lwn.net/Articles/758503/ https://lwn.net/Articles/758503/ jospoortvliet <div class="FormattedComment"> In most of north-west Europe powerlines are underground so power outages happen at most once every few years...<br> </div> Thu, 28 Jun 2018 11:32:05 +0000 [slightly off-topic] 2AM? https://lwn.net/Articles/757708/ https://lwn.net/Articles/757708/ nelzas <div class="FormattedComment"> Yes, and what about people like me, who turn off their phone when going to bed?<br> searching for defrag in phone settings doesn't give me results...<br> </div> Mon, 18 Jun 2018 12:40:48 +0000 Flash storage topics https://lwn.net/Articles/757536/ https://lwn.net/Articles/757536/ Wol <div class="FormattedComment"> Admittedly I have only lived on the outskirts of London for pretty much my entire life, but there are - over that entire period - only three power outages that I can remember.<br> <p> After heavy rain, there was a landslip at a chalk pit that took out the local substation.<br> <p> At work, some robbers tried to blow their way into a bank vault, but in the process took out a major electricity supply cable.<br> <p> Some thieves tried to steal a copper power line (250KVA, I think) and took out a small town.<br> <p> Things like brownouts are pretty much unknown.<br> <p> So yes, in Britain MOST people MOST of the time never experience a problem. The only people who will see any need for a UPS are people who live near an industrial area where their neighbours are dirtying the supply. Outside of that, supply is both good and reliable, and short outages are almost unknown. If there's a problem, it's either with the house supply itself, or in the cases I've mentioned above it's a major but localised problem - at one day, the first problem was the one rectified the quickest of the above three. The second took a week, while the third left many homes without power for days ...<br> <p> Cheers,<br> Wol<br> </div> Thu, 14 Jun 2018 17:30:11 +0000 Flash storage topics https://lwn.net/Articles/757510/ https://lwn.net/Articles/757510/ Wol <div class="FormattedComment"> As someone who wants to implement a database, that "issue barrier" would be perfect.<br> <p> At present, (a) user-space can not reason about the state of the disk, and (b) a "sync" is effectively a Denial-of-Service attack on all the other users of the system (and yourself).<br> <p> If I can guarantee that certain writes hit the disk in a fixed order, then I can reason about the state of the disk, and write a robust app.<br> <p> The problem is that POSIX explicitly only applies to a properly functioning system - it explicitly disclaims all liability if the system malfunctions, and things like databases need to be able to reason about a malfunctioning system.<br> <p> Cheers,<br> Wol<br> </div> Thu, 14 Jun 2018 15:36:29 +0000 Flash storage topics https://lwn.net/Articles/757252/ https://lwn.net/Articles/757252/ mpr22 Wikipedia tells me that to qualify as a tornado, a weather phenomenon must involve a rotating wind column, reaching from ground level to the base of the overhead clouds, with surface wind speeds in excess of 40 mph (64 km/h). Tue, 12 Jun 2018 06:34:54 +0000 Flash storage topics https://lwn.net/Articles/757247/ https://lwn.net/Articles/757247/ k8to <div class="FormattedComment"> I wonder what the standards are for what qualifies as a tornado.<br> <p> In the United States northeast growing up, we had a number of minor twisters that no one thought to label "tornado". If it only uprooted 30 trees or so, it was "just a twister".<br> <p> <p> </div> Tue, 12 Jun 2018 06:14:49 +0000 Flash storage topics https://lwn.net/Articles/757031/ https://lwn.net/Articles/757031/ karkhaz <div class="FormattedComment"> Cheers for these facts, I must admit to not knowing them despite enthusiastically following the hurricane season in the US.<br> <p> One thing that occurs to me, though, is that the sources for "highest number of tornadoes recorded per area" seem to have very population densities (Bangladesh is mentioned often, and the Netherlands and UK have the highest and third-highest densities of all the non-tiny European nations). This may be the reason that the reported numbers are so high for these countries: people are a lot more likely to see a tornado, even if it is too weak to cause significant damage, than in rural Tornado Alley. This is compounded by the fact that tornadoes are difficult to observe directly using radar, so tornado reports mostly come from people who have seen the tornado first-hand. And higher population densities lead to more frequent infrastructure that could suffer from noticeable damage, e.g. power lines, train tracks, etc.<br> <p> Also I wonder if people being acclimatized to huge tornadoes in Tornado Alley leads to people reporting less of the smaller ones: a relatively benign tornado that would have somebody in the UK scrambling to phone the Met Office might just be ignored by their cousin over the pond.<br> </div> Sat, 09 Jun 2018 13:44:50 +0000 Flash storage topics https://lwn.net/Articles/757028/ https://lwn.net/Articles/757028/ mpr22 The UK has the most tornadoes per year of any country in Europe, and more tornadoes per square kilometre per year than any country in the world except the Netherlands. (I think it might even have more tornadoes per square kilometre per year than the region of the USA known as "Tornado Alley".) Sat, 09 Jun 2018 12:39:30 +0000 Flash storage topics https://lwn.net/Articles/757024/ https://lwn.net/Articles/757024/ anselm <blockquote><em>Neither tornadoes nor hurricanes form here</em></blockquote> <p> The UK Met Office would beg to disagree on tornadoes: <blockquote> <a href="https://www.metoffice.gov.uk/learning/wind/tornado">Around 30 tornadoes a year</a> are reported in the UK. These are typically small and short-lived, but can cause structural damage if they pass over built-up areas. </blockquote> Hurricanes in a literal sense don't occur in the UK a lot, but sometimes the “tail end” of a hurricane can end up in Britain as a destructive storm, like Hurricane Ophelia in October, 2017. </p> <p> Given that overhead power lines are fairly common at least in rural areas of the UK, it would not be in the least surprising that storms (including hurricane remnants and tornadoes) caused occasional power outages. </p> Sat, 09 Jun 2018 10:53:05 +0000 Flash storage endurance https://lwn.net/Articles/756983/ https://lwn.net/Articles/756983/ excors <div class="FormattedComment"> <font class="QuotedText">&gt;&gt; I guess you'd need access to automatically-uploaded error logs or customer support records to see how many users have encountered storage errors. That would be nice, but seems unlikely to happen.</font><br> <font class="QuotedText">&gt; </font><br> <font class="QuotedText">&gt; How do we know it's not happening already? (biggest lie on the Internet: "I agree")</font><br> <p> Error logs certainly get uploaded already, on some devices - they're very useful for identifying and prioritising common bugs, quickly detecting regressions when rolling out OTAs, etc. What I mean is unlikely is that the companies with that information would ever release it publicly.<br> </div> Fri, 08 Jun 2018 18:44:42 +0000 Flash storage endurance https://lwn.net/Articles/756980/ https://lwn.net/Articles/756980/ marcH <div class="FormattedComment"> <font class="QuotedText">&gt; But if you want to know how that affects the lifetime of a phone, you need to know the behaviour of the software on that phone, </font><br> <p> Basic benchmark design problem, not specific to storage or endurance.<br> <p> <font class="QuotedText">&gt; and you need to know what memory chip it uses</font><br> <p> Not a problem specific to storage or endurance: <a href="https://www.google.com/search?q=iphone+intel+modem">https://www.google.com/search?q=iphone+intel+modem</a><br> <p> <font class="QuotedText">&gt; CPU/GPU benchmarks are much easier since the relevant software is provided by the benchmark itself</font><br> <p> Interfaces to GPU are orders of magnitude more complex than storage interfaces; one of the reasons cheating GPU benchmarks is universal: <a href="https://www.google.com/search?q=game+benchmark+cheating">https://www.google.com/search?q=game+benchmark+cheating</a><br> <a href="https://fosdem.org/2018/schedule/event/apitrace/">https://fosdem.org/2018/schedule/event/apitrace/</a><br> Yet no one suggests to stop benchmarking GPUs.<br> <p> <font class="QuotedText">&gt; The problem isn't necessarily that people would cheat, it's that the marketing people would tell the engineers to spend effort legitimately...</font><br> <p> We know how "legitimately" often ends up with (at least) GPUs and car emissions. You can take for granted that some actors will always go "beyond legitimate"; again nothing specific to flash storage or endurance.<br> <p> <font class="QuotedText">&gt; I guess you'd need access to automatically-uploaded error logs or customer support records to see how many users have encountered storage errors. That would be nice, but seems unlikely to happen.</font><br> <p> How do we know it's not happening already? (biggest lie on the Internet: "I agree")<br> <p> <p> </div> Fri, 08 Jun 2018 18:20:57 +0000 Flash storage topics https://lwn.net/Articles/756976/ https://lwn.net/Articles/756976/ nix <div class="FormattedComment"> The power lines are only on poles in the UK in rural areas (villages and smaller): elsewhere they are usually underground and immune to most weather-related failures. Local stepdown transformers are not per-house, but cover a few blocks (so are much larger, much more expensive, and correspondingly much more *reliable*: they very rarely fail, and usually survive even direct lightning strikes). Every significant power station is required to be able to restart under its own steam, too, so we don't have cascading failures where big chunks of the grid go offline and can't come back on because they themselves need grid power.<br> <p> Long-distance high-voltage cross-country lines and lines leaving rural power stations *are* up in the air, but it takes a hell of a lot of wind to knock down one of *those* monster pylons (again, it more or less never happens unless a tree falls on the lines, and they are usually routed away from trees for exactly that reason). It does happen, but because these are high-voltage lines there is almost always fallback from elsewhere in the grid if one is hit, unless there has been a *major* storm and numerous of them have been taken out at once. (Again, this affects major conurbations essentially never: distant rural Scotland, or single small towns that might have only one or two incoming lines, sure, but nothing larger.)<br> <p> I am unhappy with the current state of the UK power network. I've had two flickers in the last decade, and checking my supplier's logs I see one five-minute outage! This is awful: in the decades of the 1990s and 2000s I had none at all. It's hard to justify a UPS with reliability like that. (Note: in the same time window we had a half-*day* water outage, when a farmer drove a plough through a 6in supply pipe and de-watered half the town...)<br> </div> Fri, 08 Jun 2018 17:47:13 +0000 Flash storage topics https://lwn.net/Articles/756972/ https://lwn.net/Articles/756972/ excors <div class="FormattedComment"> <a href="https://www.ukpowernetworks.co.uk/power-cut/map">https://www.ukpowernetworks.co.uk/power-cut/map</a> has a handy map - right now it appears to be reporting 4 unplanned power cuts in London, affecting about 82 customers, so outages are not totally unheard of. (Unfortunately they don't seem to have an obvious way to see historical data. My vague memories are of somewhere between maybe 0.5 and 2 outages per year, living in places outside London.)<br> </div> Fri, 08 Jun 2018 16:42:32 +0000 Flash storage topics https://lwn.net/Articles/756965/ https://lwn.net/Articles/756965/ karkhaz <div class="FormattedComment"> The weather is a lot more temperate in the UK than it is in Colorado. Neither tornadoes nor hurricanes form here, and as for heavy snow---well, people freaked out last winter when London was belaboured with five glorious centimeters of it, most years we get none. Personally, I've not in my entire life seen a single power outage in London.<br> </div> Fri, 08 Jun 2018 15:50:27 +0000 Flash storage topics https://lwn.net/Articles/756960/ https://lwn.net/Articles/756960/ zlynx <div class="FormattedComment"> I suppose?<br> <p> In my personal experience, while I have had UPS batteries go bad, which just happens every so many years, I haven't had a UPS actually fail. I have had more computer power supplies fail.<br> <p> And as for utility power, I don't understand how the UK could possibly be as reliable as you say. Perhaps I'm used to more spread out rural areas of Colorado, but with power lines on poles combined with extremely high winds (tornadoes sometimes) and lightning, and heavy wet snow, well, power is just going to go out every now and then. I really don't see how maintenance could help.<br> </div> Fri, 08 Jun 2018 15:33:33 +0000 Flash storage endurance https://lwn.net/Articles/756962/ https://lwn.net/Articles/756962/ excors <div class="FormattedComment"> I agree it would be good to have good benchmarks - I'm just concerned that bad benchmarks are worse than no benchmarks, and it seems hard to design good benchmarks for this. The problem isn't necessarily that people would cheat, it's that the marketing people would tell the engineers to spend effort on legitimately increasing a benchmark number that does not meaningfully improve the customer experience, at the expense of something more useful.<br> <p> Measuring the endurance of a particular flash chip doesn't sound like it should be too difficult; just do a load of writes until you see IO failures or data loss, and maybe do something to see how effective any wear-levelling is, and compare against the vendor's endurance guarantees to make sure they're not lying. But if you want to know how that affects the lifetime of a phone, you need to know the behaviour of the software on that phone, and you need to know what memory chip it uses (which is non-trivial since a single model of phone might use parts from multiple vendors at once, for supply chain diversification, and change parts over time to reduce cost), and that's not something a typical phone review site could feasibly do. CPU/GPU benchmarks are much easier since the relevant software is provided by the benchmark itself, and the hardware is usually consistent across a phone model (or if some are different then it's probably a whole different SoC and is very obvious), so measurements on a test device are likely to match customer devices.<br> <p> To get realistic data about large populations, I guess you'd need access to automatically-uploaded error logs or customer support records to see how many users have encountered storage errors. That would be nice, but seems unlikely to happen.<br> </div> Fri, 08 Jun 2018 15:33:05 +0000 Flash storage topics https://lwn.net/Articles/756958/ https://lwn.net/Articles/756958/ nix <div class="FormattedComment"> <font class="QuotedText">&gt; Speaking of UPS, I never understood why someone would balk at spending $100 to protect a $1,000 computer. Bad power can cause nasty issues.</font><br> <p> But UPSes are *also* a source of unreliability. If you have only a couple of power flickers a decade (as the UK used to until it privatized a lot of its electricity network and started skimping on maintenance), a UPS *worsens* reliability rather than improving it.<br> </div> Fri, 08 Jun 2018 15:18:51 +0000 Flash storage endurance https://lwn.net/Articles/756951/ https://lwn.net/Articles/756951/ marcH <div class="FormattedComment"> <font class="QuotedText">&gt; harmful since it forces manufacturers to optimise for those benchmarks rather than for users.</font><br> <p> This is already the nature of almost the entire industry except in this case. Yet I don't think anyone would like a benchmark-free world. The answer is rather better and more varied benchmark(s) that are harder to cheat. Considering the relative simplicity of storage interfaces (compared to say... GPUs!) designing such an endurance benchmark that models real-world usage quite reliably doesn't seem crazy. In fact isn't there some endurance benchmark already for less disposable storage products?<br> <p> <font class="QuotedText">&gt; You might need to test a large number to get an accurate MTBF, and it seems impractical and a bit silly to buy a large number of phones just to test a chip that costs a few dollars.</font><br> <p> Fair enough. Then maybe the answer should be something like this:<br> <a href="https://ai.google/research/pubs/pub32774">https://ai.google/research/pubs/pub32774</a> "Failure Trends in a Large Disk Drive Population"<br> Maybe it's happening somewhere already.<br> <p> </div> Fri, 08 Jun 2018 14:06:22 +0000 [slightly off-topic] 2AM? https://lwn.net/Articles/756922/ https://lwn.net/Articles/756922/ awilfox <div class="FormattedComment"> <font class="QuotedText">&gt; Kim said that Android currently declares a ten-minute idle time at 2am that is used to defragment the filesystem. It could perhaps also be used for garbage collection.</font><br> <p> What about night owls like me, that are regularly using the phone at that time? If the phone isn't idle then, does it just wait for the next idle time? Searched ddg but nobody seems to have heard of Android doing defragmenting every 02:00...<br> </div> Fri, 08 Jun 2018 09:55:10 +0000 Flash storage endurance https://lwn.net/Articles/756919/ https://lwn.net/Articles/756919/ excors <div class="FormattedComment"> I think that number by itself wouldn't tell you anything useful - you'd need to know how much writing occurs during the expected usage of the device, to determine how many years the flash is likely to survive and whether it's a real problem.<br> <p> Maybe some device manufacturers measure and optimise their IO, allowing themselves to choose a cheaper chip with lower endurance because they have confidence that it will be sufficient, whereas others don't care and have a higher-endurance chip that wears out quicker because they're constantly spamming it with log files and unnecessary caches and some process is calling sync() every 30ms. Simply comparing the raw endurance would give misleading results as to which device is better, and reviewing devices with misleading benchmarks is harmful since it forces manufacturers to optimise for those benchmarks rather than for users.<br> <p> I suspect it's also hard to get meaningful measurements from a single device, because of the random nature of the failures. You might need to test a large number to get an accurate MTBF, and it seems impractical and a bit silly to buy a large number of phones just to test a chip that costs a few dollars.<br> </div> Fri, 08 Jun 2018 09:04:10 +0000 Flash storage endurance https://lwn.net/Articles/756909/ https://lwn.net/Articles/756909/ marcH <div class="FormattedComment"> [Maybe slightly off-topic sorry but since the flash experts should hopefully flock here]<br> <p> There's some empirical evidence that cheap eMMCs found in - you guessed - cheap Android phones wear out quickly, sometimes even sooner than when security issues there stopped receiving fixes.<br> <p> On the other hand, there's an incredible number of Android sites and communities rooting and reviewing every single Android device under the sun and running many various benchmark on them. Just no... storage endurance test ever? Why?<br> <p> It wouldn't sound like a major feat to run some storage test designed to "break" flash storage as fast as possible thanks to smartly configured write amplification[*] and what not and to measure how many cycles it takes before the memory dies. Or is it hard and why? OK that would cost a sample device but the number of clicks for the corresponding review should hopefully offset that.<br> <p> [*] <a href="https://lwn.net/Articles/428584/">https://lwn.net/Articles/428584/</a> Optimizing Linux with cheap flash drives Arnd Bergmann<br> <a href="https://www.bunniestudios.com/blog/?p=3554">https://www.bunniestudios.com/blog/?p=3554</a> On Hacking MicroSD Cards <br> <p> <font class="QuotedText">&gt; For example, ext4 will issue a discard command but a UFS device might take ten seconds to process it</font><br> <p> LOL. Hey, why would you have half-decent latency requirements for components aiming a market of purely interactive products! I doubt any eMMC was that bad, I mean at least not any brand new eMMC. <br> </div> Fri, 08 Jun 2018 05:17:19 +0000 Flash storage topics https://lwn.net/Articles/756905/ https://lwn.net/Articles/756905/ k8to <div class="FormattedComment"> I would guess at an individually owned computer because they don't understand the realities and/or because it's another thing to deal with that they don't really want to.<br> <p> At an organizational level it's another thing to organize and do procurement and asset management for. Which is basically the same type of dynamic just playing out at a different scale, but here sometimes the paperwork and human hours for the 1000$ computer are larger than 1000$ (and relatedly the paperwork for the UPS could be similar to the computer).<br> <p> It probably still makes sense in the long run, though maybe not if you go thoroughly in the cattle direction.<br> </div> Thu, 07 Jun 2018 22:10:42 +0000 Flash storage topics https://lwn.net/Articles/756899/ https://lwn.net/Articles/756899/ zlynx <div class="FormattedComment"> Yes, agreed. ACI is quite fine for most applications. As long as the files are in one consistent state or another a bit of data loss is acceptable. <br> <p> It doesn't happen very often anyway. Between laptops with batteries and desktops with UPS most of my data loss comes from kernel bugs these days.<br> <p> Speaking of UPS, I never understood why someone would balk at spending $100 to protect a $1,000 computer. Bad power can cause nasty issues.<br> </div> Thu, 07 Jun 2018 20:52:44 +0000 Flash storage topics https://lwn.net/Articles/756884/ https://lwn.net/Articles/756884/ andresfreund <div class="FormattedComment"> Not necessarily. You can still get durability with barriers by waiting for the barrier to complete. But IMHO barriers are more useful for things like flushing the write ahead log because you want to write out buffers, rather than WAL flushes due to commits. Usually you have to sync the log before writing out a buffer that's covered by not yet flushed entries. Barriers can make that a lot more efficient.<br> </div> Thu, 07 Jun 2018 19:15:09 +0000 Flash storage topics https://lwn.net/Articles/756876/ https://lwn.net/Articles/756876/ drh <div class="FormattedComment"> A "write barrier" does indeed help things to run faster, though if you depend on write barrier rather than fsync(), you loss Durability on a power outage. You still have Atomic, Consistent, and Isolated - the first three letters of ACID. But you lose the D.<br> <p> On the other hand, many applications don't care so much about losing a little work during a power outages as long as everything comes back up in a sane state.<br> </div> Thu, 07 Jun 2018 17:55:31 +0000 Flash storage topics https://lwn.net/Articles/756804/ https://lwn.net/Articles/756804/ Tobu That "issue barrier" command would be a perfect fit for some databases. Ensuring a given order is a lot faster than ensuring everything has been persisted to disk, and can be a sufficient guarantee in distributed systems. Wed, 06 Jun 2018 22:58:23 +0000