Archive for MacBook tag

MacBook Pro 256GB SSD upgrade experience

April 2010 – October 2012 Apple, Hardware (, , , , ) • 482,628 views • 39 responses

I wanted an SSD for some time and finally caved in. Armed with credit card, screwdriver and trusty MacBook Pro I fitted a sweet SSD and decided to document the experience.

Choosing a drive

There are a bewildering number of options out there. Budget, as always, dictates the combination of speed and size available.

Size

You may not need as much space as you think so even if you intend on a fresh install first clean-up your current drive to get an idea of actual requirements. Remembering to backup before you:

  1. Identify biggest culprits
    Try DaisyDisk ($20), Disk Inventory X (free) or OmniDiskSweeper (free) and drill down to catch unexpected bloat in your folders
  2. Clean up unused system junk
    Use CleanMyMac ($30) or MonoLingual (free) to clean up logs, caches, redundant processor and unwanted languages.
  3. Archive unused content
    Move those podcasts, TV shows, applications and games you aren’t going to use anytime soon to cheaper external storage.
  4. Deal with orphaned & duplicate files
    Find media in your iTunes folders missing from iTunes lists and either trash or add it back then use iTunes Display Duplicates.

If you’re prepared to give up your internal Superdrive then move your existing hard drive to the optical bay and purchase a smaller SSD for the OS and key performance-critical files. This saves cash and gives you more space at the expense of battery life and a little extra weight.

Speed

All SSDs are not created equal and the combination of flash and controller (on drive and in your machine) play their parts in defining performance. Firmware, hardware revisions, drive size and operating system can also affect the speed so do your homework.

Drives come and go quickly so keep an eye on review dates and exact model numbers as manufacturers have models with similar names with difference specifications.

My choice

I settled on the Crucial SSD 256GB C300 because it is blazingly fast and the 256GB variant fit my 150GB storage requirements.

Since writing this article I’ve upgraded two more machines. My SSD choices as of October 2012 are:

  1. Samsung 830 Series
    I upgraded my work Lenovo ThinkPad X220 with this drive and it’s crazy fast and also fitted it to my new desktop. Available from Amazon in 64GB ($80), 128GB ($100), 256GB ($230) and 512GB ($449) capacities
  2. Crucial M4
    I upgraded two MacBook Pro 15″ (work+wife’s) with Crucial’s M4 last year. Available from Amazon in 64GB ($75), 128GB ($98), 256GB ($183) and 512GB ($539) capacities

Apple-factory options

Apple’s factory options for SSD are a mixed bag. They originally used slower drives by Toshiba and from July 2010 whether you get a fast Samsung or a slow Toshiba SSD was pure luck.

Given Apple charge a slight premium for the SSD option, you don’t get to choose your drive model and they are easily replaceable (except the iMac 27″ and MacBook Pro Retina) go with an after-market drive :)

Installing a new hard drive

Newer Unibody MacBook Pro hard-drives are user-replaceable and covered in the manual.

My older non-Unibody is not so simple but those nice people over at iFixit put together a hard drive replacement guide for 15” that is close enough for my 17″.

Installing Mac OS X without a DVD drive

My Superdrive died a while back so installing Mac OS X is a little trickier than usual. There are a few options you might come across.

If you are just doing a one-off Lion install then try the Lion Recovery Disk Assistant which requires a 1GB USB key and an internet connection for the install.

If you want to install Lion to multiple machines or won’t have internet where you’re installing then you can either put down $69 for the Lion USB thumb drive.

My favorite option however is to create my own install USB key. These steps will work for both Snow Leopard and Lion.

Create your own Lion or Snow Leopard install USB stick

The following steps work for both operating systems – the only difference is what you your drag across as a source in step 8.

  • Snow Leopard – source is your retail install DVD
  • Lion – source is InstallESD.dmg file which can be found in your Applications folder inside the Lion installer. If the installer is missing use App Store to re-download it. You will find the file inside the Lion installer by using Show Package Contents and heading to the Contents > Shared Support folder.
  1. Insert your USB stick
  2. Launch Disk Utility from the Utilities folder
  3. Select the USB stick from the list of devices and then choose the Partition tab
  4. Choose 1 Partition from the Volume Scheme drop-down
  5. Press Options… choose GUID Partition Table then OK
  6. Press Apply to confirm you are happy to wipe away all the data on the device and wait until complete
  7. Select the USB stick from the list of devices and then choose the Restore tab
  8. Drag the source (DVD or InstallESD.dmg) from the list of devices into the Source text box
  9. Drag the USB stick from the list of devices into the Destination text box
  10. Press the Restore and wait a while

When finished eject the USB stick and insert it into your DVD-less Mac. Turn it on and hold down alt until a boot selection screen shows then use the arrow keys to select your USB device and press return to launch the installer.

It may take a while for the installer screen to appear but be patient.

Remote Install

Remote Install let’s you put the a DVD into a machine with a drive, run Utilities > Remote Install and follow a few steps which include holding down the alt key on the machine that doesn’t have a drive.

Unfortunately only machines Apple shipped without a Superdrive – i.e. a Mac mini or MacBook Air from 2009 or later are happy to boot from a Remote Disc.

The following two shell commands enable Remote Disc on older machines within Finder but don’t allow a remote install:

defaults write com.apple.NetworkBrowser EnableODiskBrowsing -bool true
defaults write com.apple.NetworkBrowser ODSSupported -bool true

You will also need to enable sharing on the Mac with the DVD drive. Head into System Preferences then select Sharing then check DVD or CD sharing. You may also want to uncheck Ask me before allowing others to use my DVD drive to avoid having to go to the other machine to continually grant access.

Performance over time & TRIM

A simplified primer

File systems write in blocks and before SSD when the file system wrote to ‘block 1′ it got ‘block 1′ on the drive (unless it was damaged when it would map in a replacement from a reserved section). If it rewrote ‘block 1′ it overwrote what it wrote last time. This is how tools that securely erase files by writing them over and over work.

Now SSDs are fast but the flash technology suffers some limitations the most important is they can’t overwrite data without erasing it first so when the operating system writes ‘block 1′ a second time, it actually stores it somewhere else in the flash (but tells the file system it was ‘block 1′) and makes a note where ‘block 1′ actually is. This avoids the write penalty and also means that you don’t wear out block 1 by writing it over and over again (this is called wear-leveling).

This works just fine until you run out of erased blocks. This happens sooner than you’d think because when the file-system deletes a file it does not actually erase anything but just marks it as not used in it’s own file-system tables knowing it will just get used again sooner or later. (This is how file-recovery tools are able to undelete files).

So this combination of the drive never getting told to erase blocks and only finding out it can re-use them later when its time to write data and it suddenly finds these writes all require it erase blocks too and performance can drop to traditional hard-drive speeds (or worse).

The solutions

Manufacturers initially solved this problem by writing tools that examined the file-system structures to find out which blocks are unused so they can send ‘erase block’ commands down to the SSD drive so they are ready to be written again without the erase penalty – at least until you run out of blocks again. Because these tools need to know the file-systems internals you can’t throw a Windows tool designed for the NTFS file system at a disk formatted with HFS+ for the Mac and expect it to be able to understand anything.

Another solution involves the drive recording when blocks are being overwritten at the file-system it can mark the older copy of the actual block on the flash as erasable. Now, this may not happen until the disk is quite full and so to avoid stalling again on writes the manufacturers put some extra flash storage on the drive. When it gets in this state the writes gets a fresh block from the reserve and the reserve takes the previously used block to erase and put back into reserve. The problem here is that the manufacturers have to put extra flash and logic on the drive which costs $’ and it’s only able to put off stalling as long as the reserve can keep supplying fresh blocks.

A third solution tackles the problem at the source. Manufacturers agreed on a standard that extends the ATA protocol called ‘TRIM’ that lets file-systems tell the drive when blocks are no longer required and can be erased when it’s not busy. Support was built into Windows 7 and Linux 2.6.28 making a lot of SSD owners very happy.

Mac OS X & TRIM

Only Apple-supplied drives have OS X TRIM support enabled by default but there are techniques for enabling TRIM in Mac OS X 10.6.7 (Snow Leopard) and 10.7 (Lion)

You could also try to minimize unnecessary writes:

  1. Don’t use Finder’s Secure Empty Trash or the srm command line tool – these attempt to overwrite the blocks but because of wear-leveling on SSD they’ll just steal blocks up to 35x the size of the file you want to ‘erase’
  2. Keep large churning files on external drives (e.g. video processing)
  3. Don’t let your laptop run out of power as it copies the RAM to disk each time (2-8GB)
  4. Prevent unnecessary disk operations such as the ‘last accessed’ attribute on files (see below)
  5. Don’t keep running disk benchmarks that cause lots of writes!
Don’t be tempted to try and use one of the manufacturers Windows tools from your BootCamp partition as they only understand NTFS and FAT. They won’t be able to even figure out which blocks can be erased as Mac OS X uses it’s own HFS+ file system.

Turn off last-access-time

These access times are pretty useless and indeed the iPhone also has them switched off. Create a file named noatime.plist in your /Library/LaunchDaemons path with the following contents:

<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>noatime</string>
    <key>ProgramArguments</key>
    <array>
      <string>mount</string>
      <string>-vuwo</string>
      <string>noatime</string>
      <string>/</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
  </dict>
</plist>

Thanks go to Ricardo Gameiro for that tip although his other Mac SSD tweaks of creating a RAM disk is questionable given the way Mac OS X manages memory and disabling the RAM copy-to-disk entirely and therefore losing data is more risky to me than running out of blocks early.

Do not

  • Turn off the sudden motion sensor – SSDs ignore the park head command anyway
  • Turn off HFS+ journaling – some users report odd issues and corruption

Last resort

If you do get into the situation where your write performance is suffering badly and you are prepared to spend a little time to get it back you can do the following:

  1. Ensure you have a full Time Machine backup
  2. Boot from a Linux Live CD (or USB image) containing a recent build of hdparm
  3. Use hdparm to perform an ATA Secure Erase
  4. Boot from your Mac OS X DVD/USB stick
  5. Choose the Utilities > Restore System From Backup menu option
  6. Point it at your Time Machine backup

You should also be able to do this with other full-system backup tools like SuperDuper but you’ll have to figure out the steps for yourself ;-)

Performance

I wish I had some better benchmarking tools but Xbench is all I have, sorry!

Xbench with Crucial C300 256GB on 2007 MacBook Pro

Here are the figures for my Crucial C300 256GB drive with 0009 firmware on my older non-unibody MacBook Pro 17″ (MacBookPro3,1) with a dual-core 2.6GHz CPU and 4GB RAM.

This MacBook Pro is limited to 1.5GB/sec on the SATA bus as it uses an Intel ICH-8M SATA controller and this is limiting the drive.

0001
Sequential
0001
Random
0002
Sequential
0002
Random
0006
Sequential
0006
Random
0007
Sequential
0007
Random
0007
Sequential TRIM
0007
Random TRIM
Overall 137.66 643.14 137.39 648.57 121.39 644.71 125.17 620.97 138.23 638.23
Uncached write 4K 200.40 762.30 185.92 789.45 194.20 774.95 208.42 885.91 191.31 931.43
Uncached write 256K 196.34 357.61 196.05 359.23 129.89 360.79 157.84 318.87 172.08 320.78
Uncached read 4K 67.56 1926.31 69.27 1942.94 63.01 1911.07 60.37 1812.40 72.50 2030.81
Uncached read 256K 239.73 628.06 238.22 624.15 236.40 617.67 234.84 615.42 243.42 631.16

My original performance figures with the original as-shipped 0001 firmware and subsequent 0006 firmware figures are after almost a year of continual use and the drive has not been secure erased in that time. The final set of 0007 figures are on Mac OS X Lion with the TRIM enabler support switched on for a week.

Xbench with Crucial M4 256GB on 2011 MacBook Pro

I had the opportunity to put an SSD in my new work MacBook and immediately jumped to the a href=”http://www.kqzyfj.com/click-3893583-10674245″>Crucial M4 256GB. Here are the crazy figures for that drive with 0009 firmware on a MacBook Pro 15″ (MacBookPro8,2) with a quad-core 2.2GHz CPU and 8GB RAM.

0009
Sequential
0009
Random
Overall 277.21 1293.22
Uncached write 4K 428.98 1890.35
Uncached write 256K 424.35 770.44
Uncached read 4K 120.56 2162.18
Uncached read 256K 691.20 1244.41

Thoughts

SSD is fast but given the hype I was expecting everything to be instant and it wasn’t quite there. Applications usually launch within a single dock bounce and everything feels a lot snappier but there wasn’t the massive WOW! I was expecting.

There are also a few other advantages often overlooked, especially on a laptop:

  • lower power consumption
  • less weight, noise & heat
  • greater shock, dust and magnetic resistance

Here’s a table that pulls the specs compared to the 7200RPM Travestar that was previously my main drive.

Crucial RealSSD C300 256GB Hitachi Travelstar 7K320
Power consumption (W) 0.094 – 2.1 – 4.3 0.2 – 2.2 – 5.5
Weight (g) 75 110
Shock resistance (G/1.0ms) 1500 200
Noise (Bels) 0 2.8
Seek time (ms) < .1 12

Time will tell how well the machine now deals with large Aperture libraries of RAW images and Visual Studio compilations from inside Parallels and I’ll be sure to report them here.

Check-in (26 June 2011)

I installed the SSD and wrote this article back in April 2010. I’ve revised and tweaked it over the 14 months it’s been published to account for new firmware, updated benchmarks, the new Crucial M4 replacement of the C300 and the fact that Apple now ship SSD’s with very good performance as standard.

My C300 is still going strong through two firmware upgrades, several OS X installs (trying out betas, upgrading to Lion), regular application installs and work with heavyweight software such as VMware Fusion and Aperture.

The Crucial hasn’t yet missed a beat. No calls to support, no stuttering and benchmarks today are very similar to those published for the 0006 firmware update (within 10%).

[)amien

New iMac available only with glossy display

August 2007 – March 2008 Apple (, , , ) • 892 views • 4 responses

Showing the glossy MacBook screen When I use a computer I want to view my email, pages and work and not watch a light-show of what’s going on behind me. Glossy displays are therefore rather unappealing and Apple’s latest iMac update has me suitably worried.

First it was the cheap-end MacBooks available only with a glossy display, then it was an option on the MacBook Pro and now the iMac is blemished with its mirror-like display (and downgraded video card from Nvidia 7300 GT to ATI HD2400 XT).

John Siracusa published a great article on Ars Technica last year called And we all shine on that covered the subject in some detail including his take on the reasons why they are popular.

John believes it comes down to shopping being an emotional experience and not a logical one with shoppers easily distracted by shiny things, loud things and bright things all of which they irrationally consider ‘better’ without a thought. This translates to purchases of reflective laptops, deafening speakers and glaring TV screens being purchased over devices that deliver solid, accurate and balanced results.

It is a sad state of affairs if we consumers are nothing more than magpies with wallets.

Do the purchasers of these devices not find their eyes and ears fatigued by the strain of dealing with displays that glare and require the brightness whacked up or speakers that sound so muddy you can’t make out detail?

The only hope is the mention of "glass cover" and "SiO2" on the iMac page. Perhaps Apple has worked out how to increase contrast without introducing copious amounts of glare by using glass rather than plastics but I doubt it.

Still iWork 08 and iLife 08 look great and the keyboard will be worth trying although I doubt it feels as good as the Das 2.

Shame Apple are still locking out Channel Islanders from their on-line store, even when it is just to purchase a serial number. Guess I’ll have to wait a couple of days for iQ Guernsey to get some in.

[)amien

Keeping an eye on the MacBook/Pro temperature

June 2006 – August 2007 Apple, Hardware (, ) • 1,939 views • no response

As most people know these things run quite warm but at last two applications are available for getting hold of those elusive CPU temperature figures.

When in Mac OS X grab a copy of the free CoreDuoTemp.

In Windows the excellent (but not free) Everest 3.0 will reveal each core’s temperature individually as well as more detail about your machine than you ever cared to know.

[)amien

Hardware hacking the MacBook movement sensor

May 2006 – October 2010 Apple (, ) • 1,992 views • one response

Developers keep finding new and unexpected uses for hardware and software – seemingly never more so than on the Mac and OS X.

Whether they’re using the iSight camera to scan bar codes into your Delicious Library or turning the AppleRemote into a alarm key-fob in TheftSensor there’s always some novel hack around the corner for the latest bit of kit.

Current attention is focused on the motion sensor added to MacBook and MacBook Pro’s that is used to park the hard-drive should sudden movement be detected.

In true Apple fashion rather than add a simple yes/no movement sensor the device can detect tilts and both the X and Y axis as well as the current level of force.

With a little imagination those enterprising third-party developers have come up with…

Sudden Motion Sensor

Amit Singh is a man with a mission – which is just as well because he doesn’t have a MacBook or a MacBook Pro. So quite how he’s written a bunch of fun apps and a useful command line motion sensor tool is another matter.

Amit includes some technical coverage of the sensor and how it works over the I2C bus Apple also use for temperature sensing, fan control etc.

He also has a useful command-line tool and some fun hacks such as showing a MacBook Pro in 3D oriented as yours currently is and a window that self-adjusts itself to always be horizontal. Alas, at least on my MacBook Pro, the X axis seems to be inverted and the invert X axis didn’t work so the effect fails to impress.

More interesting is his page on using the motion sensor as an input device. While not as advanced as the Nintendo Wand – it doesn’t support detection of position – it still holds some promise as he illustrates.

MacSaber

With the sensor sporting a force level it was only a matter of time before somebody used that sensor magic to come up with something like MacSaber.

The sole purpose of this app is to make your $2,000 laptop hum like a StarWars lightsaber as you swing it dangerously around the room with a satisfying tzzzzum and sheuw.

Just don’t rely on the midichorians to stop your MacBook slipping through your fingers…

SmackBook Pro

You might be thinking this sensor is nothing but a curiosity but SmackBook Pro illustrates a rather novel use to desktop switching.

Desktop switching is one of those problem areas for short cuts. You might be using any one of tens of apps and finding a good shortcut that’s not taken by any of those applications could really be a problem.

SmackBook Pro’s solution is to tap the side of your machine to switch desktops and the way the new desktop flies in from the side is a great visual indicator of what has just happened as the video illustrates.

I’m not sure constantly tapping the side of an LCD is good for it’s health.

Many more hacks to be found at Raul’s blog.

[)amien