In fact, today we will not only talk about drives that have been in use for any time, because the problem of poor performance can affect even the SSD just brought from the store. Of course, physics cannot be fooled - over time all SSDs will lose performance. But the reason for this may be not only the problem of the SSD itself. Ensuring competent interaction of components and software in the system is not an easy task for ordinary users who do not want (or who simply don’t need to) understand the topic at least a little and listen to the advice of competent people. It is easier for someone to reinstall the operating system or add some questionable tweakers to the list of applications used. But think about it - for example, simple from our point of view, file deletion consists of a fairly large number of stages in which several participants are tied at once. And, if at least one of them completed the task incorrectly, then this affects the performance of the disk. What are these stages? Who or what they are performed? How to ensure stable operation? In all of this we will understand today. Simply and clearly, so that everything is clear. And then it will become clear that treating the symptoms of poor SSD performance will not help.

Seven troubles - one Deallocate
Many have heard about the team TRIM. Those are the most cherished four letters that cause many questions to the average user. TRIM is one of the ATA commands sent by the operating system to notify the SSD that the data has been deleted from the user by the user and that the occupied physical cells can be freed. It should be said separately about the NVMe SSD - these disks have a different set of commands for operation, but there is also an analogue of the TRIM ATA command - it is called Deallocate and, accordingly, is identical. Therefore, when we mention TRIM, we will also mean Deallocate too. What is this all about? It is precisely the problems with the execution of these commands in the overwhelming majority of cases that cause the poor performance of the drives. Of course, we will not leave other problems aside, but everything has its time.

At the moment when you delete data from your drive, in fact, an entry in the main file system table is deleted. That is, the data itself remains in place, but the area is marked for deletion. The “cell clearing” itself occurs at a certain time, for example, when the store is idle while you are away for tea. Thus, manufacturers seek to reduce memory wear and increase the performance of their drives in certain scenarios. It is the cleaning of these cells that the controller deals with by executing the TRIM command. By the way, after its execution, data recovery is almost impossible.
')
More recently, we
talked about the Secure Erase technology , which is similar to TRIM, but affects not only the main cells, but also service areas, returning the drive to its original state. Recall that Secure Erase can be performed on the drive only without a file system and under certain conditions. A technology TRIM just requires an operating system with all the resulting requirements.

We explain on the fingers, just their 20 ...
When you create a file, the operating system sends a write command to the address of a specific logic block. When you delete data from a disk, these blocks are marked free.
In this case, the data will remain on the disk until the controller wants to overwrite them.
Before us is the part of the memory in which the files A and B are of different sizes, occupying, respectively, a different number of blocks. First we delete the file B, and then we write the file C to our disk. To visualize the situation when TRIM is not working, we will add a simple illustration in which the following states are indicated:
- Availability of files A and B.
- Deletion of file B with our hands.
- Certain idle time. Note that the data blocks marked for clearing have remained with the data in them.
- Write file C, but first remove file B from cells.
For example, if you imagine (just imagine, yes) that a block of data in the form of a square is 1 MB, then in step 4, the controller first clears the two blocks of data marked for deletion with file B and only then writes file C. If a couple of megabytes of space more trifles, but with the active work with the accumulator of such blocks in the total there can be gigabytes, which already noticeably affects the time of writing operations.

And now what happens if the TRIM works. Again in stages:
- Availability of files A and B.
- Deletion of file B with our hands.
- Certain idle time in which blocks marked for deletion with a file B are cleared.
- Write file C without any delay to the area where file B was.

That is, the logic of the work is completely different. Repeat the traversal - when we delete the file B, the TRIM command is sent, and since the SSD is often idle, he happily deletes unnecessary blocks almost immediately. And the moment we want to write the file C, it is immediately written to the disk, and does not wait until the blocks with garbage are cleared for it.
TRIM, are there any? And, if so, do you work?
You can find out whether the SSD supports the TRIM command with a sufficiently large number of free software. Take, for example, CrystalDiskInfo:

But a demonstration of support is not work. To begin with, let's go through situations where TRIM needs to be run in a tricky way or this command does not work at all. Of course, over time, the situation may change, but for now things are as follows:
- Standard Windows drivers cannot perform TRIM on RAID arrays. Depending on the system and the type of RAID array, an Intel driver called Rapid Storage may solve the problem. Arrays 0 and 1 are supported with the Enterprise version driver.
- Support for TRIM in Windows begins with the version of the operating system with the number 7. Vista and, moreover, XP does not support TRIM at the OS level. Of course, this problem is solved by third-party software, but everything is at your own risk and risk - we cannot and will not recommend it.
- The Deallocate command (TRIM for NVMe SSD) is supported only with Windows 8 and later.
- TRIM does not work on virtual disks.
- TRIM only works in AHCI mode.
- TRIM does not work when connecting a drive via USB adapters.
- TRIM does not work in with the FAT32 file system (and more “shaggy”).
Now let's check - does TRIM work in the system?First of all, let's try to find out right from the operating system. In the command line or PowerShell launched on behalf of the Administrator, enter the command “fsutil behavior query disabledeletenotify” without quotes and look at the result. If the output shows "0", then this is good - TRIM works. If "1", then the TRIM functionality is not available. That's right: zero is the included command, 1 is the disabled command.

For example, you can use the easy-to-use trimcheck program from Vladimir Panteleev. The program works in two stages, between which it can take several seconds or tens of minutes - it all depends on the specifics of the specific SSD model. The utility writes data to a disk and marks the addresses of virtual blocks in which they are located. She saves these addresses to a JSON file in her folder, and then deletes the data, which causes sending a TRIM command. The utility checks whether the previously recorded data is located at the saved addresses. Their absence means that the controller took TRIM commands into account and deleted the data. If TRIM is working, the message will be appropriate:

Otherwise, the inscription will read
NOT WORKING . Actually, if you received a message about inoperability, then run the command line "fsutil behavior set disabledeletenotify 0" without quotes in the command line or PowerShell running as Administrator. The TRIM function, if all conditions are met (supported by the OS, implementation in the SSD, etc.), should turn on and work. If this does not happen, and all the requirements are met, then you will have to think about replacing the drive.
Problems, problems instead of lunchThe most common problem is inheritance. Of course, we are talking about Windows up to version 8. For example, when a user installs SSDs in old systems or goes from HDD to SSD without changing BIOS settings (if necessary) or by cloning partitions or the entire disk in general. We remind you that TRIM is available only in AHCI mode. For example, many motherboards can operate in two modes: AHCI and IDE. Accordingly, if the SSD is connected to such a board in IDE mode, then TRIM will not work. Just having the AHCI mode does not solve the problem - Windows will install the drivers according to the chosen IDE. It would seem that the situation may rarely occur, but in fact - no. If you are not on friendly terms with the BIOS settings, then at least you need to check the operation mode. You can do this in the device manager in the “IDE ATA / ATAPI Controllers” section:

Remember that just after installing Windows, switching the operation mode from IDE to AHCI (and vice versa) without additional manipulations will not work - the operating system simply will not boot. Solutions to this problem exist (even from Microsoft itself), but they are not worth recommending. You need to change the registry settings, add the driver you need, and be ready to reinstall the OS in case of failure.
As for Linux-systems, the prerequisite, in addition to the hardware component, is the ext4 file system. The inclusion of TRIM is indicated by the discard option in the fstab file. Additional useful options for the section will be noatime (realtime or nodiratime), which will reduce the recording by disabling the update of the last access time to files and directories. The very same TRIM command is launched using the fstrim program - “fstrim / -v” without quotes and with root rights.
Recall more about Secure Erase. You can restore performance with this feature. Only here is unlikely for a long time. Especially if you quickly hammer your drive with new data. So as a temporary solution - it will go, but it will always remain temporary.
We’ll also add about SLC caching, which is quite often used in many SSD drives without being tied to an interface. Slow recording speed of a large number of files (or large files) after a certain threshold is not a problem, but a feature of the work. The essence of caching is that the first recorded data fall into a special area of ​​memory, and only then written to main memory in the background. When the allocated high-speed memory ends, the data begins to be written directly to the memory at a noticeably reduced speed - from 50 to 150 MB / s. This is a completely normal mode of operation of drives with SLC-cache, so nothing can be done here from the word at all.

What is good and what is bad?
If the TRIM function worked from the very beginning, then it cannot go anywhere by itself. But it is quite another thing if you are fond of various kinds of tweakers, third-party drivers or firmware, as well as builds of operating systems, supposedly improved. All these programs and assemblies can only harm, if we are talking about Windows 8 and, especially Windows 10 - in these OS everything is thought out as it should. In the G7, they can help with something, but this is rather an exception to the multitude of problems that they can bring.
Separately, I must say a few words about NVMe drives and drivers for them. When acquiring a high-speed SSD, the declared speed indicators received in the benchmarks should be reflected in your eyes. Often this is the case, for example - with Kingston drives. Set and forget, as they say, enjoying its high speeds. But with other manufacturers' SSDs, this may not always be the case, which will obviously upset anyone. There is no longer the lack of Deallocate is the cause of insufficient performance, and the standard NVMe driver. Yes, yes, when purchasing NVMe SSD from some manufacturers, you have to go to its website and download the corresponding driver - the difference with the standard one can exceed twice!
Now, like, everything.
As it turned out, not everything is as scary as no first glance looked. The user is required to follow only a few recommendations so that the system works correctly and has pleased the performance of the solid-state drive for a long time. Finally, we will repeat them - a clean distribution of the operating system, current drivers and firmware from the manufacturer, as well as the absence of third-party “tuners” of the system, which, according to their developers, increase productivity by 146%. If the problem is not hardware, then you will not have any complaints about the disk during the entire lifetime of your system. So there will be no long conclusion-verbiage - everything that had to be said has already been said. Capable of you SSD, their high speeds and stable operation!

For more information about
HyperX and
Kingston products, please visit the company websites.