Fix Home Needs

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, 26 September 2012

Macbook Pro runs hot with SSD and TRIM Enabler

Posted on 09:47 by Unknown

The first problem


In a recent upgrade to my Macbook Pro (15-inch, early 2011), I swapped out the standard 2.5" HDD for a OCZ Vertex 4 SSD, which has a Sandforce controller Indilinx Everest 2 controller. I also did a clean install of OS X 10.8 (Mountain Lion) on the new drive.

I installed a hard drive performance benchmarking tool (Blackmagic Disk Speed Test) from the App Store and was pleased to see 500 MB+/sec read and write speeds, and my battery life on full charge went up to almost 6 hours! Then I encrypted the volume using FileVault 2 (Mac's built-in encryption utility; works very well). I rebooted, and did another speed test.

Write speeds were down to about 220 MB/sec and read speeds were just over 300 MB/sec. Performance had dropped drastically. Apparently, the FileVault encryption was interfering.

Background


Doing a little research turned up results that Sandforce-controlled SSDs, in Macs, may have trouble performing well when FileVault is doing its pass-thru (or "on-the-fly") encryption. Fortunately, this isn't a Sandforce-controlled drive. So why was this happening?

One possibility: SSDs should have a low-level command called TRIM which improves performance when writing to non-empty blocks on the drive. In a traditional HDD, writing to a non-empty sector has no (measurable) performance hit, but on an SSD, there's some technical reasons that writing to a non-empty block is slower than writing to an emtpy block. TRIM tidies things up after data is "deleted" so that write speeds are quick in that area later. Thus, enabling TRIM manually on Macs, whether there really is trouble or not, should theoretically help boost performance.


TRIM Enabler, the solution .... or is it?

I downloaded the nifty TRIM Enabler program and turned on the TRIM command with an easy switch-flip. After a reboot, I waited about an hour then ran a benchmark test. Performance was back up to 300-350 MB+/sec. Read speeds were even a little higher. I was very pleased. But a few days later, I noticed that my Macbook Pro was running hot and the battery life dropped from about 5.5 or 6 hours to 2 or 2.5, and the fan was spinning hard.

The CPU wasn't running out of control, and I couldn't narrow it down. I suspected it was SSD- or TRIM-related.

The fix to my Macbook Pro running hot / bad battery life

I simply disabled the TRIM command again in TRIM Enabler tool. Now, a day later, my MBP is running at normal temperatures, and battery life is back up to the high marks I was hoping for.

I suspect that the issue wasn't so much with a faulty SSD, but rather that there was some sort of initial lag in performance after encrypting. I don't know why I think it was Spotlight indexing all my files quickly, so the processor had to keep up -- but now a few days later  and without TRIM Enabler on, my benchmark tests show high read and write speeds, again up past the 350+MB/sec mark and my battery life is normal.

tl;dr Just be patient after encrypting your SSD with FileVault. Performance will probably go back up after a day, and the hit isn't too notable unless you're doing specific benchmark testing. TRIM Enabler probably isn't needed (with Vertex 4 SSDs).
Email ThisBlogThis!Share to XShare to Facebook
Posted in osx, security, ssd | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • How to take FrontRunner from Provo to SLC airport
    I see this question a lot: how do I get from Provo or Orem to the SLC International Airport entirely by train (UTA FrontRunner/Trax)? Here I...
  • Behavior-driven testing in Go with GoConvey (BDD in "golang")
    First: the built-in Go testing tools Few things bring sweeter peace to the soul than making changes to Go code, then: $ go test ... PASS ok ...
  • Automatically make a Raspberry Pi with wifi support
    Okay, I love my Raspberry Pi, but setting it up just the way I want got so involved I was afraid I couldn't do it again if I had to. So ...
  • Install PECL extensions with Homebrewed PHP on Mac OS X Mountain Lion
    I needed to use the HTTPRequest class that comes as a PECL extension to PHP. This was easier than I thought. If you followed my instructions...
  • How to set up dynamic DNS in 5 minutes
    With a dynamic DNS service (don't worry, there are free ones), you can use your domain name to point it to your home server, even if you...
  • Fix the Home and End keys on Mac OS X (Mountain Lion)
    If you use a keyboard that's not designed specifically for Macs, you probably are familiar with the annoying mapping of the Home and End...
  • How to customize your terminal prompt (with colors)
    At work, the Go projects we're working on have workspaces that get pretty deep and one of the directory names is repeated down the tree....
  • Easily get your external IP address using the terminal or command line
    I want my little Raspberry Pi to "phone home" once in a while so I know where it's at. I wanted a very simple web service that...
  • Parsing CSV with Javascript efficiently
    CSV parsing is hard. There's not a strict standard, so each implementation is a little different. And when I say CSV, I don't necess...
  • PHP output buffering on nginx
    Simple trick: if you're trying to use output buffering with PHP on nginx, and it should be working, but the whole response still comes...

Categories

  • backup
  • bdd
  • byu
  • chrome
  • cli
  • command line
  • commute
  • compile
  • cross-compile
  • csv
  • development
  • dns
  • domain name
  • fastcgi
  • fcgi
  • go
  • golang
  • homebrew
  • inkscape
  • install
  • ip
  • ip address
  • ipaddress
  • itunes
  • javascript
  • keybinding
  • linux
  • mac
  • mountain lion
  • mysql
  • nginx
  • optimization
  • osx
  • parsing
  • pecl
  • php
  • printing
  • raspberry pi
  • security
  • ssd
  • terminal
  • testing
  • transportation
  • unit tests
  • vagrant

Blog Archive

  • ►  2013 (16)
    • ►  November (1)
    • ►  October (1)
    • ►  September (2)
    • ►  August (2)
    • ►  July (3)
    • ►  June (1)
    • ►  May (1)
    • ►  April (2)
    • ►  March (2)
    • ►  February (1)
  • ▼  2012 (8)
    • ►  November (1)
    • ►  October (1)
    • ▼  September (6)
      • Restoring a lost or moved iTunes library
      • Macbook Pro runs hot with SSD and TRIM Enabler
      • Printing to BYU campus printers without extra soft...
      • Installing nginx / PHP / MySQL on Mac OS X Mountai...
      • Fix the Home and End keys on Mac OS X (Mountain Lion)
      • Pre-installed development tools in Mac OS X Mounta...
Powered by Blogger.

About Me

Unknown
View my complete profile