In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > IT Information >
Share
Shulou(Shulou.com)11/24 Report--
Do you feel that solid state drives are getting slower and slower? What's going on?
There are so many legends about solid state drives, which are true?
01 Why are solid state drives getting slower and slower? To answer this question, you have to mention the erase and write process of solid state drives (P / E).
For ease of understanding, we use these small squares to represent the unit storage space of flash memory, where the white grid represents blank storage space and the blue grid represents the storage space of existing data. A gray area consisting of small squares is used to represent a storage area.
When you delete a file, the hard drive does not immediately erase the data in the corresponding location, but marks it as "empty".
When you want to store a file, the hard drive will not write new data in the marked location, but will save the data in a blank area, making use of more storage space.
With the increase of the number of reads and writes, the blank area of the hard disk will soon be used. If you want to write new data, you need to free up these marked places, that is, erase the marked data.
But to erase the data, you can't just erase the corresponding grid, but you must empty an entire area before you can write new data.
This process is called write magnification (WAF), which means more complex steps, longer time consuming, and more erasure times.
Let's give a specific example:
When writing to a data "7", the worst-case scenario is that there is no clean grid in a block, but the invalid data (marked "empty") can be erased, so read all the data into the cache, erase all the data in the area, and then write the new data in.
Then the write magnification brought by this operation is that it only needs to be written to one grid, but it actually causes the write operation of the whole block.
At the same time, the operation that only needs to write data in a simple step becomes:
Cache reads the entire area-cache modifies data-erases and clears the entire area-writes all data, a total of four steps, and the latency will be greatly increased compared with direct writes.
So: solid state drives are getting slower and slower? I don't blame you for being too full.
Knowledgeable friends all know that numbers like 256 and 512 are "integers" in the computer field, so why do solid state drives on the market often have 240g or 480g? This is by reserving space to forcibly prevent everyone from stuffing the hard disk, thus prolonging the use time of the hard disk.
Stuffing the disk too full will affect the performance of the solid-state disk, but what really affects the life of the solid-state disk is the number of erasures. When the number of erases reaches the limit, the solid-state disk will be damaged and the data in it will be lost. So how to judge how long the solid-state disk can "live"?
02 how to calculate the life of solid state hard disk life calculation of solid state hard disk life is very simple:
Give an example:
If Tuhao bought a 2TB solid-state disk with a total number of erasure and write times of 1000, assuming that a large amount of 100GB data is written to this solid-state disk every day, then according to the calculation, you can get:
Service life: (2048-1000) / (100-365) = 56 years.
A good solid state drive, make good use of it, it can stay with you until you retire.
03 how to maintain the solid state disk? Are the rumors true? Read this, in fact, you already know not to fill the hard drive too full, but there is a lot of experience in solid-state disk maintenance! Is that all true? Let the editor tell you quietly.
Partition will affect the performance of SSDs-fake! Solid state disk partition basically does not affect the performance of the hard disk.
Some people may say, "the data is stored on disk C, and the reading speed is the fastest."each sub-area, the system will reserve a certain cache, resulting in a certain amount of capacity waste."the number of erases and writes is limited, and reading and writing to disk C of the system for a long time may lead to shorter life." In fact, for solid state drives, these concerns are superfluous!
Mechanical hard disk
Solid-state hard disk mechanical hard disk spindle rotates at a constant angular speed, so the disk sector area swept by the outer ring is always larger than that by the inner ring, and 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 speed of the system loading C disk is the fastest, and then the speed of D, E, F disks decreases gradually.
The solid-state hard disk is mainly composed of main control and flash memory particles and other components, there is no mechanical structure of the mechanical disk. No matter which solid piece of data exists, the speed is the same.
And with the continuous development of solid-state disk, the main control of solid-state disk in the market is also constantly upgrading, and it is becoming more and more mature in garbage collection, reserved OP space, automatic allocation, erase balance and other functions. Don't worry about partitions wasting capacity or overwriting a location.
Therefore, the editor suggests that the solid-state disk should be partitioned as needed. If the funds are limited and the solid-state disk is less than 256g, the editor suggests not to partition.
Disk defragmentation can optimize performance-fake!
In a mechanical hard disk, files are not continuously saved in continuous clusters of disks, but where they are available. Disk fragments are generated because the files are scattered to different parts of the entire disk. In the process of saving the new and deleting the old, the disk fragments become scattered. In this case, reading increases the hard disk seek time and energy consumption.
Therefore, the disk defragmentation function is to speed up the seek time of the disk as a whole by defragmenting the disk fragmented files and integrating the fragmented files.
So why don't SSDs need disk consolidation?
The seek time of solid-state disk is almost zero: the storage unit of solid-state disk is based on the electronic storage of flash particles, so the seek time is theoretically immutable, and its performance mainly depends on the performance of the main control chip and the process of flash particles.
Solid-state drives have a limit on the number of reads and writes: one disk defragmentation is equivalent to a full read and write, which is equivalent to the number of erases and writes minus 1, which shows how much disk defragmentation consumes the life of solid-state drives.
In fact, when the system recognizes that it is a solid-state drive, it will turn off this feature by default. So let's not turn on the solid state drive just because it looks like it can "save hard disk space".
To update the solid state drive firmware-true! If we compare a solid state drive to a small computer, the firmware can be understood as its operating system. Firmware controls all the internal operations of SSDs, which can directly affect the performance, stability and life of SSDs.
Excellent firmware can reduce unnecessary writes to solid-state drives, thus improving the performance of solid-state drives and extending the life of solid-state drives at the same time. So we need to update the latest official firmware in a timely manner.
Can you improve the performance of your hard drive by turning on Trim? -really! The Trim directive is also called disable delete notify (delete notification is disabled). As we said before, when a solid-state drive deletes a data, it marks the data first, and then erases the unused data when the system requires it to be written in the marked place. In fact, it is impossible to make the best optimization at the most appropriate time.
Trim can solve this problem very well. After turning on Trim, the solid state drive can delete the content that needs to be deleted immediately, avoiding the embarrassment of waiting to write data before deleting data.
Trim didn't change what he was supposed to do, just finished it ahead of time. So when you use it, the speed goes up. Trim can effectively reduce write magnification, thus achieving higher throughput and increasing the durability of solid state drives.
But! After Trim is enabled, it is basically impossible to recover the data that has been deleted by mistake.
To sum up, the reason why SSDs are getting slower and slower is that the SSDs mechanism is based on the principle of write amplification. So in order to ensure that the solid state drive can run at high speed all the time, we need to:
Rational use of solid state hard disk capacity
Update firmware in time
Turn on Trim mode
Do not turn on the disk defragmentation feature
Finally, I hope that all your SSDs can live a long and healthy life and run like flying.
This article comes from the official account of Wechat: ZTE documents (ID:ztedoc)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.