Professional Documents
Culture Documents
Optimizing Mac OS X For SSD Drives
Optimizing Mac OS X For SSD Drives
Optimizing Mac OS X For SSD Drives
se/2010/08/optimizing-mac-os-x-for-ssd-drives/
Home
Fredrik
Consulting
Code
Wordpress plugins
Nagios plugins
Simple as Pie
About
Performance
Subscribe
Fredrik Poller
SSD drives are very good speed wise. If you have the money, upgrading from a regular hard drives makes a world of
difference. There are however some drawbacks compared to spinning hard drives, mainly the limit on how many writes
you can do before things get ugly. For most users, this isnt a problem. But it doesnt hurt to take some steps to minimize
the disk writes.
These tweaks are for Mac OS X 10.6 (Snow Leopard) and mainly for laptop users.
1. Sleeping mode
By default, when closing the lid on a MacBook, the content of the ram is saved to disk for safety. The ram is still powered
on however, and is used when starting up again. The content saved on disk is only used in case of a power loss. This
behavior can be changed, at the cost of some safety, so that memory content is not saved to disk. On the bright side, you
also save some disk space (equal to the amount of your RAM).
We can start by checking the current setting, fire up Terminal.app and type the following.
$ sudo rm /var/vm/sleepimage
1 of 4 10/2/10 8:36 AM
Optimizing Mac OS X for SSD drives Fredrik Poller http://poller.se/2010/08/optimizing-mac-os-x-for-ssd-drives/
This will execute mount -uwo noatime / upon system startup, remounting the root filesystem with the noatime option. This
can be verified after a reboot with the following command.
For FileVault users as myself it seems to be a little bit trickier. The FileVault filesystem cant be remounted at startup, since
its not mounted until the user logs in. We can however create a script and a login hook to be run at login.
Lets start by creating a script called /usr/local/bin/remount_noatime with the following content.
#!/bin/bash
/sbin/mount -uwo noatime /Users/$1
$1 will contain the username when the script is run. Make it executable and create the login hook.
The script is now run with root privileges when a user logs in.
5. Disable Spotlight
If youre not using Spotlight you should consider disabling it by running this command.
2 of 4 10/2/10 8:36 AM
Optimizing Mac OS X for SSD drives Fredrik Poller http://poller.se/2010/08/optimizing-mac-os-x-for-ssd-drives/
Ive been using the above settings (except #5) for about 6 months now without any issues.
Tagged as: atime, bash, filevault, hibernation, mac os x, motion sensor, sleep, spotlight, ssd
Using sleep on a SSD actually lower its power consumption quite a bit, the Intel X25-M draws less than half during
sleep. It also doesnt need a lot of time to spin itself up again like a regular harddrive.
Still the difference in power consumption may not be worth to talk about when its just ~100mw ;)
noatime can be safely disabled on all writable drives, both SSD and HDD. Its almost always pointless to do a disk
write each time you open a file it slows down the computer without any benefit.
If you have optibay and ssd+hdd you can put the sleepimage on your hdd instead.
I use spotlight only for apps have disabled it for everything else. find & grep ftw.
Leave a Comment
Name *
E-mail *
Website
Submit
Socialize
Categories
Benchmarks
3 of 4 10/2/10 8:36 AM
Optimizing Mac OS X for SSD drives Fredrik Poller http://poller.se/2010/08/optimizing-mac-os-x-for-ssd-drives/
Cloud computing
DNS
Encryption
Monitoring
Networking
Other software
Scripting
Storage
Web hosting
Tags
1password accelerator amazon ec2 apache apc aperture asterisk atime backblaze bash c cache coda disqus distributed filesystem djbdns dnscache fastcgi
filevault firewall freebsd geli glusterfs gmail google chrome google reader gruml handbrake hibernation joomla litespeed loopia mac os x mailplane motion sensor
mysql php plex plugin rackspace rewrite rsync simple as pie sleep sorting spotlight ssd ssh sysbench tinydns ubuntu
nagios nginx perl pf
vim viscosity wordpress xcache
Archives
September 2010
August 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
WordPress Admin
4 of 4 10/2/10 8:36 AM