3,517 karma · joined Jul 23, 2021 (5y ago) · 2,823 submissions
comment 3y ago · link · parent
NAND pages are what, something around 16-64kB these days, and block sizes are 10s of MB. In SSDs the logical size of those things may end up being larger at the FTL level if they are ganged together, but that's about your minimum.
Those are program and erase units respectively. With NAND, you do not erase a block to write. You can program pages in a block incrementally, and then you have to erase the entire block before reprogramming any.
Flash translation layers have to make this look like a disk. To do that they will do something like gather writes into a page size chunk in a small cache that is non-volatile or can persist itself on power failure. Then that chunk is programmed out to a free page. A mapping structure records the new NAND location of the logical block addresses you wrote. And a garbage collector comes along behind and compacts and frees data in block size units, erases them, and puts them on the free list.
It's a log structured filesystem with one file (the block device), if you've read any of those papers.
If you write+fsync to sector 0 of your disk 500 times, that data will get stored at 500 different places on the NAND (ignoring larger persistent caches in front of the NAND that some devices have). Selecting what pages to use and what to garbage collect etc is all part of wear leveling that is intended to prolong live of the drive. That's why endurance ratings tend to be in total writes to the drive, not writes to any particular sector.
To handwave the numbers, if you have a 100GB SSD that might be implemented with 105GB of NAND. Then if you had a program/erase endurance of 1,000 cycles you will be able to write that block 25.6 billion times. Your drive can do about 20-30 thousand QD1 writes per second, so about 12 days of that write+fsync block workload. Again assuming no front end cache on it.
You definitely can wear out NAND drives if you write a lot to them (large streaming writes would be easier to do it with), but regardless of what you do in the software layer, the drive will (should) last for its rated endurance no matter what kind of write patterns your application does. A block is a block as far as the NAND sees.
For consumer stuff you generally have to be pretty extreme or have malfunctioning software to wear them out as far as I've seen.
> A hard drive is fine with this access pattern, though you'd probably be doing a lot of seeking to update fs metadata and it would be so slow that you'd come up with some other way. So maybe this pathology only exists in my mind.
comment 3y ago · link · parent
China looks terrible compared to almost all other significant economies. When fundamentals like electricity production are much dirtier, you don't need to look much further downstream.
> But it doesn’t matter regardless
What "doesn't matter"?
> because any attempt to impose authoritarian climate measures on China will send the West into economic crisis, one way or another.
International terms of trade can not be "authoritarian", by definition. That's an ironic misunderstanding: if you want authoritarian look no further than the communist dictatorship ruling the country.
comment 3y ago · link · parent
When I worked on FTLs it was always a thing executives and product managers liked to talk about but didn't seem to provide incredible results and people generally didn't like using them because it was just harder / different to manage. Has that changed?
comment 3y ago · link · parent
It's not really that so much as contiguous or nearby access is faster on NAND, just like it's faster on hard disks, so software optimized layout and access patterns can look similar for both.
> CPUs are similar. People started writing programs in C, so CPUs started optimizing for the outputs of C compilers.
This didn't start at a one-way street. Actually CPUs were around first, so the first C compiler optimized for the CPU it generated code for. And from that point onward, C compilers optimize for the CPU.
> If someone were to invent CPUs and compilers today, the list of optimizations would probably be different, and the performance characteristics of real-world software would probably be different. (It's not just C; people wanted virtual address spaces, and that was slow in software, so now there is a TLB, etc.)
Unlikely. At the periphery yes, but there are fundamentally difficult things for CPUs and compilers to do which shape the solutions. Before somebody says "those fundamental difficulties might be different if we invented things differently" - the story of CPUs and of compiler optimization is about inventing ways to make those fundamental difficulties less difficult.
There wasn't one day somebody invented the CPU and that was that, millions of people around the world have worked countless hours inventing and improving parts of CPUs and compilers for the past 70 years or so. There is inertia, but new ideas that are good enough can catch on even if it means entirely new models and ecosystems have to be invented. That's how we got multiprocessors, clusters, SIMD, GPUs.
comment 3y ago · link · parent
While we're off on this wild tangent though, do you feel the same way about the hypocrisy of the ruling class. Do you think Barack Obama, Al Gore, Bill Gates, et al have "no right to complain" about emissions generated by us commoners?
Would that be a reasonable response for everybody, whenever a politician or elite says emissions need to be reduced? Stamp their feet and say no, because we deserve to emit as much as you do?
comment 3y ago · link · parent
It's not perfect, every situation is a bit different, but China is such a dirty outlier compared with other major economies and the world that you can't handwave it away - https://www.iea.org/data-and-statistics/charts/co2-emissions...
Producing something in China versus most other places means emitting more carbon.
comment 3y ago · link · parent
For what it's worth, it's perfectly possible to be disillusioned and angry at the ruling class and their policies and their hypocrisy and profiteering at the expense of the environment, while also wishing for real uncorrupted environmental action. Some people are sick of it all and have given up on it. I place a lot more blame on the people who soured their attitudes.
comment 3y ago · link · parent
FWIW I more often see the "eat the bugs" meme in response to obscenely rich elites and politicians advocating policies that require sacrifice from commoners.
comment 3y ago · link · parent
China's per-capita emissions aren't even great. Worse than many advanced economies.
comment 3y ago · link · parent
I don't see it as a dismissal of real environmentalists, more a laugh at the hypocrite corporatist ruling class who take their private jets and mega yachts to conferences where they pat one another on the back and tell everybody else to eat bugs. Them, and the army of sycophants and apologists who they've fooled.
comment 3y ago · link · parent
Not even Debian has said they would remove it in a future release? I'm not sure what you mean here, Debian has a reputation for being glacial...
> So, is Wayland ready? I've been afraid to try it, but maybe it's time to take the plunge.
Yes, it's increasingly becoming the default on desktop distros, it's pretty good. Some apps still lack support for it I guess. I recently upgraded to a distro where it was enabled and didn't notice any difference except for a screen recording app didn't support recording with sound unless I switched to X.
> How is gaming on Wayland? I'm afraid many games have been compiled for X.org.
AFAIK such things just start under an Xwayland session transparently. Phoronix seems to do a lot of gaming tests of wayland, I don't really know the details but clearly something works for some games at least.
comment 3y ago · link · parent
Source?
> The IMF is no saint, but they at least is looking to improve things, despite not acting altruistically.
Should I consider you likely covert operation from China or Russia because of the accusation that IMF is no saint and does not act altruistically?
comment 3y ago · link · parent
And we'll ignore carbon to manufacture the truck and create and maintain the roads, warehouses, and other transport infrastructure.
comment 3y ago · link · parent
They must have been tiring for management to work with. And I go in to bat for my colleagues, and it has not always made me popular with management and executives, but there are better and worse ways of approaching things.
If you are unwilling to accept that a decision has been made for a reason other than discrimination, bullying, or retaliation, it's no longer a good faith dialogue. Expecting other parties to continue talking and negotiating as though it were, whether or not they are guilty of these things, is silly. That's the point where you need a lawyer, or an exit plan, or to read through a lot of statute and case law, or all of the above. By all means try to get them to keep talking and collect evidence, but the fact they don't want to deal with you any more isn't exactly evidence of anything by itself.
I'm not saying this person is wrong or did the wrong thing. I really don't have enough information. But this is a company that investigated their co-founder and CTO and kicked him out for harassing two trans employees, more than half their "leadership team" appear to be minorities or women, they have hired several trans people including at least one who got spectacular performance reviews and was being promoted. On its face I would have to entertain the idea that they are not engaged in wide scale discrimination of anybody who is not a straight white male.
This is also quite a serious step for the person to make, whether or not there are legal ramifications (and I hope they got very good advice about breaking their NDA). But what would an employer think about hiring this person after reading this? What would be the best outcome for them? The worst?
comment 3y ago · link · parent
I would accept that logic from a well meaning child, but not a serious adult.
The obvious questions to any reasonable person would be, how much does this actually help the environment, what alternatives are there, and what might be the consequences of doing this. Banning straws never even got close to having good answers to any of these, and yet you were a dumb greedy redneck who hated the environment for pointing it out.
It's clear where the value for this came from, and that was as a tool to bash political opponents with.
Do you really not examine costs and benefits when you think about what motivates people?