📜 ⬆️ ⬇️

You yourself are a hard drive! Understanding the design of SSD

Hi, Giktayms! As long as the solid-state drives do not outweigh the HDD in terms of price and capacity, buyers will continue to nod to the hard drives and tell them that “exactly the same drives are distributed there much cheaper.” Therefore, in the name of a great struggle with increasing entropy and just for the sake of education, it is necessary to talk about the design features of SSD.


When phenomena or objects progress, it is considered that they become more difficult. Already in the computer industry - so for sure. Users of such truths are in the form of "conspiracy theories", they say, all devices today fail the next day after the warranty. Enthusiasts, by the way, in such lamentations also do not lag behind and complain that new technologies cannot be repaired with the help of scotch tape and a soldering iron, and suspicions are only aggravated from year to year. By the way, the automotive industry has already passed a similar path.
But with SSD, the story was different - they did not become the next stage in the evolution of drives of the previous type, but went public, when hard drives were already, to put it mildly, not new. For decades now, the read head in the HDD is worn over the ferromagnetic layer and reads information from the tracks on the “pancakes”. Of course, over the years, the mechanics became more complicated and today this very head does not even work in a vacuum (although the myths around hard disks are saying the opposite), but in helium, but you must agree - these are just updated scenery for the old play.

With solid-state drives, the situation is simpler and more complicated at the same time. They are not even the old "measurers" to measure. Previously, the performance of hard drives could be determined "by eye" by the speed of rotation of the spindle (any pioneer knows that 7200 rpm, all other things equal steeper than 5400 rpm) and the amount of cache memory. But the “gramophone” principle of reading information goes down in history, and a variety of flash memory came in its place, a crowd of manufacturers of controllers, each with its own model line, and all this with all the same memory buffer and new abbreviations IOPS, TBW, DWPD and other unknown words.
But all this - not even marketing terms, dummies, and important information that will help choose the SSD, predict its service life and even predict in advance the speed of the latest models. Today we will understand what the controllers control and why they need a cache, how the SSD reliability is measured and what standard abbreviations actually tell us.

Controller - "manager" of flash memory in SSD


No one likes extra bureaucracy, especially in computer components, but since its invention, the correct mode of operation has been vital for drives. Such a mission could be entrusted to the “brains”, that is, the PC operating system, but incompatibilities and software conflicts have all gotten from time immemorial, so hard drives communicate with the computer through an integrated circuit, and a controller and an employee are built on the SSD printed circuit board his noodle is a cache.
The operation scheme of a solid-state drive is similar to the typical fuss in a network supermarket. The controller is such a supply manager ... oh, sorry, store administrator. Supervises the reception of goods (files), distributes them to the warehouse (writing to cells in flash memory), commands the loaders when it is necessary to replenish the sales area (reading from memory cells) or demands to transfer the goods to showcases with dairy products to the place of household chemicals (TRIM function ).
')

Kingston SSDNow V300 Drive - thanks to comrade SandForce for our happy upgrade!

The controllers remain modest laborers without their heroic chronicle: well, you can't get to paint and write their onward evolution. If you dig really too deep, the chips of this type are rooted in the old Intel 8051 and are not painfully intelligent, but fast enough and reliable “think tank” of the drive. It consists of a processor with ARM / RISC cores, in everyday work it finds and corrects memory errors, handles data from the buffer (cache), controls data transfer to SATA / PCIe interfaces, encrypts files when it is required, and even cleverly “spreads” the data on NAND, so that the cells wear evenly and the drive lasts longer. A supervises all these troublesome microprogram (firmware), popularly known as "firmware".
Today, mass SSD controllers use a strictly parallel memory connection. Because a single mover Vasya will not have time to perform the tasks of the administrator as quickly as is required of him. Another thing is that with the distribution of responsibilities between the team of movers work will be wrapped up at the proper pace. Now you understand the benefits of multi-channel NAND connectivity for operations with a large queue depth.
There are a lot of controller manufacturers today (SandForce, Phison, Marvell, Indilinx, LAMD, MDX, Intel, Silicon Motion), but they differ from each other in a far from fundamental way. The difference is found at the level of the business approach. For example, SandForce and Phison release to manufacturers of SSD controllers "turnkey" - with firmware and software for maintenance. The rest of the manufacturers sell controllers cheaper, but with a larger share of self-service manufacturers. Or they don’t sell them at all and leave them for their products - for example, Intel and Samsung do this.
Over the years of widespread use of SSDs, truly “memetic” models of controllers have appeared. One of these representatives is SandForce SF-2281 - the superstar of the SSD industry, which, like many of our idols, was not honored to leave in time and become a classic. A few years ago, when this model went into production, SSD manufacturers snapped it up in huge quantities. That's because, in addition to the notorious “service with a human face”, LSI SandForce included a very interesting feature in its controller - data compression.


The SandForce SF-2281 controller did without a separate cache, but modern Phison with it necessarily interact

Unlike hard disks, where the location of files in memory depends on the file system, in SSD files are stored in blocks there, according to the flow of the controller. And there is nothing wrong with that - a good wine does not get worse if it is not poured from such a fabulously beautiful barrel, as in an advertising booklet. But, if for successive operations the distribution of files is already done in an optimal way, then moving / copying a pack of small files is a troublesome job (a huge number of similar operations) and labor-intensive. Considering that the smallest files in the routine of the operating system are either part of the program or are documents, LSI taught the SF-2281 controllers to compress such files and, due to this, to improve the speed of work.
In addition, the 2281st was unique due to the absence of a separate cache for everyday needs - all operations were performed within the framework of the service memory of the controller. In terms of price / performance and durability, such drives were “driving” for a long time, but today such an attitude has been shaped to such a model as to Windows XP (in the sense that there were good times, but who remember the past ...), therefore all new Kingston drives gradually moved to Phison hardware platform. Performance based on such models varies depending on the class of the drive, but 8-channel quad-core chips "go" quite in the spirit of the times, are able to recognize "empty" (with a large number of empty blocks, in other words, zeros) data and work with them faster and most importantly - do not allow the degradation of the speed of the drive and work reliably.


Block diagram of a 4-core Phison PS3110-S10 controller in new Kingston drives

Such qualities of our company have always been impressed , especially since we all watched the drive from a well-known manufacturer of smartphones, in which, due to the lazy “garbage collection”, the speed of work sags to anecdotal values. However, in our top model HyperX Predator, the Marvell 88SS9293 controller is used - in the flagship drives, the ability to “dazzle” the firmware is worth a lot.

What is the buffer memory (cache)




Even modest SSDs cannot do without memory buffer today.

Loyal apprentice and assistant controller. It does not increase the speed of the drive by itself, but helps in routine tasks. For example, as soon as the operating system gives the command to erase / change files on the drive, the following trickiness begins inside the SSD:
1. The block that needs to be changed is sent to the cache memory and video changed there, as requested by the "OS";
2. The source data in the NAND microcircuit is sent to be deleted, the controller looks to the data from the buffer a new location based on the cell wear;
3. Cache rewrites modified data to a new location.
From the same cache, from time to time, tables with service information about the state of NAND and cells that have completely worn out are roaming. In general, the “bring-bring” and “let the elder look at the flowchart” tasks this SSD component performs regularly.

Rode IOPS through TBW, sees - DWPD


When a new SSD only hits the market, it’s not always possible to create an impression of its speed and reliability before the release of thematic reviews. Previously (and still others), companies struggled with a lack of information with epithets “an incredible, amazing, unprecedented technological storage for demanding customers,” but today there is a risk of hanging noodles on geeks, so dry figures and specific terms come to the rescue.
IOPS (input / output operations per second) or “the number of I / O operations per second” is the number of blocks that manage to be counted or recorded in order to see for yourself what time period. IOPS is calculated elementary: we divide the reading speed by the block size. If a file with a volume of 10 KB is read at a speed of 1000 KB / s, then the drive's performance in this particular mode of operation is 100 IOPS.


Iometer is a middle-aged, but time-tested, IOPS measurement utility.

To avoid disagreement, such readings are now taken with the help of the Iometer program, and modern Kingston drives, for reference, squeeze (read / write files weighing 4 Kbytes) of the order of 95000/26000 IOPS in the case of low-cost models and 160000/130000 in the case of the flagship HyperX Predator.
It is clear that large data blocks of SSDs operate much faster than small ones, so manufacturers indicate the maximum possible number of IOPS for random and sequential operations. These data should be treated in the same way as the “up to 100,500 Mbit / s on your unlimited tariff!” Marks from Internet providers, but for the lack of accurate test results, such SSD information will be useful.
TBW (Total Bytes Written) is the amount of data that can be written to the SSD before it emanates air. The larger the number (and today this figure is already indicated in petabytes), the more reliable the drive and, as a rule, the longer the warranty period. The inspiring figures warm the soul, but you need to remember that in reality the drive will wear out earlier - too much depends on the number of unoccupied space on which the controller will conduct its vigorous activity and fight with the wear of cells. By the way, we invite everyone to take a look at how our drives behave when working "for slaughter".
DWPD (Drive Write Per Day) is a fun meter that shows how many times a day you can completely overwrite a drive from the first to the last day of the warranty. In a word, computing is like calculating a lifestyle from our beloved social quotas, where going beyond N-kilowatts of electricity means "you hit, guy, pay double / triple / some other tariff." So the buyer of components is free to estimate how many gigabytes he drives through the drive per day, and then assess whether his SSD will work out its life before the end of warranty service.

The main thing is not the size, but the ability to use


We deliberately did not dwell on the details provoking a yawn. Because the numbers are slightly above the market averages / failures of many drives were local in nature and after years are not impressive. We will also not “stitch to business” the results of testing of individual models - we will still have time to savor the nuances of processing commands and garbage collection with individual controllers in the topics dedicated to testing. In short, after we have dealt with the typical construction of modern SSDs today, it's time to delve into the unique innovations of such drives. We will talk about this in the near future.


Thank you for your attention and stay with Kingston on Hiktatimes!

For more information about Kingston and HyperX products, visit the company's official website . In choosing your kit HyperX help page with visual aids .



Our previous posts:

Source: https://habr.com/ru/post/371997/


All Articles