Trim Enabler is an application for enabling TRIM support in OS X. We enable native TRIM support for third-party SSDs


TRIM is an ATA command that allows operating system notify the solid-state drive about unused blocks, information on which can be deleted or overwritten again. Due to the fact that low-level write/rewrite operations on SSD drives differ significantly from those on HDD drives, conventional operating system methods for deleting, formatting or overwriting information led to a progressive deterioration in the performance of write operations on solid state drives. The introduction of support for the TRIM command allowed the operating system to clear unused cells before information was written to them. This made it possible to significantly reduce data access time and prevent deterioration in the performance of SSD drives.

What is TRIM

Electronic (SSD) disks have a difference from magnetic-mechanical (HDD) disks, which affects the recording speed. In HDD drives, recording is performed “on top” of old data. Disk blocks that previously contained data and then that data was deleted are simply marked as free. And when you need to write, the HDD controller immediately writes new data to these free blocks.

But when using flash memory, blocks that previously contained some information must be cleared before being written. This leads to the fact that when writing to previously used blocks, the writing speed drops significantly, because the controller needs to prepare them for writing (clear them).

The problem is that operating systems traditionally do not work with the file system in such a way that deleting files clears the contents of the blocks on the disk. After all, on HDD drives there was no need for this.

Therefore, when using SSD disks, the effect of “performance degradation” occurs. When the disk is new and all flash memory blocks are clean, then the write speed is very high, as specified. But after the disk is completely full and some of the files are deleted, re-writing will occur at a lower speed. Because the disk controller will have to clear previously used flash memory blocks before writing new data there.

The drop in write speed to reused flash memory blocks can be very high. Up to values ​​close to the recording speed of HDD disks. When testing SSD drive ov often even carry out separate check to reduce the speed of writing to reused blocks.

To combat this phenomenon, the ATA TRIM disk command has been added to new operating systems. Driver file system when deleting a file, sends the TRIM command to the SSD disk controller. With this command, the SSD disk controller clears freed flash memory blocks, but does so in background, in between read and write operations.

In other words, on a system where TRIM does not work, the SSD will eventually (after about full cycle recordings of the entire volume) will work much slower. On Mac computers, which originally came with SSD drive, TRIM works straight out of the box. But for users who themselves installed an SSD drive from some other brand in their Mac, the situation is a little different. Seemingly “strange” politics Apple, “setting up” TRIM in OS X for third-party SSDs turned out to be not so easy. To do this, it was necessary to patch the system KEXT (kernel extension, in common parlance - driver), and this had to be done after almost every system update.

With the release of OS X Yosemite, the situation worsened a little, since in OS X 10.10 system extensions and utilities began to be signed with a digital signature, which was broken when patching KEXT. Without digital signature the operating system kernel refused to load the driver, the drive would not start without the driver, and the system stopped booting. But for this, a solution was found in the form special parameter, which was written to NVRAM and indicated to the OS kernel that unsigned drivers you still need to download it. All in all, it was a pain in the ass. But "Captain" changed everything.

Since version OS X 10.11 In El Capitan, to activate TRIM on all SSD drives, it is enough to execute one single command, after which TRIM will work normally and always, without any patching or manipulation of the system. Launch Terminal and run the command:

sudo trimforce enable

The command must be confirmed with the system administrator password, after which a warning will be issued that, supposedly, enabling this option may be unsafe and blah, blah, blah:

This tool force-enables TRIM for all relevant attached devices, even though they have not been validated for data integrity while using that functionality. By using this tool to enable TRIM, you agree that Apple is not liable for any consequences that may result, including but not limited to data loss or corruption.

With 99.999% confidence, you can ignore the warning and press Y and Enter. After this, the system will reboot. As a result, after a reboot, TRIM will be activated for its reactivation You will never need to log into the system again:

Deleted data and its recovery

If you use Trim, you can forget about restoring deleted data. If you delete a file, then all its data on SSD drives will be completely destroyed.

So how does Trim affect recording speed?

You need to understand that the use or absence of the Trim function will not directly affect the recording speeds on SSD drives. The only factor that will affect this is the presence of a sufficient number of empty blocks flash memory. That is, those blocks that are completely cleared by the disk controller and prepared for writing new data to them.

Simply put, write speeds depend on the number of free space on an SSD drive. If your disk is almost completely occupied, then the recording speeds will drop even if you use Trim. And if you have at least 20-30% of the SSD disk capacity left without partitioning (unallocated disk space), then you can do without using the Trim function. The SSD disk controller will use unused space for partitions in order to equalize the write speed.

Hello! Not long ago it came out new Mac OS called Sierra and in order to keep up with the times, I decided to update my iMac to the latest version 10.12. Previously, I purchased an external SSD from Samsung, the speed of which I was always incredibly pleased with. Also in previous version Mac OS manually I had to activate TRIM mode. In this article I would like to share with you how to do this in new version(and probably in all subsequent ones because everything has become extremely simple).

It is not difficult to guess that we will now talk about a thing called TRIM. What it is?

TRIM is an ATA command that allows the operating system to notify the SSD of unused blocks whose information may be deleted or overwritten. Due to the fact that low-level write/rewrite operations on SSD drives are significantly different from those on HDD drives, conventional operating system methods for deleting, formatting, or overwriting information led to a progressive deterioration in the performance of write operations on SSDs. The introduction of support for the TRIM command allowed the operating system to clear unused cells before information was written to them. This made it possible to significantly reduce data access time and prevent deterioration in the performance of SSD drives.

In other words, on a system where TRIM does not work, the SSD will eventually (after approximately a full recording cycle of the entire volume) will work much slower. On Mac computers that originally came with an SSD drive, TRIM works right out of the box. But for users who themselves installed an SSD drive from some other brand in their Mac, the situation is a little different. Due to Apple’s “strange” policy, introducing TRIM in OS X for third-party SSDs turned out to be not so easy. To do this, it was necessary to patch the system KEXT (kernel extension, in common parlance - driver), and this had to be done after almost every system update. With the release of OS X Yosemite, the situation worsened a little, since in OS X 10.10 system extensions and utilities began to be signed with a digital signature, which was broken when patching KEXT. Without a digital signature, the operating system kernel refused to load the driver, the drive would not start without the driver, and the system would stop booting. But even for this, a solution was found in the form of a special parameter, which was written to NVRAM and indicated to the OS kernel that unsigned drivers should still be loaded. All in all, it was a pain in the ass. But "Captain" changed everything.

Since version OS X 10.11 (ie with El Capitan) To activate TRIM on all SSD drives, it is enough to execute one single command, after which TRIM will work normally and always, without any patching or manipulation of the system. Launch Terminal and run the command:

sudo trimforce enable

The command must be confirmed with the system administrator password, after which a warning will be issued that, supposedly, enabling this option may be unsafe and blah, blah, blah:

This tool force-enables TRIM for all relevant attached devices, even though they have not been validated for data integrity while using that functionality. By using this tool to enable TRIM, you agree that Apple is not liable for any consequences that may result, including but not limited to data loss or corruption.

With 99.999% confidence, you can ignore the warning and press Y and Enter. After this, the system will reboot. As a result, after a reboot, TRIM will be activated and you will never need to access the system again to reactivate it:

Stay up to date with everyone important events United Traders - subscribe to our

Release to the masses of a wide variety of SSD drives at relatively affordable price didn't really encourage users to update fast HDDs, and developers, in turn, should think about the software issue of their operating systems in order to ensure fast, correct, durable and stable work of these drives in their OS. The main function that is necessary for correct SSD operation drives, is support for the TRIM command.

TRIM is an ATA command that allows the operating system to notify the SSD of unused blocks whose information may be deleted or overwritten. Due to the fact that low-level write/rewrite operations on SSD drives are significantly different from those on HDD drives, conventional operating system methods for deleting, formatting, or overwriting information led to a progressive deterioration in the performance of write operations on SSDs. The introduction of support for the TRIM command allowed the operating system to clear unused cells before information was written to them. This made it possible to significantly reduce data access time and prevent deterioration in the performance of SSD drives.

Apple and Microsoft, of course, added native support for SSD drives to their operating systems ( TRIM support has been available in Windows since 7, and in Mac OS X since version 10.6.6). But the "bugs" at Apple ( why I don't like them) made a dirty trick in the form of supporting the TRIM command only with those drives supplied by Apple. Why beetles? -Yes, because the kext responsible for TRIM support does the following: it looks at the firmware of the SSD drive and looks for the APPLE SSD line in it. If there is one - OK, TRIM will work for this drive; if the required line is not there, then there is no TRIM for this drive either. Thus, upgrading your Mac fast SSD With a third-party drive, you will soon get an excellent “handbrake” instead of a “rocket”. But this is already in the past, calm down. After a short time, instructions appeared on the network for hacking the system kext ( kernel extensions), which made it possible to activate TRIM in Mac OS X for absolutely all SSD drives. And some time later, Oscar Groth created a utility TRIM Enabler, which in a couple of clicks made it possible to “hackactivate” the system kext IOAHCIFamily.kext and, thereby, activate TRIM for initially unsupported SSD drives. The operation of this hack is as simple as two fingers... But you had to find it?! In general, for those interested, the hack is as follows: take the kext binary IOAHCIFamily.kext, which is responsible for TRIM support and we enter zeros instead of a line through the HEX editor APPLE SSD (it occurs in two places). Thus, the hack does something with the kext such that the logic of its operation changes to this: if the searched string is equal to “nothing” ( what can't happen at all), then we enable TRIM for this drive. As you understand, there is a way to enable the TRIM command in Mac OS X on third-party SSD drives and it is very simple. In addition, there are at least two of these methods: manual ( using the console) and automatic ( using the TRIM Enabler utility). In this note we will look at both methods, and let's start with the complex one, that is, the one that is implemented using the terminal.

How to enable TRIM in Mac OS X manually

Launch the Terminal and execute the following commands sequentially. For each command, press Enter to execute it. I personally tested the operation of this method, but since all users different browsers (in theory) some display inaccuracies may occur. Therefore I recommend upload text document, in which the commands are arranged line by line and are 100% error-free, and they are also convenient to perform by copying and pasting into the Terminal window. Let's get started...

1) Get administrator rights ( root):
sudo -s

2) Let's do it backup copy original driver:
cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/


3) Patch the binary file in the IOAHCIFamily.kext kext:
perl -pi -e "s|(x52x6Fx74x61x74x69x6Fx6Ex61x6Cx00).(9)(x00x51)|$1x00x00x00x00x00x00x00x00x00$2|sg"
/System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/
IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

4) Clear the cache:

5) Reboot.

Finding out whether TRIM works or not is very easy: run the utility System information(/Applications/Utilities/System Information.app), on the left side select the item Serial-ATA(Serial-ATA) and look at the line TRIM support. If Yes- everything is fine, TRIM is turned on; If No- means something went wrong:

To restore the original ( previously reserved) of the driver, or rather its executive part, we do the following in the Terminal:
1) Get administrator rights ( root):
sudo -s

2) Restore the original binary file in the IOAHCIFamily.kext kext:
mv /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/
IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage-orig
/System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/
IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

3) Clear the cache:
kextcache -system-prelinked-kernel; kextcache -system-caches

4) Reboot

The manual method is undoubtedly good ( you can understand the principle of operation of this or that hack, and, moreover, get the hang of working with the terminal). But this, so to speak, is not the Mac Way, but for beginners it’s actually something mysterious and scary ( often kills the system). That’s why I’m talking about the second one - automatically activating TRIM using the utility TRIM Enabler. Before the instructions, I want to tell you a little about the utility itself. Initially it was implemented in AppleScript, and the principle of operation was to automatically replace the original driver IOAHCIFamily.kext to the originally patched driver taken from Mac OS X 10.6.8. As you understand, this is not very good, especially when it comes to enabling TRIM on an operating system other than Mac OS X 10.6.8 Snow Leopard. For this reason the version TRIM Enabler 1.x was incompatible with Mac OS X Lion. Now Oscar Groth, the author of the utility, has released the second version. According to the author, it was completely rewritten in Objective-C, acquired additional functionality for monitoring S.M.A.R.T., and, most importantly, now it does not replace, but patches the existing system driver. At the time of writing this note, the latest build had serial number 2.0 Beta 4. I've brought you up to date, now let's move on to the utility itself and see how it works.

Enable TRIM in Mac OS X using TRIM Enabler

1. Download TRIM Enabler and double click according to the archive, unpack it in a convenient place;
2. Launch TRIM Enabler.app;
3. Drag the switch from position OFF to position ON;
4. Enter the administrator password and wait about a minute ( just in case);
5. Reboot the Mac.

After reboot, run the utility System information, select the item Serial-ATA, look at the line TRIM support in search of the treasured word " Yes«:

That's it, TRIM works! To restore the original driver, just move the switch from position ON to position OFF. That's all.

Hello, dear Habrazhitel.

This translation is intended primarily for those who are already using an SSD drive and MacOS Lion. Personally, I’ve been enjoying productivity for over a year now Intel SSD X-25M and lack carousel of death I wish the same for you from the bottom of my heart.

Until today, I was confident that my SSD was working at 100% of its capabilities. But it was not there! If you bought your Apple computer without an SSD, that is, it left the store with a regular HDD, then you will have the TRIM promised in Leo not active, as it turned out, only computers originally equipped with an SSD drive have this function by default. The problem, as you understand, in the company's questionable marketing has software roots, not hardware. And to this scoundrel from Apple, Mr. Grant Pennal offers his threaded bolt.

Before proceeding directly to the translation, I suggest you check whether TRIM works for you or not:

If your SSD has a SandForce 2*** controller, then TRIM is not recommended for you. As eyewitnesses say, the whole point is that the SF2*** controller processes deleted by the user information in its own special way and generally stores data on disk in the form of one large archive... details of its operation and the resulting problems are described. The SF2*** controller is equipped with a fairly wide range of devices, including the popular OCZ Vertex 3, so be sure to look and see carefully whether your disk is on this list; if so, then in the Controller column, determine the serial number; if it starts with 2, then further operations to enable TRIM can only do harm. For all other SSD users, this article will be useful:

Do not under any circumstances use the TRIM ENABLER program (1.1 or 1.2) to activate TRIM in Leo.

After a little testing of this application, I found that instead of the usual patch, it replaces the most important system file at the system kernel level. This means that if you used TRIM Enabler, then it replaced a file with a lot of threads stretching from it throughout MacOS (especially important for those who moved to Leo from MacOS Snow Leopard 10.6.8). Is that bad. Very bad. Along with the fact that TRIM actually turns on, there is a real danger of encountering a wagonload of problems, ranging from kernel panic to input/output (I/O) problems, and then you will definitely be overtaken by a spinning and scary beach ball.

During a discussion with the developer of this application (Oskar Groth), I only heard accusations through comments on his blog that they say I'm trolling and creating fear(although in fact, and to a greater extent, I was trying to suggest Alternative option, which is presented below). Probably - in next version TRIM Enabler - the file will be patched correctly, instead of directly replacing it, however, this update has not yet happened.

So here you go The right way to enable TRIM support. To do this you should do following commands in the terminal:

1. First, make a backup copy of the file that we will patch:

sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/M acOS/IOAHCIBlockStorage .original

2. We patch the file, thereby activating TRIM support:
sudo perl -pi -e "s|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00(1,20))[^\x00](9)(\x00( 1.20)\x51)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg" /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/ Contents/MacOS/IOAHCIBlockStorage

3. Clear the cache:
sudo kextcache -system-prelinked-kernel

Now let's reboot!

If you suddenly need to disable TRIM support:

1. Disconnection:
sudo perl -pi -e "s|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).(9)(\x00\x51)|$1\x41\x50\ x50\x4C\x45\x20\x53\x53\x44$2|sg" /System/Library/Extensions/IOAHCIBlockStorage.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

Sudo kextcache -system-prelinked-kernel

Sudo kextcache -system-caches


2. Restoring a file from a backup:
sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents /MacOS /IOAHCIBlockStorage

All this patch does is replace the phrase “APPLE SSD” with zeros in the IOAHCIBlockStorage file. This is necessary in order to bypass Apple’s own restriction on using only branded SSD drives. File backup saved in the same directory where the original file is located.

To check if TRIM is enabled, go here: About this Mac > System report >

Remember, if you have an older generation of SSDs and the hardware itself does not support TRIM... this patch will not help. The patch just bypasses a limitation created by Apple itself that would limit TRIM support for any SSD that is not under the Apple brand.

Having dealt with TRIM Enabler and not liking its method, I began to look for a sane solution... I found it.

Posts checksums MD5 for the original and patched file in 10.7.0 are as follows:
Original:
Changed:

If you have already used TRIM Enabler, you can do the following:

  • Try to copy and replace key file from another Mac running the same version.
  • Try to copy and replace the key file from the Recovery Partition (Open Disk Utility> Mount Recovery HD)
  • Reinstall Lion
  • Wait next update OS up to 10.7.* and hope that the key file will be replaced during the update (which, by the way, is de facto), and after that apply a normal patch.
Important:
Unfortunately, you will have to carry out this operation every time after major update OS X 10.7.1 > 10.7.2 > 10.7.3 > and so on..., because the key file is updated almost every time the OS is updated (if it is not on duty).
End of translation
Further in the article, Wikipedia chews on the fact that TRIM does not work on standard HDDs, that the computer is not a fool and can distinguish an HDD from an SSD, that an SSD cannot heat up any more when TRIM is activated, that the patch cannot in any way affect the operation of the system, since it does not no changes to the operation of the kernel itself, that if you enable TRIM, and you have a HDD, then nothing will happen and all commands will simply be ignored... and so on. In general: since the author called himself a mushroom, I had to climb into the box up to the top and answer everyone. If there are similar questions in local comments, I will translate his afterwords with the prefix “Update”, in portions.

We wish you effective TRIM efforts. Thank you for your attention.

TRIM:
TRIM technology increases the writing speed in those cells where any data was previously stored. In other words, this data is stored there even after it is deleted. And if rewriting is necessary, a command is sent to the SSD to free these cells and only then recording begins. This wastes time and reduces the recording speed. TRIM technology allows the controller to write data bypassing the cell release operation. For example: the declared speed of my SSD x-25M is up to 70 Mb per second. Having tested TRIM before activation, it produced no more than 50 Mb/s, now the declared 65-70 Mb/s. Test your SSD, you may also miss 30% speed when writing data...

Update 1.0
Information has appeared that TRIM in some cases causes problems on those SSDs that are equipped with a SandForce 2*** controller, as eyewitnesses say, the whole point is that the SF2*** controller processes information deleted by the user in its own special way and generally stores data on the disk in the form of one large archive... the details of its work and the resulting problems are described.

As it turns out, the SF2*** controller is equipped with a fairly wide range of devices, including the popular OCZ Vertex 3, so be sure to check out list of SSDs equipped with a SandForce controller and look carefully to see if your drive is on this list, if so, then in the Controller column, determine the serial number, if it starts with 2, then disable TRIM, instructions are above.

Update 2.0

This method stopped working after updating the system to version 10.8.1
Nevertheless, TRIM Enabler works, but there are still opinions on the Internet that it can ruin the system. You can try at your own risk, problems go away if you turn off TRIM through the same program when they arise, but you yourself understand - all this is “fork through the water” - if it manifests itself, it is individually.

When there is a method without interfering with the core of the system, I will write about it; If any of you, dear poppy growers, find a way earlier, please do not be lazy to let me know.

Update 3.0 // Found a way to activate TRIM for system 10.8.2

We thank the user shok, the method was found on the Internet.

Run the following commands in a terminal:
1. Backup original drivers.

sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents /MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/M acOS/IOAHCIBlockStorage -backup

2. Change the driver.
sudo perl -pi -e "s|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00(1,20))[^\x00](9)(\x00( 1.20)\x4D)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg" /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/ Contents /MacOS/IOAHCIBlockStorage

3. Run two commands to clear the OS X cache and pick up the modified driver.
sudo kextcache -system-prelinked-kernel sudo kextcache -system-caches

4. Reboot the Mac. Checking TRIM activation

Fair, not overpriced and not underestimated. There should be prices on the Service website. Necessarily! without asterisks, clear and detailed, where technically possible - as accurate and concise as possible.

If spare parts are available, up to 85% of complex repairs can be completed in 1-2 days. Modular repairs require much less time. The website shows the approximate duration of any repair.

Warranty and responsibility

A guarantee must be given for any repairs. Everything is described on the website and in the documents. The guarantee is self-confidence and respect for you. A 3-6 month warranty is good and sufficient. It is needed to check quality and hidden defects that cannot be detected immediately. You see honest and realistic terms (not 3 years), you can be sure that they will help you.

Half the success in Apple repair is the quality and reliability of spare parts, so a good service works with suppliers directly, there are always several reliable channels and its own warehouse with proven spare parts current models so that you don't have to waste extra time.

Free diagnostics

This is very important and has already become a rule good manners For service center. Diagnosis is the most difficult and an important part repair, but you do not have to pay a penny for it, even if you do not repair the device as a result of it.

Service repairs and delivery

Good service values ​​your time, so he offers free shipping. And for the same reason, repairs are carried out only in the workshop of a service center: they can be done correctly and according to technology only in a prepared place.

Convenient schedule

If the Service works for you, and not for itself, then it is always open! absolutely. The schedule should be convenient to fit in before and after work. Good service works on weekends and holidays. We are waiting for you and working on your devices every day: 9:00 - 21:00

The reputation of professionals consists of several points

Company age and experience

Reliable and experienced service has been known for a long time.
If a company has been on the market for many years and has managed to establish itself as an expert, people turn to it, write about it, and recommend it. We know what we are talking about, since 98% of incoming devices in the service center are restored.
Other service centers trust us and refer complex cases to us.

How many masters in areas

If there are always several engineers waiting for you for each type of equipment, you can be sure:
1. there will be no queue (or it will be minimal) - your device will be taken care of right away.
2. you give to Macbook repair an expert in the field of Mac repairs. He knows all the secrets of these devices

Technical literacy

If you ask a question, a specialist should answer it as accurately as possible.
So that you can imagine what exactly you need.
They will try to solve the problem. In most cases, from the description you can understand what happened and how to fix the problem.







2024 gtavrl.ru.