When the SSD capacity is full, the speed becomes slower.

Editor’s note: This article is from WeChat public account “ 雷 科技 ” (ID : Leitech).

Every time you buy a computer, you will find that the configuration storage introduction is always different, either pure solid state (SSD), or pure mechanical, or a solid state + mechanical combination hard disk.

The main difference between the two is that solid-state is semiconductor storage, while machinery is electromagnetic storage. The maximum read speed of a solid state hard disk is 400-600MB / s, while the maximum read speed of a mechanical hard disk does not exceed 200MB / s. Although the speed of SSD is much faster than the mechanical hard disk, it has a more serious problem. After a long time, it will obviously feel that the speed has dropped. What is the actual cause? The case has been solved, and I finally know why mobile phones and computers are getting stuck

What is it? SSD? First, we need to understand the basic concepts of SSD. Solid state hard disks refer to hard disks made from solid-state electronic memory chip arrays. It consists of a control unit and a storage unit .

Currently, solid-state hard disks on the market are divided into two categories. The first category uses Flash (FLASH chip) as the storage medium, and the second category uses DRAM Is the storage medium.

Flash-based solid state drives, also known as SSDs. This kind of hard disk has a very wide range of applications. Notebook hard disks, U disks, memory cards, etc. all belong to SSD.
SSD is mainly composed of main control, flash memory and cache. Among them, flash memory plays a key role, because it is the flash memory particle responsible for storing data, which largely determines the performance life of the SSD. The case is solved, finally I know why mobile phones and computers are getting more and more stuck

The flash memory Refers to an electronic erasable programmable read-only memoryForm, a memory that is allowed to be erased or written multiple times during operation .

There are currently four types of flash memory particles: SLC, MLC, TLC, and QLC. . A storage unit of the SLC flash memory can only store 1-bit data, in other words, it can only store a 0 or a 1, which is a total of two states. A memory cell of MLC flash memory can store 2bit data, 0 and 1 can be arranged and combined, and has four states of 00, 01, 10, and 11. In analogy, QLC is the latest flash memory particle, and its storage capacity is 8 times that of SLC. 0 and 1 can form 16 states.
The case has been solved, and finally I know why mobile phones and computers are getting more and more stuck Although the flash memory capacity of SSD It continues to increase, but the number of erases and writes decreases. This also means that the life of the SSD is shortened. Compared with QLC, SLC has 100 times the service life . The case has been solved, and finally I know why mobile phones and computers are getting more and more stuck

In addition to flash memory, < strong> SSD interfaces are also divided into four categories, they are SATA, mSATA, M.2 and PCI-E .

SATA is a computer bus with three specifications of SATA 1.5Gbit / s, SATA 3Gbit / s, and SATA 6Gbit / s. The read and write speeds are 150MB / s, 300MB / s, and 600MB / s. , Suitable for almost all desktops and laptops.

mSATA is a mini-version SATA interface, with two specifications of M50 msata and M30 msata, with a read and write speed of 520MB / s, which is mainly suitable for ultrabooks, such as Lenovo’s E220s, E420s, Y460, etc.

M.2 is a new interface specification from Intel that replaces mSATA. It has two types: Socket 2 and Socket3. The maximum read speed of Socket 2 can reach 700MB / s, while the theoretical bandwidth of Socket 3 can reach 4GB / s. Socket 2 is suitable for some mid- and low-end notebooks, and Socket 3 is almost suitable for newly launched desktop motherboards and mid- to high-end notebooks. PCI-E is a high-speed serial computer bus. It has 5 versions, ranging from 1.0 to the latest 5.0, with read and write speeds of 250MB / s, 500MB / s, and 984.6MB / s, respectively. , 1969MB / s and 3938MB / s, suitable for almost all desktops. The case has been solved, and finally I know why mobile phones and computers are getting more and more stuck

Overall, SSD Different flash memory particles have different read and write speeds and erasing times. The larger the capacity of a flash memory, the more limited its service life. The difference in SSD interface directly affects the read and write speed.

Write amplification and garbage collection

However, the above two reasons affect the speed of SSD before use. The reasons for the decline in speed after use are mainly divided into two aspects: Write Amplification (WA) and Garbage Collection (GC) .

WA is a bad phenomenon in flash memory and SSD, that is, the amount of physical data actually written is multiples of the amount of written data . Because the FLASH chip needs to be erased and rewritten first, it needs to read the entire document where the target data is located to buffer it, then overwrite the data you want to rewrite to the buffer, and finally write the buffer to another A manuscript, so even if you update a byte, 4KB of data is actually written to the FLASH chip. This also caused the size of SSD write files to double, resulting in smaller and smaller hard drives and slower write speeds.
The case is solved, and finally I know why mobile phones and computers are getting more and more stuck. The GC will look for discarded or deleted documents in the FLASH chip, and then erase this document to store your new data.However, because the erasure unit of GC and FLASH is inconsistent, the writing is performed according to the manuscript, and the erasure is based on the block file type. There are 16 manuscripts in a block. When the GC finds an abandoned manuscript, it actually changes. Manuscripts need to move the remaining 15 files in Blovk to somewhere else. So whenever you update 1 byte, there are actually 16 manuscripts written in the background, one manuscript is 4KB in size, and 16 manuscripts are 64KB. In this way, the capacity of the SSD will be doubled, and the writing speed will eventually decrease.
The case is solved, finally I know why mobile phones and computers are getting more and more stuck

Simplified In other words, as your SSD stores more data, blank documents will decrease. In order to make extra space, the GC will look for discarded documents. As the number of times increases, the speed of SSD will naturally slow down. / strong>.

In addition, the GC is not dispatched when it needs to write data. Even if the SSD is idle, it will operate quietly and reserve some space in advance.

So how to avoid the problem of slowdown of SSD due to too much data stored?

The manufacturer ’s approach is to formulate different solutions based on the SSD level. For example: Entry-level SSDs reduce the available capacity and reserve a part of the space to prevent the SSD from being completely written. Full . The most intuitive example is that some computers clearly write a storage capacity of 512GB, but the actual use is only 480GB.
For mid-to-high-end SSDs, they will carry additional caches to reduce write amplification . Like Samsung 970 PRO NVMe M.2 1T is equipped with 4GB of cache capacity. The case has been solved, finally I know why mobile phones and computers are getting more and more stuck

Users can align by 4K , Trim command, wear leveling and other functional mechanisms to reduce write amplification.

Measurement: Impact of SSD Burst Capacity on Speed ​​

In order to further confirm if the SSD capacity is full, it really affects the speed, we conducted a test. Before testing, MacBook Air (The 2018 model) has a remaining SSD capacity of 71.58GB. Using the Disk Speed ​​Test, the hard disk has a write speed of 492.1MB / s and a read speed of 1832MB / s. The case is solved, finally I know why mobile phones and computers are getting more and more stuck

Next, we want to Reduce the available capacity of the computer, reserve 9.02GB of space, and then test the speed of the SSD again. At this time, the SSD write speed became 448.2MB / s and the read speed was 1791MB / s.

Comparing with the previous set of data, you will find that as the available capacity of the SSD decreases, the write speed and read speed decrease.
The case has been solved, and finally I know why mobile phones and computers are getting more and more stuck After the PC end test, we come again Look at the mobile end. MoFirLee has an iPhone 11 with a capacity of 64GB. The remaining capacity of the hard disk is 27.2GB. The hard disk write speed measured using DiskBench is 201.7MB / s, 142.1MB / s, 135.2MB / s, and the average write speed is 159.7. MB / s, the read speed is 360.6MB / s, 485.9MB / s, 387.1MB / s, the average read speed is 411.2MB / s. The case has been solved, finally I know why mobile phones and computers are getting more and more stuck

The available capacity of the mobile hard disk has changed After 1.17GB, the write speed is 183.7MB / s, 159.6MB / s, 195.5MB / s, the average write speed is 160.6MB / s, and the read speed is 609.7MB / s, 610.3MB / s, 510.6MB / s, the average read speed is 510.7MB / s.

Compared with the previous group of data, the first hard disk write speed does decrease, but the second and third data are faster than the previous group, and the three times of read speed are faster than the previous group. The reason for this may be the algorithm and optimization of the main control, so the measuredThe data are different.
The case has been solved, and finally I know why mobile phones and computers are getting stuck

Summary

Nowadays, we can use 8 words to describe the situation of SSD. There is a kind of retrogressive progress. At present, SSDs on the market, the more advanced the process technology, the shorter the life span, which in turn results in faster speed. It can be seen from the side that manufacturers have chosen to sacrifice something when the existing technology cannot break through.

Before use, the factors affecting SSD speed include flash memory particles, interface types, the quality of the main control, and firmware upgrades. After use, write amplification, garbage collection mechanism, and poor storage habits are the main reasons affecting SSD speed. Although a good SSD is fast, the service life will decrease and the price will be higher. Cheap SSDs are average speeds but have a long service life. As for how to choose, it depends on individual needs.

In order to avoid the problem of slowdown due to insufficient available capacity of SSD, it is best to back up all the data of each hard disk, and then do a 4K alignment. If you have just bought a computer and the hard disk type is solid, you can format the SSD before using it. As a result, your SSD speed will not drop so easily.