How necessary is it to minimize Swap file size on MBPr and MBA?

Discussion in 'MacBook Pro' started by twocircles, May 23, 2015.

  1. twocircles, May 23, 2015
    Last edited: May 23, 2015

    twocircles macrumors newbie

    Sep 26, 2011
    I have always maxed out my RAM to speed up my computer. The primary reason for doing this was to minimize the use of Swap files. Swap files are used to transfer data not currently being used from RAM to a disk drive so that the system does not run out of functional memory. When the data is again needed, it has to be read from the disk drive back into RAM, a time-consuming process. Getting a system with as much RAM as possible has always been essential to avoiding this speed bottleneck.

    For example, on my Late 2011 MBP, I have installed the unsupported, but possible, 16 GB of RAM. Do I use it? Yes, my system originally came with 4 GB of RAM. Right now, running OS X 10.10.4 with only Outlook, Safari, Activity Monitor and my normal Menu Bar programs running in the background. I am using 4.85 GB of RAM. During a typical work day when I have 5-7 more apps running, I frequently jump up to 9 to 14 GB depending on what I am doing. The OS X version has also had an influence.

    MBPr’s and MBA’s are now using PCIe SSD RAM. These have much higher functional throughput than SATA even SATA SSD’s. This considerably widens the Swap file bottleneck.

    My first question, is this fast enough that the amount of RAM is really a mute point when it comes to speed?

    Second, there is not much talk among Apple SSD users about SSD writes, but others discuss that SSD longevity is significantly reduced by the amount of writes on an SSD. Swap files are constantly being written, read and erased. Is the amount of RAM on a system now a factor in determining a system’s SSD longevity? Or, is this a non-issue too?
  2. leman macrumors G3

    Oct 14, 2008
    With modern SSDs, you will need to write to continuously at full speed for over a yeah for them to fail. So they will likely outlive your computer :)

    All in all, it makes sense to have enough RAM to support your basic workflows. But you shouldn't worry too much about swap. The swap file is more then just backup storage in case RAM is not sufficient. Even if you have plenty of RAM, the system could choose to swap something out. Imagine you have a background application that has to run occasionally (such as an indexing daemon). It makes a lot of sense for the OS to freeze this application when its inactive and swap out its state to the disk. The freed RAM (no matter how much you have) can be then used to speed-up the IO or other operations. And resuming the operation rom swap is still much faster than reloading the application from scratch. So you get wins in all respects — performance, responsiveness and efficiency.
  3. Gav2k macrumors G3


    Jul 24, 2009
    Honestly it's a non issue. OS X will actively dump out of memory when it needs ram for a task. It's one of the things I love about OS X
  4. twocircles thread starter macrumors newbie

    Sep 26, 2011
    So, what you are saying is that the amount of RAM I get in a new system, specifically a MBPr or MBA, has become irrelevant. I should save my money from RAM and spend it on increased SSD space. Is that right?
  5. old-wiz macrumors G3

    Mar 26, 2008
    West Suburban Boston Ma

    That was my choice when I bought my last MacBook Pro. More SSD space is better for my purposes.
  6. maflynn Moderator


    Staff Member

    May 3, 2009
    I would get the amount of ram that you believe that will satisfy the needs of the apps you run and what you may possible do in the near future. I'd not get ram to deal who how OS X handles virtual memory, i.e., swap files.
  7. simonsi macrumors 601


    Jan 3, 2014
    Not quite, depends on what Apps you run, if very interactive (humans are slooooow), then minimal RAM and an SSD means you won't notice swapping from a UI perspective, even if swapping the MBx will likely be waiting for you.

    If you are running say large resolution video encodes then enough ram is good, same with VMs, anytime the MBx may need to shift large volumes of data in and out of ram to swap then it is still worth having the right amount of ram.

    That said, I have just replaced my first SSD (120GB Crucial), with my 2nd (512GB Crucial), because of space after 2yrs, it still had 85% of its life remaining according to DriveDX, that was when I was running 8GB, I now have 16GB and swapping is usually only in the 10-25MB so effectively zero.
  8. twocircles thread starter macrumors newbie

    Sep 26, 2011
  9. twocircles thread starter macrumors newbie

    Sep 26, 2011
    I’m not sure I understand what you are suggesting. I can run 9 to 14 GB in my memory, which is not a RAM purchase option on MBA and MBPr. I almost always run more than 4 GB, and I switch frequently between apps. With 4 GB RAM, if running 14 GB of apps in my RAM, I would have 10 GB in a swap file.

    When I had 4 GB of RAM, I frequently had spinning beachballs while switching programs. With 16 GB, I rarely have them. Has SSD, especially PCI SSD eliminated this lag?
  10. Meister Suspended


    Oct 10, 2013
    Maflynns and simonsis posts are the correct answers to this thread.
  11. Mr. Buzzcut macrumors 65816

    Mr. Buzzcut

    Jul 25, 2011
    That's probably not correct - that you're "using" 14 GB. You can prove this by halving it and loading the same apps. Then check memory pressure and swap usage.

    The system will make use of as much RAM as you give it. And why not? If it's unused it's wasted.

Share This Page