Let's disassemble the SSD. SSD drives - what are they? Limit writes to SSD

Let's disassemble the SSD. SSD drives - what are they? Limit writes to SSD

19.09.2023

If your computer has an SSD, you should use a modern operating system. In particular, you do not need to use Windows XP or Windows Vista. Both of these OSs do not support the TRIM command. So, when you delete a file on an older operating system, it can't send that command to the SSD and thus the data remains on it (what happens next depends on the controller, but in general this is not a good thing).

Don't fill the SSD completely

It is necessary to leave free space on the solid-state drive, otherwise the writing speed to it may drop significantly. This may seem strange, but in fact, it is explained quite simply. When there is enough free space on the SSD, the solid-state drive uses the free blocks to write new information. Ideally, download the official utility from the SSD manufacturer and see how much space it offers to reserve; usually such a function is present in these programs (may be called Over Provisioning). On some drives, this reserved space is present by default and can be seen in Windows Disk Management as an unallocated area.


When an SSD is low on free space, it contains many partially filled blocks. In this case, when writing, a specific partially filled memory block is first read into the cache, modified, and the block is rewritten back to disk. This happens with each block of information on a solid-state drive that must be used to write a particular file.

In other words, writing to an empty block is very fast, writing to a partially filled block requires a lot of auxiliary operations to be performed, and is therefore slow. Previous tests have shown that you should use about 75% of the SSD capacity for the ideal balance between performance and the amount of information stored. For modern high-capacity SSDs, this may be overkill.

Limit writes to SSD. Or it's not worth it.

Perhaps the most controversial point, and today, in 2019, I cannot be as categorical as when I initially prepared this material more than 5 years ago. In fact, an SSD is purchased to increase the speed of operation and a variety of operations, and therefore moving temporary files, the paging file, disabling indexing services and similar things, although they will indeed reduce the wear and tear of the SSD, will, at the same time, reduce the benefit from it.

Considering that today's solid-state drives are generally relatively resilient, I would probably not forcefully disable system files and functions or transfer service files from the SSD to the HDD. Except for one situation: if you have the cheapest 60-128 GB disk from an unknown Chinese manufacturer with a very small TBW recording resource (there are more and more of these lately, despite the general increase in service life for popular brands).

Don't store large files that you don't need to access quickly on an SSD

This is a fairly obvious point: your collection of films, photos and other media and archives usually does not require high access speeds. SSD solid-state drives are smaller in capacity and more expensive per gigabyte than regular hard drives. On an SSD, especially if you have a second hard drive, you should store files of the operating system, programs, games - for which quick access is important and which are constantly used.

Regular document files (by documents here I mean video and music and any other media) will be played at the same speed from both the HDD and SSD, and therefore there is no particular point in storing them on a solid-state drive, provided that this is not the only disk on a computer or laptop.

I hope this information will help you increase the life of your SSD and enjoy its speed. Anything to add? - I will be glad to see your comment.

I'll show you how to change a HDD hard drive to a high-speed SSD drive. I bought a 250 GB Samsung 850 Evo SSD. and installed it on my laptop. Then I installed Windows and all programs on the new SSD drive.

I bought my SSD drive Samsung 850 SSD EVO 120 GB SATA III on AliExpress . At first I wanted to order this Samsung 750 SSD EVO 120 GB SATA III (it is 120 GB and cheaper), but in the end I ordered 250 GB, although I could have done with 120 GB. The Samsung 850 EVO SSD arrived after about 12 days (the fastest product that came from AliExpress).

The parcel is well packed and sealed with polystyrene foam. Inside the box is plastic, and in it is an SSD drive.

Here are the specifications of this SSD drive. My reading speed tests, notes at the bottom of the page.


1. Copy all the information you need from your disk

If you, like me, have only one hard drive space in your laptop, then first copy all the information from your hard drive to your external drive or to another computer. Or buy . So that you can then connect your removed HDD drive via USB and download everything you need from it to your new SSD drive.


Here is a visual video of this adapter.

2. Remove the hard drive and install the SSD

Turn off the laptop, unplug the laptop from all wires, turn it over and remove the laptop battery. Now on the back cover of the laptop, find the inscription HDD - this is the place where your hard drive is installed. On my Samsung NP-R560 laptop it is on the bottom left. The hard drive is closed with a cover with two screws.

We unscrew these two screws securing the laptop hard drive.

Remove the cover covering the hard drive. There should be arrows on it showing in which direction you need to pull to move the cover.

Here is the hard drive of my laptop. It has an aluminum lid to help dissipate heat and has a pull tab to make it easier to remove. Simply grab this tab and pull it to the left to disconnect the hard drive from the connector.

Done, the hard drive is disconnected from the laptop and connectors. We lift it and put it aside.

This is what a laptop looks like without a disk.

Now insert the SSD disk in place of the HDD disk.

Carefully insert it in place of the old HDD drive. I also installed an aluminum plate from the old HDD on the new SSD.

Close the hard drive cover.

Tighten the screws of the lid.

Ready. Now we turn the laptop over, insert all the wires into it, put the battery back and turn on the laptop.

3. Install Windows on the new SSD

There is nothing on the new SSD drive and there is no OS (Windows) either, so now you need to install Windows on it. You will receive this error when you try to boot from a new SSD disk that does not yet have a Windows operating system.

Partition table invalid or corrupted. Press any key to continue…

You need to insert your bootable USB flash drive and boot from it.

If you don’t have a bootable USB flash drive yet, it’s time to make one.

Here is a video on how to configure the BIOS to install Windows from a bootable USB flash drive.

Now that we have a bootable USB flash drive and boot from it, we install Windows on the new SSD. We select our SSD, it will be marked as “Unallocated space on disk 0” and click “Next” and install Windows.

The copying of Windows files will begin, then preparation for installation, installation of components, installation of updates, completion. The computer will restart several times. After the first reboot, you can remove the bootable USB flash drive.

If you have never installed Windows via BIOS, then you will find a video on this topic.

After installing Windows on a new SSD drive, change the boot priority in the BIOS so that the Windows bootloader is first looked for on the SSD drive. Although if everything loads and works, then you don’t have to change anything. I'll go to BIOS, Boot - Boot Device priority.

And using the F5 or F6 key I will move the SSD disk to the very top, so that the boot sector on the SSD disk is first searched, and then on the other disks, if it is not found on the SSD.


4. Comparison of SSD speed with HDD and USB drives

Using the CrystalDiskMark 3 program, I measured the writing and reading speed of my HDD drive even before removing it and replacing it with an SSD. The reading speed from it was approximately 100 MB/sec. when reading and writing sequentially.

The speed of an external hard drive connected via USB 2.0 was approximately 30 MB/sec.

The speed of a flash drive connected via USB 2.0 was also about 30 MB/sec.

The speed of the SSD disk connected via SATA II was approximately 200 MB/sec. This is twice as much as I had on my HDD.

But I could get a lot more out of this SSD if I had a newer laptop with a SATA III hard drive interface. Since I have a 2008 laptop, it has an older and slower SATA II hard drive interface. New laptops already have SATA III.

  • The throughput of the SATA 3 interface reaches 6 Gbit/s.
  • The throughput of the SATA 2 interface reaches 3 Gbit/s.

Judging by the reviews on AliExpress for my SSD drive, SATA III owners get a read speed of 500 MB/sec.

You can also try setting up an SSD drive.

I was unable to replace the laptop with a newer one, which I had been planning for a long time, as prices had increased significantly.

I used to want to buy one like this. Price for 2014

No. These are the prices for now. I can not afford it. If I didn’t buy a laptop for 35 thousand, then I certainly won’t buy it for 90 thousand.

Price for 2016

What I noticed after replacing the HDD with an SSD:

The advantages of SSD drives over traditional hard drives are obvious at first glance. These are high mechanical reliability, no moving parts, high read/write speed, low weight, lower power consumption. But is everything as good as it seems?

We disassemble the ssd.

First, let's look at what an SSD is. SSD is a solid state drive. SSD, Solid State Drive or Solid State Disk), a non-volatile, rewritable storage device with no moving mechanical parts using flash memory. An SSD completely emulates the operation of a hard drive.

Let's see what's inside the SSD and compare it with its close relative USB Flash.

As you can see, there are not many differences. Essentially an SSD is a large flash drive. Unlike flash drives, SSDs use a DDR DRAM cache memory chip, due to the specifics of the operation and the data exchange speed between the controller and the SATA interface that has increased several times.

ssd controller.

The main task of the controller is to provide read/write operations and manage the data placement structure. Based on the block placement matrix, which cells have already been written to and which have not yet been written, the controller must optimize the write speed and ensure the longest possible lifespan of the SSD drive. Due to the design features of NAND memory, it is impossible to work with each cell separately. The cells are combined into 4 KB pages, and information can only be written by occupying the entire page. You can erase data in blocks that are equal to 512 KB. All these restrictions impose certain responsibilities on the correct intelligent algorithm of the controller. Therefore, properly configured and optimized controller algorithms can significantly improve the performance and durability of an SSD drive.

The controller includes the following main elements: Processor– usually a 16 or 32 bit microcontroller. Executes firmware instructions, is responsible for mixing and aligning data on Flash, SMART diagnostics, caching, and security. Error Correction (ECC)– ECC error control and correction unit. Flash Controller– includes addressing, data bus and control of Flash memory chips. DRAM Controller- addressing, data bus and management of DDR/DDR2/SDRAM cache memory. I/O interface– is responsible for the data transfer interface to external SATA, USB or SAS interfaces. Controller Memory– consists of ROM memory and buffer. The memory is used by the processor to execute firmware and as a buffer for temporary data storage. In the absence of an external RAM memory chip, the SSD acts as the only data buffer.

Currently, the following controller models are used in SSDs: Indilinx "Barefoot ECO" IDX110MO1 Indilinx "Barefoot" IDX110M00 Intel PC29AS21BA0 JMicron JMF602 JMicron JMF612 Marvel 88SS9174-BJP2 Samsung S3C29RBB01-YK40 SandForce SF-1200 SandForce SF-150 0 Toshiba T6UG1XBG

Flash memory.

SSDs, like USB Flash, use three types of NAND memory: SLC (Single Level Cell), MLC (Multi Level Cell) and TLC (Three Level Cell). The only difference is that SLC allows you to store only one bit of information in each cell, MLC - two, and TLC - three cells (using different levels of electrical charge on the floating gate of the transistor), which makes MLC and TLC memory cheaper relative to capacity.

However, MLC/TLC memory has a lower resource (100,000 erase cycles for SLC, on average 10,000 for MLC, and up to 5,000 for TLC) and worse performance. With each additional level, the task of recognizing the signal level becomes more complicated, the time required to search for a cell address increases, and the likelihood of errors increases. Since SLC chips are much more expensive and their volume is lower, MLC/TLC chips are mainly used for mass solutions. At the moment, MLC/TLC memory is actively developing and is approaching SLC in speed characteristics. Also, SSD drive manufacturers compensate for the low speed of MLC/TLC with algorithms for alternating data blocks between memory chips (simultaneous writing/reading to two flash memory chips, a byte each) similar to RAID 0, and the low resource - shuffling and tracking uniform use of cells. Plus, part of the memory capacity is reserved in the SSD (up to 20%). This is unavailable memory for standard write/read operations. It is needed as a reserve in case of cell wear, similar to magnetic HDD drives, which have a reserve for replacing bad blocks. The additional cell reserve is used dynamically, and as the primary cells physically wear out, a replacement spare cell is provided.

It would seem that everyone knows the advantages of solid-state drives compared to traditional hard disk drives (HDDs): high mechanical reliability, no moving parts, high read/write speeds, low weight, lower power consumption. But let's see if everything is as good as it seems?

What is it SSD? SSD- this (English) SSD, Solid State Drive or Solid State Disk) solid state drive, a non-volatile, rewritable storage device with no moving mechanical parts using flash memory. completely emulates the operation of a hard drive.

Let's see what's inside the SSD drive and compare it with its close relative USB Flash.

As you can see from the photo, there are not so many differences. Essentially, it's the same big flash drive. Unlike flash drives, it uses a DDR DRAM cache memory chip, due to the specifics of the operation and the data exchange speed between the controller and the interface that has increased several times SATA.

SSD disk controller

The main task of the controller is to provide read/write operations and manage the data placement structure. Based on the block placement matrix, which cells have already been written to and which have not yet, the controller must optimize the write speed and ensure the longest possible service life. Due to the design features of NAND memory, it is impossible to work with each cell separately. The cells are combined into 4 KB pages, and information can only be written by occupying the entire page. You can erase data in blocks that are equal to 512 KB. All these restrictions impose certain responsibilities on the correct intelligent algorithm of the controller. Therefore, properly configured and optimized controller algorithms can significantly improve performance and durability.

The controller includes the following main elements:

  • Processor– usually a 16 or 32 bit microcontroller. Executes firmware instructions, is responsible for mixing and aligning data on Flash, SMART diagnostics, caching, and security.
  • Error Correction(ECC) – ECC error control and correction unit.
  • Flash Controller– includes addressing, data bus and control of Flash memory chips.
  • DRAM Controller- addressing, data bus and management of DDR/DDR2/SDRAM cache memory.
  • I/O interface– is responsible for the data transfer interface to external SATA, USB or SAS interfaces.
  • Controller Memory– consists of ROM memory and buffer. The memory is used by the processor to execute firmware and as a buffer for temporary data storage. In the absence of an external RAM memory chip acts as the only data buffer SSD drive.

Flash memory

IN SSD drives like USB Flash, three types of NAND memory are used: SLC (Single Level Cell), MLC (Multi Level Cell) and TLC (Three Level Cell). The only difference is that SLC allows you to store only one bit of information in each cell, MLC - two, and TLC - three cells (using different levels of electrical charge on the floating gate of the transistor), which makes MLC and TLC memory cheaper relative to capacity.

However, MLC/TLC memory has a lower resource (100,000 erase cycles for SLC, on average 10,000 for MLC, and up to 5,000 for TLC) and worse performance. With each additional level, the task of recognizing the signal level becomes more complicated, the time required to search for a cell address increases, and the likelihood of errors increases. Since SLC chips are much more expensive and their volume is lower, MLC/TLC chips are mainly used for mass solutions. At the moment, MLC/TLC memory is actively developing and is approaching SLC in speed characteristics. Also, SSD drive manufacturers compensate for the low speed of MLC/TLC with algorithms for alternating data blocks between memory chips (simultaneous writing/reading to two flash memory chips, a byte each) similar to RAID 0, and the low resource - shuffling and tracking uniform use of cells. Plus, part of the memory capacity is reserved in the SSD (up to 20%). This is unavailable memory for standard write/read operations. It is needed as a reserve in case of cell wear, similar to magnetic HDD drives, which have a reserve for replacing bad blocks. The additional cell reserve is used dynamically, and as the primary cells physically wear out, a replacement spare cell is provided.

How does an SSD drive work?

To read a block of data in a hard drive, you first need to figure out where it is located, then move the block of magnetic heads to the desired track, wait until the desired sector is under the head and read it. Moreover, chaotic requests to different areas of the hard drive have an even greater impact on access time. With such requests, HDDs are forced to constantly “drive” their heads over the entire surface of the “pancakes”, and even reordering the command queue does not always help. And in everything is simple - we calculate the address of the desired block and immediately get read/write access to it. There are no mechanical operations - all the time is spent on address translation and block transfer. The faster the flash memory, controller and frontend, the faster data access.

But when changing/erasing data in SSD drive It's not that simple. NAND flash memory chips are optimized for sector-based operations. Flash memory is written in 4 KB blocks and erased in 512 KB blocks. When modifying several bytes inside a block, the controller performs the following sequence of actions:

  • reads the block containing the block being modified into the internal buffer/cache;
  • modifies the necessary bytes;
  • erases a block in the flash memory chip;
  • calculates a new block location according to the requirements of the shuffling algorithm;
  • writes the block to a new location.

But once you have written information, it cannot be overwritten until it is cleared. The problem is that the minimum size of recorded information cannot be less than 4 KB, and data can be erased in at least 512 KB blocks. To do this, the controller groups and transfers data to free an entire block.

This is where OS optimization for working with HDD comes into play. When deleting files, the operating system does not physically clear sectors on the disk, but only marks the files as deleted and knows that the space they occupied can be reused. This does not interfere with the operation of the drive itself, and interface developers were not previously concerned about this issue. If this removal method helps improve performance when working with HDDs, then when using SSD drives becomes a problem. IN Just like traditional hard drives, data is still stored on the drive after it has been deleted by the operating system. But the fact is that the solid-state drive does not know which of the stored data are useful and which are no longer needed and are forced to process all occupied blocks using a long algorithm.

Read, modify and write again in place, after clearing the memory cells affected by the operation, which from the OS point of view have already been deleted. Therefore, the more blocks there are SSD drive contains useful data, the more often you have to resort to the read>modify>clear>write procedure, instead of direct write. Here are the users are faced with the fact that disk performance decreases noticeably as they fill up with files. The drive simply does not have enough pre-erased blocks. Clean drives demonstrate maximum performance, but during their operation the actual speed gradually begins to decrease.

Previously, the ATA interface simply did not have commands to physically clear data blocks after deleting files at the OS level. For HDD drives they were simply not required, but the emergence SSD drives forced us to reconsider our attitude to this issue. As a result, the ATA specification introduced a new DATA SET MANAGEMENT command, better known as Trim. It allows the OS to collect information about deleted files at the driver level and transfer it to the drive controller.

During periods of inactivity, it independently cleans and defragments blocks marked as deleted in the OS. The controller moves the data to obtain more pre-erased memory locations, freeing up space for subsequent writes. This makes it possible to reduce delays that occur during work.

But to implement Trim, this command must be supported by the drive firmware and the driver installed in the OS. At the moment only the latest models SSD drives“understand” TRIM, and for older drives you need to flash the controller to enable support for this command. Among operating systems, the Trim command is supported: Windows 7, Windows Server 2008 R2, Linux 2.6.33, FreeBSD 9.0. For other operating systems, you need to install additional drivers and utilities.

For example, for from Intel There is a special SSD Toolbox utility that can perform synchronization with the OS on a schedule. In addition to optimization, the utility allows you to perform diagnostics SSD drive and view SMART data of all computer drives. Using SMART, you can estimate the current degree of wear of the SSD disk - parameter E9 reflects the remaining number of NAND cell cleaning cycles as a percentage of the standard value. When the value, decreasing from 100, reaches 1, we can expect the rapid appearance of “broken” blocks.

About SSD reliability drives

It would seem that there are no moving parts - everything should be very reliable. This is not entirely true. Any electronics can break, SSDs are no exception. The low resource of MLC chips can still be dealt with somehow by ECC error correction, redundancy, wear control and shuffling of data blocks. But the biggest source of problems is the controller and its firmware. Due to the fact that the controller is physically located between the interface and the memory chips, the likelihood of it being damaged as a result of a failure or power problems is very high. In this case, the data itself is in most cases saved. In addition to physical damage, which makes it impossible to access user data, there are logical damages, which also impair access to the contents of memory chips. Any, even minor, error or bug in the firmware can lead to complete loss of data. Data structures are very complex. Information is “spread out” across several chips, plus interleaving, making data recovery quite a difficult task.

SSD Kingston HyperX 2.5`, SATA 6Gb/s, 240 GB

In such cases, the controller firmware with low-level formatting helps restore the drive, when service data structures are re-created. Manufacturers are constantly trying to improve the firmware, correct errors, and optimize the operation of the controller. Therefore, it is recommended to periodically update the drive firmware to eliminate possible failures.

Security of SSD drives

IN SSD drive, as in the HDD, the data is not deleted immediately after the file has been erased from the OS. Even if you overwrite the top of the file with zeros, the physical data still remains, and if you take out the flash memory chips and read them on the programmer, you can find 4kb file fragments. Complete erasure of data should be expected when data equal to the amount of free space + reserve volume (approximately 4 GB for a 60 GB SSD) has been written to the disk. If a file lands on a “worn out” cell, the controller will not soon overwrite it with new data.

Basic principles, features, differences in data recovery from SSD and USB Flash drives.

Recovering data from SSD drives is quite a labor-intensive and time-consuming process compared to portable flash drives. The process of finding the correct order, combining the results and selecting the necessary collector (an algorithm/program that completely emulates the operation of the SSD drive controller) to create a disk image is not an easy task.
This is primarily due to the increase in the number of chips in the SSD drive, which greatly increases the number of possible options for action at each stage of data recovery, each of which requires verification and specialized knowledge. Also, due to the fact that SSDs are subject to much more stringent requirements for all characteristics (reliability, performance, etc.) than mobile flash drives, the technologies and methods for working with data used in them are quite complex, which requires an individual approach to each decision and the availability of specialized tools and knowledge.

Optimizing SSD drives

  1. In order for the disk to serve you for a long time, you need to transfer everything that changes frequently (temporary files, browser cache, indexing) to the HDD, disable updating the time of last access to folders and directories (fsutil behavior set disablelastaccess 1). Disable file defragmentation in the OS.
  2. Before installing Windows XP on an SSD, when formatting the disk, it is recommended to “align” the partitions to a power of two (for example, using the diskpart utility), otherwise the SSD will have to do 2 reads instead of one. In addition, Windows XP has some problems with supporting sectors larger than 512 KB (SSDs use 4 KB by default) and resulting performance problems. Windows Vista, Windows 7, the latest versions of Mac OS and Linux already align disks correctly.
  3. Update the controller firmware if the old version does not know the TRIM command. Install the latest drivers for SATA controllers. For example, if you have an Intel controller, you can increase performance by 10-20% by enabling ACHI mode and installing the Intel Matrix Storage Driver in the operating system.
  4. You should not use the last 10-20% of the free space of the partition, because this may adversely affect performance. This is especially important when TRIM is running, since it needs space to rearrange the data: for example, defragmentation utilities seem to work, because they also need at least 10% percent of the disk space. Therefore, it is very important to monitor this factor, because due to the small volume of SSDs, they fill up very quickly.

Advantages of SSD drives

  • high reading speed of any data block, regardless of physical location (more than 200 MB/s);
  • low power consumption when reading data from the drive (approximately 1 Watt lower than that of the HDD);
  • reduced heat generation (internal testing at Intel showed that laptops with SSDs heat up 12.2° less than those with HDDs; testing also found that laptops with SSDs and 1 GB of memory are not inferior to models with HDDs and 4 GB of memory in common benchmarks);
  • noiselessness and high mechanical reliability.

Disadvantages of SSD drives

  • high power consumption when writing data blocks, power consumption increases with increasing storage capacity and the intensity of data changes;
  • low capacity and high cost per gigabyte compared to HDD;
  • limited number of write cycles.

Conclusion

Due to the high cost and small amount of memory, it is not practical to use them for data storage. But they are perfect as a system partition on which the OS is installed and on servers for caching static data.

© 2023 hecc.ru - Computer technology news