

Mac OS X SSD tweaks - bensummers
http://blogs.nullvision.com/?p=275

======
rufo
Given that Intel SSDs are claimed to support writing 100GB of data every day
for five years before losing the ability to write, and I rarely hit even 10GB
written in a bus development day according to OS X's Activity Monitor, I'm
uncertain if these tweaks will make all that much of a difference in the
lifespan of the drive.

~~~
mrkurt
It's not so much the lifespan, it's performance degradation after lots of the
drive has been written to. It's not a permanent problem, but I know lots of
people who notice and end up formatting to regain their performance.

~~~
cdr
As far as I'm aware, TRIM takes care of the performance degradation. Not sure
that OSX supports TRIM yet though.

~~~
WALoeIII
OS X does not support TRIM.

TRIM is only enabled on the G2 Intel SSDs and newer competing models, the
original G1 does not have the instruction.

~~~
blasdel
And using a drive firmware that expects TRIM results in a _massive_ regression
when the kernel isn't regularly telling it to trim blocks, as it disables its
normal GC.

The Intel GC algorithm was great. I would have preferred it if they had simply
ignored all the 'power user' fanboys that constantly harp on about how it
would somehow save the day. Let them buy other drives, and leave more for the
rest of us.

~~~
cdr
If G2s are shipping with TRIM firmware, couldn't you just downgrade to a pre-
TRIM version if you're so concerned?

I don't understand how running Win7 makes you a 'power user fanboy' as opposed
to running OSX or Linux. Next time leave the second half of your comment off,
and maybe provide some evidence for your first.

------
uuid
Another way to save (the oh so precious) space on SSDs is to apply HFS+
compression to files.You can use ditto(1) or this GUI:
<http://latenitesoft.com/squeeze/>

Note, however, that files are decompressed on writes, so don't try it on
anything large and frequently written to.

------
DenisM
Sadly, no performance data is provided.

~~~
barredo
Here's a link to a more recent post in other blog
[http://damieng.com/blog/2010/04/09/macbook-pro-upgrade-to-
cr...](http://damieng.com/blog/2010/04/09/macbook-pro-upgrade-to-
crucial-256gb-ssd) — Author switched original 320GB MacbookPro HDD with a
Crucial 256GB SSD, it provides benchmarks and compared perfomance and an
interesting points:

 _Don’t go with Apple’s factory-options for an SSD as they use slower Samsung
drives and charge a premium for it which is unacceptable especially given how
easy they are to replace._

Which I hope, if true, Apple will fix by adding high-end SSD options in the
near future

~~~
blasdel
Intel only sells their awesome SSDs retail, as demand far outstrips their
inconsistent supply. When they get their production up and start offering them
to OEMs, expect Apple to start using them.

I don't see Apple using any of the mediocre inconsistently-performing
Taiwanese SSDs.

~~~
Andys
IIRC, Apple's very first SSD offerings were based on Intel SSDs. The move to
Samsung came when Apple decided to go leadfree/halogenfree/eco-friendly and
the Intel chips didnt have the correct qualifications.

~~~
blasdel
I don't think so, I'm pretty sure the first Macbook Air was released before
Intel's public efforts, the performance was pretty mediocre (not better across
the board than a 2.5" laptop HD, only the terrible 1.8" iPod HD that would
fit), and Apple has had multi-billion-dollar contracts with Samsung for flash
memory since the iPod nano.

------
wmf
IMO these go beyond tweaks and are more like SSD ricing.

~~~
Nwallins
_noatime_ is a great counterexample to your 'ricing' claim. I run this mount
option on nearly every filesystem under my command. _relatime_ is also a
viable option if you need things like _mutt_.

From <http://kerneltrap.org/node/14148> (which discusses _relatime_ , a less-
drastic version of _noatime_ that keeps _mutt_ working)

> _Ingo Molnar stressed the significance of fixing this performance issue, "I
> cannot over-emphasize how much of a deal it is in practice. Atime updates
> are by far the biggest IO performance deficiency that Linux has today.
> Getting rid of atime updates would give us more everyday Linux performance
> than all the pagecache speedups of the past 10 years, _combined_."_

> _"It's also perhaps the most stupid Unix design idea of all times. Unix is
> really nice and well done, but think about this a bit: 'For every file that
> is read from the disk, lets do a ... write to the disk! And, for every file
> that is already cached and which we read from the cache ... do a write to
> the disk!'"_

------
jawn
For those like me who came away from this wondering what windows tweaks were
available, I found a good thread here:
[http://www.ocztechnologyforum.com/forum/showthread.php?47212...](http://www.ocztechnologyforum.com/forum/showthread.php?47212-Vista-32-64-SSD-
Windows-Registry-tweaks)

It is a lot of the same types (ramdrives, no hibernation) of changes but for
windows users.

------
sumeeta
Is there really a serious issue in the way OS X handles SSDs?

I think I want to replace my MacBook’s hard disk with an SSD, but I’m afraid
of having to spend hours rigging out the best configuration. Do you have to
play with settings if you order a Mac from Apple with an SSD pre-installed?

It seems like if I want to just plug an SSD in and get on with my life, I’ll
have to wait for an OS X update. Unless this is all just PC-ricer talk that’s
safe to ignore…

~~~
uuid
As long as you leave plenty of free space, SSDs work great out of the box.
Don't ever fill them (something beyond 80% capacity), or you will crush
performance. The tweaks in the article are attempts to optimize for the last
2%, but in no way necessary.

~~~
rufo
Since you're going to be reading and writing to the drive repeatedly, the
drive is always going to hit the write performance crunch no matter what you
do (unless you support TRIM - Windows 7 does with the correct drivers, OS X
does not, not sure about Linux).

However, even degraded, write performance of a modern SSD will still make a
hard drive look like yesterday's news - so honestly, I wouldn't even worry
about it at all.

~~~
uuid
SSDs do degrade by around factor ten (!) in write performance when full,
although not in read performance. (Tested this with an x25-m).

Sadly, recovering from a fragmented SSD on OSX right now involves opening the
machine and booting linux. (I tried that, and it works:
<http://forums.macrumors.com/showthread.php?t=841182>)

~~~
rufo
I'm not saying they don't degrade... just when they do, the performance is
still so off-the-charts when compared to a hard drive that it's crazy to
obsess over it.

And 10X sounds high to me - what sort of benchmark are you running? Most of
the benchmarks I've seen put the hit at around 20 - 30% in random writes...

~~~
uuid
Back when I tried that I simply used xbench - the 4k block writes went below
10MB/s. I don't have the exact numbers, but I do remember that mac os took >
30 seconds of spinning wheel to boot, compared to 1-2 usually. BTW, filling
the disk is as easy as performing "erase free space" with Disk Utility.

~~~
rufo
That doesn't seem typical - I'm using an 160GB X25-M G2 and have almost
certainly filled the drive at this point (been running with less than 15%
drive space free for a while, I leave hibernation on, installed and removed
Boot Camp, etc.) and I'm still getting ~55 - 60MB/sec 4k sequential writes and
~60MB/sec 4KB random writes with the latest firmware in Xbench. I'd think
booting would be mostly reads with a few writes here and there, too...

~~~
uuid
Although the 160GB has a slight write advantage over my 80GB G2, it appears
those last 15% make quite a difference. That wouldn't be totally out of line
from how regular HDs behave once they approach 100% utilized capacity. SSDs
(the intel ones at least) have a buffer of cells that are inaccessible to the
OS (that buffer is larger on e models), maybe that's double for the 160?

