Posted on October 27, 2011 at 1:22 pm
To TRIM or not to TRIM
UPDATE: in a previous post I’ve included information about how to enable TRIM support.
Upon further investigation I’ve disabled it, because SSD based upon sandforce controller (like the Velocity3) do not require it. A very good explanation could be found at: http://apple.stackexchange.com/questions/25224/optimize-macbook-pro-for-internal-ssdhdd-drives.
I’ve included the following information if you do not have recent SSD, but please read the previous link before proceed:
———————–
Last hacking I’ve made it’s related to the enabling of TRIM support. Lion enables TRIM support because it’s the operating system of choice for MacBook Air that has a SSD disk, but it’s hard coded to support only Apple designed SSD. To change this behavior you have to patch the file named IOAHCIBlockStorage. There are utilities that does it automatically but the best explanation I’ve found it’s the one in this post (http://www.mactrast.com/2011/07/how-to-enable-trim-support-for-all-ssds-in-os-x-lion/), that I shamelessly copy here with some further details.
You need to use the Terminal program to issue these commands and the admin password of your OsX to authenticate the sudo tool.
First of all do a copy of the original file (this is a single line command):
sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /IOAHCIBlockStorage.original
Then use the Perl interpreter to patch the file to remove the AppleSSD string and replace it with a generic string to allow Lion to enable Trim support on every disk (again, this is a single line command):
sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x51)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorageAfter that you need to give two command to tell OSX to rebuild required components with the new data (these are two separate commands):
sudo kextcache -system-prelinked-kernel sudo kextcache -system-caches
At this point you have to reboot your Mac!!!
If everything is fine you can check if trim is enabled running the System Information tool and checkin if trim is enabled for your disk.
- Comments Off
- Uncategorized
