Anyone know how TRIM works with Linux? I find myself copying entire partitions between SSDs from time to time, is there a utility to clear the destination SSD before copy? Is it possible to do the same for an SD card, so that writing a new Raspi OS to it doesn't do unnecessary garbage collection?
On linux, it can either get done using fstrim (often run periodically, e.g. via cron), which clears unused blocks, or can be done on file delete on supported file systems (e.g. mounting using the discard option). The periodic trim is supposed to be better, as a SSD does guarantee that a trim returns quickly. If you want to trim an entire device, see blkdiscard (take care!).
Everything I Know About SSDs
91–100 of 190 posts
Re: Everything I Know About SSDs
#92Earlier quoted context omitted.
Not OP but in my experience people tend to have trouble comprehending systems of planetary gear sets. Although modern automatics are probably a bit easier to understand than old ones, especially CVTs? As long as you're ok with "the computer just triggers this solenoid.." rather than understanding a big hydrualic computer.
Modern automatic transmissions are actually manual transmissions with a robot moving through the gears as far as I know. However, they do a bunch of stuff that I don't understand like pre-engage the next gear so the switch is faster -- I have no idea how that works
I think you're referring to dual-clutch transmissions: odd gears on one clutch, even gears on the other. So the transmission can switch from eg. gear 2 to 4 with the even-numbered clutch disengaged while transferring power through the odd-numbered clutch in gear 3. When it's time to move up to gear 4, one clutch is disengaged as the other is engaged, instead of having to leave a single clutch disengaged while the gear change happens.
Re: Everything I Know About SSDs
#93Earlier quoted context omitted.
Not OP but in my experience people tend to have trouble comprehending systems of planetary gear sets. Although modern automatics are probably a bit easier to understand than old ones, especially CVTs? As long as you're ok with "the computer just triggers this solenoid.." rather than understanding a big hydrualic computer.
Modern automatic transmissions are actually manual transmissions with a robot moving through the gears as far as I know. However, they do a bunch of stuff that I don't understand like pre-engage the next gear so the switch is faster -- I have no idea how that works
The Howstuffworks article is great. Have fun. https://auto.howstuffworks.com/dual-clutch-transmission.htm
Re: Everything I Know About SSDs
#94So I finally kicked it into Reader View, only to find a lot of questionable spelling and grammar issues.
These kinds of basic things go a long way to making an article valuable.
Re: Everything I Know About SSDs
#95Earlier quoted context omitted.
The big problem with one data center drive is that if that goes bad, you still lose all your data. You're assuming their marketing MTBF is correct. They do make NVME raid solutions now -- with the advantage being that NVME can be faster than SATA. And there are various price points for the NVME drives depending upon speed. This one from 2018 (not sure if it has full raid or uses VROC)(EDIT: it requires software raid)…
Almost all NVMe RAID products—including both that you've linked to—are software RAID schemes. So if you're on Linux and already have access to competent software RAID, you should only concern yourself with what's necessary to get the drives connected to your system. In the case of two drives, most recent desktop motherboards already have the slots you need, and multi-drive riser cards are unnecessary.
Re: Everything I Know About SSDs
#96Excellent summary. One thing he left off: some SSDs continue to copy/erase blocks even if there is nothing new to write because multi-level cell state does degrade over time. There is a concern that some MLC drives will suffer bit corruption over time if not regularly power up to allow this in the background. Citation needed: I only recall this when I was interviewing to work for Western Digital many years ago.
Re: Everything I Know About SSDs
#97Earlier quoted context omitted.
At some point, I think around the mid '90s or early 2000s but maybe earlier, though, seek time was fast enough on widely available drives that on average for random access you spent about as much time on the right cylinder waiting for the sector you wanted to rotate to under the head as you did on seeking to the right cylinder. You could get some decent gains then if you made your scheduler take rotation into account…
> I don't think that there were any drives that would tell you this. SCSI drives wouldn't even tell you the geometry. IDE drives would tell you a geometry, but it didn't necessarily have anything to do with the actual geometry of the drive. I thought the point of native command queuing was precisely to enable the drive itself to make these lower-level scheduling decisions, while the OS scheduler would mostly deal wit…
The main purpose of NCQ (and SCSI command queuing which came way before it) was to allow higher levels of parallelism at the drive interface. This does allow the drive to do some smart scheduling, but still only within that fairly small queue depth. Scheduling across larger numbers of requests, with more complicated constraints on ordering, deadlines, etc., remains the OS's job. And once it's doing that, the incremental benefit of those on-disk scheduling smarts becomes pretty small.
Re: Everything I Know About SSDs
#98Earlier quoted context omitted.
> I find myself copying entire/ partitions between SSDs from time to time, is there a utility to clear the destination SSD before copy? The way TRIM works, you don't need to trim blocks right before overwriting them. TRIM is for blocks that you aren't going to care about for quite some time, it essentially returns them to the SSD management layer for use as overprovisioning.
> The way TRIM works, you don't need to trim blocks right before overwriting them. In my experience "blkdiscard /dev/DESTINATION_DISK" does improve the speed of dd'ing a disk to another one quite a bit though. And that does make some sense IMHO: If the SSD's internal datastructure which keeps track of pages which hold user-data is empty then each write will consume less time for looking up if the specific sector is c…
Re: Everything I Know About SSDs
#99Earlier quoted context omitted.
Almost all NVMe RAID products—including both that you've linked to—are software RAID schemes. So if you're on Linux and already have access to competent software RAID, you should only concern yourself with what's necessary to get the drives connected to your system. In the case of two drives, most recent desktop motherboards already have the slots you need, and multi-drive riser cards are unnecessary.
PERC HP740 controllers in Dell servers iirc are hardware raid for the flex port U.2 and backplane pcie nvme drives.
Re: Everything I Know About SSDs
#100Earlier quoted context omitted.
Ok, I've studied the Flash storage (most SSDs these days) technolgy and can be understood like this: * At the "lowest" level, there's a little cell that it's very much an EEPROM (but better, because newer tech). This little cell can hold 1, 2, 3 or 4 bits, depending on gen/tech. * You group a bunch on those cells together and they form a page. Usually it's 1024 cells a page. * You group a bunch of pages together and…
Your quantities are way off if you're trying to describe the kind of NAND flash that goes into SSDs. Typical page sizes are ~16kB plus room for ECC, so a page is several thousand physical memory cells, not just one thousand. Erase blocks are several MB, so at least a thousand pages per erase block. A single die of NAND typically has just 2 or 4 planes, each of which is at least 16GB.