10

I've been reading several articles on the Internet how to "optimize your Mac with an SSD". I'm not sure whether or not to agree with the articles because I think that Apple knows what's the best settings for a computer with an SSD drive. My question is: should I be worried about disabling hibernate to "save" my SSD from wear?

I also heard that the user's home folder (as well as the Application folder, and temporary items) be stored on a RAM disk/spinning hard drive to improve the life of the SSD. I personally think this is a bit overkill, because I don't see why Apple would sell SSDs if people had to do all of this extra configuration.

Edit: here is a seven year update using my SSD as normal, including hiberation on, and using my SSD as a temporary storage location for backing up my 2TB and 4TB hard-drives, anti-virus on, installing hundreds and hundreds of apps (and then uninstalling them), running countless virtual machines, and finding out later that a malfunctioning internet radio app wrote 1TB to my SSD over a year. I did not baby it at all; I just used it as normal:

enter image description here

enter image description here

Additionally, I had it partitioned into 64GB/64GB, with only one partition being actively used (Windows) for two years. I then unpartitioned it a couple of years later. Given that this is a bad scenario in terms of wear (was not able to spread it across the other unused 64GB), it has aged fairly well. There are 100 re-allocated sectors, but if each sector is 512kb, then that's 5mb that I can't use, which isn't too bad.

alexyorke
  • 372
  • 2
    You'd have to have a bloody enormous amount of RAM to put your /Applications directory on a ramdisk. – Cajunluke Aug 28 '12 at 18:08
  • Not including iLife, it's about 1GB. – alexyorke Aug 28 '12 at 21:12
  • Hmmm. Mine's only 8.5 gigs on my work laptop. I'm pretty sure it's more like 20 gigs on my home laptop. – Cajunluke Aug 28 '12 at 21:25
  • I can see where you are coming from now; that's a lot! The stock installation is way less (maybe the article was referring to that). – alexyorke Aug 28 '12 at 23:07
  • Does anyone know how much data actually gets written to /var/vm/sleepimage when going to sleep? If it's always the size of the RAM, it would be a huge part of the average GB/day written to drives. – Lri Aug 29 '12 at 10:33
  • On the article I read, it was the entire contents of RAM. However, I only use 25-50% of my RAM, not sure if the inactive memory gets written – alexyorke Aug 29 '12 at 23:34
  • @alexy13 - It's my understanding that the sleepimage is compressed before being written to disk. I would also bet that anything residing in wired memory is evicted from memory before the sleep image is taken. – Fake Name Nov 09 '12 at 11:24

3 Answers3

4

Although this is an old question, I would like to update it with my answer because it is still relevant to me.

http://blog.alutam.com/2012/04/01/optimizing-macos-x-lion-for-ssd/#hibernation

sudo pmset -a hibernatemode 0
sudo rm /var/vm/sleepimage

We do not recommend modifying hibernation settings. Any changes you make are not supported. If you choose to do so anyway, we recommend using one of these three settings. For your sake and mine, please don’t use anything other 0, 3, or 25. hibernatemode = 0 (binary 0000) by default on supported desktops. The system will not back memory up to persistent storage. The system must wake from the contents of memory; the system will lose context on power loss. This is, historically, plain old sleep. hibernatemode = 3 (binary 0011) by default on supported portables. The system will store a copy of memory to persistent storage (the disk), and will power memory during sleep. The system will wake from memory, unless a power loss forces it to restore from disk image. hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The system will store a copy of memory to persistent storage (the disk), and will remove power to memory. The system will restore from disk image. If you want “hibernation” – slower sleeps, slower wakes, and better battery life, you should use this setting.

3

That’s just paranoia. Hibernate mode is perfectly healthy for an SSD. A SSD will last about 2-4 years of continuous writes. This means the time for which the SSD is powered. I have a 4 year old computer and its HD has been powered for 1.5 years (according to disk utility). Your SSD can definitely last a longer time.

duci9y
  • 5,457
  • How would I be able to see the time my ssd has been powered with disk utility? – alexyorke Aug 28 '12 at 23:08
  • 4
    Select the disk from the sidebar, press ⌘I, and copy the Power On Hours value. You can convert it to a decimal number of days with something like bc <<< 'ibase=16; scale=1;0000000019C8/18'. – Lri Aug 29 '12 at 03:04
  • 2
    The time the drive has been powered is totally irrelevant. It's the volume of data that has been written to the drive that affects a SSD's lifetime. -1 – Fake Name Nov 09 '12 at 11:22
  • @FakeName I think you did not understand my answer. The sentence “The time for which the SSD is powered” is meant to explain the term “continuous use”. That means, 2-4 years of continuous writes on an SSD. – duci9y Nov 09 '12 at 14:06
  • @duci9y - Then change "Continuous use" to say "continuous writes". As it is, it's only an extremely contorted interpretation that you can make it say that. – Fake Name Nov 09 '12 at 22:54
  • Note that "continuous use" could also be continuous random-reads, which would not affect the device's lifetime much, if at all. – Fake Name Nov 09 '12 at 22:54
  • duci9y: no SSD will survive 4 years of "continuous writes". SSDs have a lifetime based on writes, and it's something like 2000TB. If you're hibernating 20 times a day with 16GB RAM, that is writing an extra 300GB/day to the disk unnecessarily, reducing its lifespan. – CpnCrunch Feb 16 '17 at 22:35
  • Here's a six year followup: I don't remember if I disabled writing to disk on hibernation, but I found an app that was writing 50GB to my disk everyday for two or three years (yikes!) However, all seems well, and the total capacity of my disk didn't decrease, so I presume that there are no bad sectors. I did a scan a year ago and no bad sectors were found. SSD's are not as fragile as I thought. – alexyorke Apr 30 '18 at 18:04
0

I actually prefer SmartSleep. Using this little app gives you the best of both worlds. When you sleep your Mac (close the lid), SmartSleep will decide based on your remaining battery capacity whether to write the hibernation image or not. This is useful, because if you ever find yourself in a tricky situation, where your battery runs out, you will not loose your data.

I have been using SmartSleep ever since I had a SSD (2-3 years now) and really appreciate it. It also offers some nice shortcuts, like caffeinate or instant hibernation.

n1000
  • 7,714