laitimes

SSDs getting slower and slower? See how the engineer "riot operation" saves!

Do you feel that SSDs are getting slower and slower to use? What's going on?

There are so many legends about SSDs in the jianghu, which ones are true?

EDA365 e-Forum

1

Why is it slower and slower to use SSDs?

To answer this question, we have to mention the erasure process (P/E) of the SSD.

For ease of understanding, we use these small grids to represent the unit storage space of flash memory, where the white grid represents the blank storage space and the blue grid represents the storage space of the stored data. A gray area with small grids represents a storage area.

When you delete a file, the hard disk will not immediately erase the data in the corresponding location, but will mark it with a "null".

SSDs getting slower and slower? See how the engineer "riot operation" saves!

When you want to store a file, the hard disk will not write new data in the marked location, but will store the data in a blank area, taking advantage of more storage space.

SSDs getting slower and slower? See how the engineer "riot operation" saves!

As the number of reads and writes increases, the empty space in the hard disk is quickly used, and if new data is written, it is necessary to free up these marked locations, that is, to erase the marked data.

But to erase the data, you can't just clear the corresponding grid, but you must empty a whole area before you can write new data.

This process is called write amplification (WAF), and it means more complex steps, longer time consuming, and more erasing times.

Let's take a concrete example:

When writing a data "7", the worst case is that there is no clean grid in a block, but the invalid data (marked as "empty") can be erased, so all the data should be read to the cache, erase all the data in the area, and then write the new data.

Then the write amplification brought about by this operation is that originally only one grid needs to be written, but in fact, the entire block is written.

SSDs getting slower and slower? See how the engineer "riot operation" saves!

At the same time, the operation that originally required only a simple step of writing data became: the cache reads the entire area - the cache modifies the data - erases the entire area - writes all the data, a total of four steps, and the latency will be greatly increased compared with direct write.

So: the more you use SSDs, the slower you get? I don't blame you for stuffing it too full

SSDs getting slower and slower? See how the engineer "riot operation" saves!

Knowledgeable partners know that for the computer field, the numbers such as 256 and 512 are "integers", why are the SSDs on the market often 240G or 480G? This is by reserving space, forcibly preventing everyone from filling the hard disk, thereby extending the use time of the hard disk.

Stuffing the disk too full will affect the performance of the SSD, but the real impact on the life is actually the number of erases, when the number of erases to the limit, the SSD will be damaged, the data inside will also be lost, so how to judge how long the SSD can "live"?

2

How to calculate the life of an SSD

SSD life calculation is very simple:

Here are some examples:

If you buy a 2TB SSD with a total number of erases and writes, assuming that 100GB of large-capacity data is written to this SSD every day, then according to the calculation, you can get:

Service life: (2048 * 1000) / (100 * 365) = 56 years.

SSDs getting slower and slower? See how the engineer "riot operation" saves!

A good SSD and use it well and it can stay with you until retirement.

3

How do I maintain my SSD? Are the rumors true?

Reading this, in fact, you already know not to stuff the hard disk too full, but there are many experiences in the maintenance of solid state drives circulating in the jianghu! Are those all true?

Partitions affect SSD performance—fake!

SSD partitioning does not affect hard drive performance.

Some people may say that "data is stored on C disk, the fastest reading speed", "every time a zone is divided, the system will reserve a certain cache, resulting in a certain amount of capacity waste." "The number of erases and writes is limited, and long-term reading and writing to the system C disk may lead to shortened life." In fact, for SSDs, these worries are superfluous!

SSDs getting slower and slower? See how the engineer "riot operation" saves!

The spindle of the mechanical hard disk is rotated at a constant angular speed, so that the area of the disk sector swept by the outer ring is always greater than that of the inner ring, the C disk is located in the outer ring, and the sector area swept by the magnetic head is the largest per unit time, so the system is the fastest to install the C disk, and then the speed of the D, E, F disk is decreasing.

The SSD is mainly composed of components such as master control and flash memory particles, and there is no mechanical structure of the mechanical disk. The speed of data is the same no matter which piece of solid state it is present.

And with the continuous development of solid-state drives, the main control of solid-state drives on the market is also constantly upgrading, and it is becoming more and more mature in terms of garbage collection, reserved OP space, automatic allocation, erasure and write balancing and other functions. Don't worry about partitioning causing wasted capacity or excessive scrubbing in a certain location.

Disk defragmentation optimizes performance—fake!

SSDs getting slower and slower? See how the engineer "riot operation" saves!

In a mechanical hard disk, files are not continuously stored in contiguous clusters of disks, but where there is space, because the files are scattered to different places on the entire disk, disk fragmentation is generated. In the process of saving new and deleting old, disk fragments become scattered. In this case, the read increases the hard drive seek time and also increases the energy consumption.

Therefore, the disk defragmentation function is to organize the disk defragment files, so that the fragmented files are integrated, which accelerates the seek time of the disk, thereby speeding up the speed as a whole.

So why don't SSDs need to be defragmented?

The SSD seek time is almost zero: the storage unit of the SSD is based on the electronic storage of flash memory particles, so the seek time is theoretically eternal, and its performance mainly depends on the performance of the main control chip and the process of flash memory particles.

SSDs have a limit on the number of reads and writes: a disk defragmentation is equivalent to a full disk read and write, which is equivalent to the number of erasures and writes minus 1, which shows how much disk defragmentation consumes the life of the SSD.

In fact, after the system recognizes that the SSD is installed, it will turn off this function by default. So let's not turn it on when using an SSD just because it looks like it can "save space on the hard drive".

To update the SSD firmware—really!

If we compare an SSD to a small computer, then firmware can be understood as its operating system. Firmware controls all the internal operations of the SSD, which can directly affect the performance, stability and life of the SSD.

SSDs getting slower and slower? See how the engineer "riot operation" saves!

Excellent firmware reduces unnecessary writes to SSDs, thereby increasing the life of SSDs while improving SSD performance. Therefore, we want to update the latest firmware released by the official in time.

Can I turn on Trim to improve hard drive performance? — Really!

The Trim directive is also called disable delete notify. As we said before, SSDs delete a data by marking the data first, and then erasing the unused data when the system requires the data to be written in the marked place, so that the best optimization cannot be made at the most appropriate time.

Trim can solve this problem very well, after turning on Trim, the SSD can immediately delete the content that needs to be deleted, and avoid the embarrassment of waiting until the time to write the data to delete the data.

SSDs getting slower and slower? See how the engineer "riot operation" saves!

Trim didn't change what she was supposed to do, just did it ahead of time. So when you use it, the speed goes up ~ Trim can effectively reduce write amplification, thereby obtaining higher throughput and increasing the durability of SSDs.

But!! After opening Trim, it is basically impossible to recover the accidentally deleted data...

SSDs getting slower and slower? See how the engineer "riot operation" saves!

In summary, the reason why SSDs are getting slower and slower is because the SSD mechanism is based on the principle of write amplification. So in order to ensure that the SSD can always run at high speed, we want to:

Use SSD capacity wisely

Keep firmware up to date

Turn on Trim mode

Do not turn on disk defragmentation

Articles are compiled from ZTE documentation

——END——

Share Likes in watching

The "Three-In-a-Row" action is full of momentum!

Read on