Jump to content
Corsair Community

Mac OS X Tips & Tweaks


guitrein

Recommended Posts

I have seen some threads about how to setup Windows 7 in order to improve the SSD performance but none concerning Mac OS X. Since I'm using a Corsair F240 in Mac OS X, I decided to share useful (and easy) tweaks to improve the lifespan and the performance of the drive.

 

All the settings are independent and can be applied according your needs. Basically, the settings to be applied are:

1) Disable sleeping mode (hibernation)

2) Disable hard drive sleep

3) Disable sudden motion sensor

4) Enable noatime for SSD filesystems

5) Disable Spotlight

 

So, lets start!

 

1) Disable sleeping mode (hibernation)

Well, sleep concept can be sometimes misunderstood in Mac OS X. Sleep initially means Standby, but if the battery level drops very low then the laptop automatically Hibernates (what Apple calls Hibernation "Safe Sleep").

 

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).

 

I personally have problems when my Macbook wakes up from hibernation even with the Force Firmware 2.0 installed in my drive. But with this simple setup I was able to turn it off and avoid the kernel panic.

 

First of all, we can check the current setting of your Mac. Fire up Terminal.app and type the following:

$ sudo pmset -g | grep hibernatemode
hibernatemode	3

 

The mode 3 is the default setting, we want to change this to 0 to disable disk writes.

$ sudo pmset -a hibernatemode 0

 

Now we can remove the old sleepimage.

$ sudo rm /var/vm/sleepimage

 

2) Disable hard drive sleep

Putting SSD hard drives to sleep has no benefit, and some SSD drives has a history of freezing up when put to sleep. This can be disabled under System Preferences -> Energy Saver. Remember to disable it for both Battery and Power Adapter mode.

 

3) Disable sudden motion sensor

Sudden Motion Sensor technology is built-in protection for the hard disk that is designed to help prevent disk issues if the computer is dropped or undergoes severe vibration.

 

Having the Sudden motion sensor enabled for a SSD drive makes no sense, unless you have another HDD drive installed in your Mac. This can be disabled with the following command:

$ sudo pmset -a sms 0

 

4) Enable noatime for SSD filesystems

Every time a file is accessed its access time is modified to reflect it. This can be disabled to save additional writes. To do this for the local filesystem create the file /Library/LaunchDaemons/com.noatime.root.plist with the following content.

 

<?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.root</string>
       <key>ProgramArguments</key>
       <array>
           <string>mount</string>
           <string>-uwo</string>
           <string>noatime</string>
           <string>/</string>
       </array>
       <key>RunAtLoad</key>
       <true/>
   </dict>
</plist>

 

Then, execute the following command in the Terminal.app window:

sudo chown root:wheel /Library/LaunchDaemons/com.noatime.root.plist

 

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.

$ mount |grep noatime
/dev/disk0s2 on / (hfs, local, journaled, noatime)

 

 

5) Disable Spotlight

If you’re not using Spotlight you should consider disabling it. Indexing creates a database of file attributes. This can lead to multiple small writes when creating/deleting/modifying files, which leads to many read/writes on your solid state drive, decreasing it's life cycle.

 

This can be done by adding your root drive to the Privacy list in Spotlight (System Preferences -> Spotlight -> Privacy -> Add your solid state drive) or by running this command.

$ sudo mdutil -a -i off

 

I personally have been using the first one. It is easier and can be revertible without any problem.

 

 

Well, I have been using all these settings and had no problem so far. It is a little bit early to say if they are really effective, but it's worth trying since they are not destructive and don't cause any drawback for my normal utilization. There are tutorials for more advanced settings (as on nullvision) but that are not so safe.

 

Sources and references:

http://poller.se/2010/08/optimizing-mac-os-x-for-ssd-drives/

http://blogs.nullvision.com/?p=275

http://support.apple.com/kb/HT1935

Link to comment
Share on other sites

  • Corsair Employee

guitrein

Thank you for taking the time to post this as I am sure it will help others with their system.

 

Disclaimer

Please note this thread was stuck in an attempt to help Mac users but it is not officially supported by CORSAIR, so please feel free to try these steps but it would be at your own risk.

And I would strongly suggest backing your your system before you try any hacks or tricks like these

Link to comment
Share on other sites

  • 2 months later...

Actually it makes more sense to move the power management mode to 2 instead of zero. PM 2 means that the sleepimage is only written whenever the machine loses power. Which means you still get some saftety net of a full desktop restore if you are low on battery without hitting the ssd too hard.

Another two things you can do if you have a normal secondary storage hdd is to move the spotlight index and the swap files off from the ssd to the hdd, you sacrifice some speed that way but outside of noatime and the PowerMode 3 those two things hit the hdd most with write cycles. You can find various links on how to move the swap files on the net, I have not looked deeper into the spotlight index issue.

 

Also to avoid swapping find out if you have enough ram in your machine, OSX behaves like every good unix by swapping only if it really runs over the ram it has (unlike windows which seems to swap from second zero). You can check if you swap a lot via the activity monitor delivered with every osx. If you swap a lot it makes a lot of sense for speed reasons and generally to avoid swapfile writes to give your machine enough ram. But then avoid the original Apple ram, they charge 4 times as much as the same ram would cost on the free market (apple does not produce its own ram it just buys it from somewhere else)

Link to comment
Share on other sites

  • 10 months later...

Does anyone know if I should enable TRIM on OS X? Currently, I'm using Trim Enabler..

 

However, I've been reading, and there are people saying that the Force GT has its own garbage collection system, and that running TRIM would actually make the drive under perform..

 

Anyone has anything to share?

Link to comment
Share on other sites

  • 2 months later...
I would also be curious about Trim Enabler, particularly with respect to power consumption. I just installed a Corsair Force 240gb on my MacBook Pro (mid-2009), and while I notice the speed increase and cooler operation, the SSD seems to be using significantly more power than the Seagate moments 7200.4 drive it replaced.
Link to comment
Share on other sites

  • Corsair Employee
I would also be curious about Trim Enabler, particularly with respect to power consumption. I just installed a Corsair Force 240gb on my MacBook Pro (mid-2009), and while I notice the speed increase and cooler operation, the SSD seems to be using significantly more power than the Seagate moments 7200.4 drive it replaced.

 

I am sorry but that is theoretically impossible with SSD drives they use significantly less power them selves: A spinning NB HDD will use about 10-40 watts where as a SSD will use 5-7 watts. However, because of the increase in data speed the S-ATA controller will work harder and use more power but you would have to speak with the Chipset manufacturer to get an idea of what would be expected.

Link to comment
Share on other sites

Thanks for that answer, Ram Guy. But it doesn't matter to me whether the drive itself is using more power, or it is causing another component to do so. My understanding from my reading of reviews was that modern SSD's are easier, or at least no harder, on a laptop battery time than mechanical HD's. If that is not the case, I wouldn't put an SSD in my laptop. I'm hoping someone can suggest ways to reduce their direct or indirect energy consumption because I quite like the Corsair SSD in my MacBook Pro otherwise. If it turns out not to be the case, I'll remove it and put it inside one of my desktop Macs.
Link to comment
Share on other sites

I am sorry but that is theoretically impossible with SSD drives they use significantly less power them selves: A spinning NB HDD will use about 10-40 watts where as a SSD will use 5-7 watts. However, because of the increase in data speed the S-ATA controller will work harder and use more power but you would have to speak with the Chipset manufacturer to get an idea of what would be expected.

 

I'm sorry, 40 watts, really?

 

A standard USB can offer about 3W and it runs fine most spinning disks on external bays. Saying a standard hard drive uses 40W to run is just crazy and nonsense.

 

I think it's lame to think that a SSD will impact the battery life (in a good way), since it's power specifications are very similar to most standard hard disks (if not worse).

 

For example, a 7200 rpm NB HDD with 750 gb uses:

 

Read/Write 1.75 Watts

Idle 0.80 Watts

Standby 0.20 Watts

Sleep 0.20 Watts

 

And a Force 3 SSD

 

Power Consumption (active) 2.0W Max

Power Consumption (idle/standby/sleep) 0.5W Max

 

Pretty similar, huh?

Link to comment
Share on other sites

  • 2 weeks later...
Does anyone know if I should enable TRIM on OS X? Currently, I'm using Trim Enabler..

 

However, I've been reading, and there are people saying that the Force GT has its own garbage collection system, and that running TRIM would actually make the drive under perform..

 

Anyone has anything to share?

 

No answer?

Link to comment
Share on other sites

Somewhat, thanks. But there was the questioner had the specific question about: "the Force GT has its own garbage collection system, and that running TRIM would actually make the drive under perform."
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...