Set Up OSes on SSD for Longevity – TRIM and More

osx lionssdtrimUbuntuwindows 7

I recently bought an SSD (a 64GB Crucial M4 – which I believe has garbage collection, based on these specs) for my new computer. I've installed OS X 10.7.2 on it, and would like to reinstall this and also install Windows 7 and Ubuntu on it. I'd like to know how to do so, for each OS, to best promote its longevity. This covers how/if to enable TRIM, and what/how to symlink to my hard drive.

In particular, I'm looking to clarify the following for OS X:

  1. OS X's built-in TRIM only supports Apple-approved SSDs, but you can enable it for others with these terminal commands or this app. There are some warnings that doing so will damage your SSD, but since my original edit of this question I've been convinced (here) that it's safe – still, it'd be good if someone could confirm this.
  2. I've symlinked most directories that are large or will be written to frequently. However, I'm not sure whether to do this for my Library directory; it seems like that'd cause a performance hit, but it's written to frequently by Quicksilver etc.
  3. I'd also like to move the swap directory to HD. An app called XSupport is meant to do this but I can't find it. There are unanswered SuperUser questions on how to do this at Moving Swapfile in Mac OS X Lion and Should I symlink my /private/var/vm dir to another volume in OS X Lion?
  4. I'd like to confirm that an erase can restore performance of a degraded SSD. Many sources say this, this most convincingly: http://macperformanceguide.com/Storage-SSD-Reconditioning.html

(Places I've looked, more in my 'answer' below: discussions.apple.com, forums.macrumors.com, http://digitaldj.net, comments at groths.org)

Best Answer

Since I haven't heard anything, I'll create and keep editing a list of what I find here, in scrappy, note-like fashion. However I'd still welcome a more expert answer!

Possibilities (yet to do)

What I've done

  • The following stops OS X writing file access times when files are accessed, easily reversible by deleting the file:

Terminal commands:

echo '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
 <dict>
 <key>Label</key>
 <string>com.noatime</string>
 <key>ProgramArguments</key>
 <array>
 <string>mount</string>
 <string>-vuwo</string>
 <string>noatime</string>
 <string>/</string>
 </array>
 <key>RunAtLoad</key>
 <true/>
 </dict>
</plist>' | sudo tee /Library/LaunchDaemons/com.noatime.plist
sudo chown root:wheel /Library/LaunchDaemons/com.noatime.plist
Related Question