Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Should I move the swap location for my Mac from the SSD to the larger HDD in my laptop?

Background information: I've heard some suggestions in the general PC/Windows world that if you have an SSD for your OS and HDD for your user data, you should move the swap location/swap file away from the SSD to the HDD (perhaps re protecting the hits on the SSD perhaps). Note I have a MacBookPro with SSD & HDD both in it (using the optical drive bay).

PS. Question stems from Steve's words from http://www.grc.com/sn/sn-284.txt

STEVE: And Mark Thompson and I have discussed this at length. He's performed the experiment of using an SSD for a swap file and watching it burn out the SSD. I mean, in a relatively short time it just killed it. And so, anyway, so my advice stands, which is, if you're using an SSD, hopefully before you have gone to the expense of using an SSD, which is still much more expensive than a hard drive, you will have invested money in as much RAM as your system can handle because RAM is much less expensive, and you'll get much more, you'll get huge benefit from going to the most RAM you can possible get. And if you've done that, then turn off pagefiles. And if the only drive you have is an SSD, I stand by my advice.

I agree that, from a performance standpoint, the SSD is a perfect device for containing the pagefile. Unfortunately, Microsoft thrashes their pagefile. I mean, they're writing to it a lot. Yes, 40 times less than they're reading, but it's something that's going on all the time, pretty much. I mean, we've all seen, we've watched the hard drive light flickering there, like when nothing is going on. It's like, what is it doing? Well, who knows. But we know that it's writing to the pagefile, which it does a lot. So anyway, I think it's a perfect example of two different people with very different aspects of the problem that they're addressing. I'm looking at long-term life. Microsoft's looking at performance.

share|improve this question
    
STEVE: One of the things that I thought I should do, I liked this question because I think maybe I've concerned people unnecessarily. The least robust technology for SSDs is called the MLC, the Multi-Level Cell, as opposed to the SLC, the Single-Level Cell, which is a much, much more expensive drive, but also more robust. But even the multi-level cell, the lesser of the two technologies in terms of robustness, has a guaranteed minimum number of write cycles of about 10,000. –  iskra Jan 16 '12 at 0:53
    
Now, I just divided 10,000 by 365, which is roughly the number of days in a year. And I get 27.397, which is to say that, if you rewrote the entire drive daily, that drive would last for a minimum of 27.397 years. So, yes. SSDs have a limited life. But so does the universe. –  iskra Jan 16 '12 at 0:53
    
I wonder how you missed what is above from that conversation?) –  iskra Jan 16 '12 at 0:53
    
just heard them again in a recent podcast remind people to move Windows swap from SSD to hard drive....so had this in my mind –  Greg Jan 16 '12 at 3:58

3 Answers 3

I am certainly not an expert, but I would think that the faster read/write rates on an SSD would ensure faster performance on large programs than the hdd would.

share|improve this answer
    
add some back to the question –  Greg Jan 16 '12 at 0:17
  • Try to work as you usually do without writing to any drive except SSD (well at least not vast amounts).
  • Watch Disk Activity tab in Activity Monitor after a day or two.
  • Extrapolate Data written value
  • Compare to the spec of your particular SSD.

P.S. Here is people are killing their SSD for you and me.

share|improve this answer

I love listening to Security Now and you can go both ways on this.

Swap on SSD: Yes, the HDD is slower, but one thing you have to remember is you are using a Mac, not Windows. Windows tries to move things out from ram into swap as quickly as it can, leading to the hard drive thrashing. However on a Mac, memory management is much better. Instead of keeping stuff in ram for the future like on Windows, it releases unused memory. I have 9 Safari tabs, Mail, iTunes, an RSS reader, and Minecraft running right now and not one byte in swap (I do have 8GB of ram). If something does go to swap, it probably won't be used soon and have a low write usage (SSDs only wear out during writes, not reads).

Swap on HDD If you are doing media editing, then use your HDD for the swap. You will be putting a lot into memory and swap and see a lot of thrashing. The larger space makes more room for the swap so you don't run out of memory. Having the swap on a different drive is good practice anyways so that memory management can be done at the same time as general data management, instead of waiting on one for the other.

share|improve this answer
    
Putting swap on a slower drive is not a good practice. Moving anything and everything off the fast drive so that it has room to accommodate the swap that is unavoidable is good practice. Optimizing for a condition where the system is thrashing is like optimizing how you limp with a broken leg. Spend that energy getting a doctor to fix your broken leg so you can get around at normal speed would be my advice. Most of what you say is good, just not really applicable here. Unless the OP gives exact details, how Win/OS X swap is probably too deep in the weeds to make a difference. –  bmike Apr 16 at 15:52
    
I agree for Windows, I have a Windows desktop that I keep a massive swap file on the fast drive for when I stitch panoramics, which uses a lot of memory. When I boot a clean Windows 7 there is already half a gigabyte of memory in swap. However the OP is using a Mac, which, like Linux, handles memory different and better. Looking right now on my Mac I still have 1.5Gb free ram and still nothing in swap. –  traisjames Apr 16 at 18:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.