Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Zandra with Z

macrumors newbie
Original poster
Oct 18, 2012
14
0
I have 8 GB of RAM, is it possible to use part of it for the swap files? I don't want to use swap files with my SSD.
 
Last edited:
Nov 28, 2010
22,670
31
located
Mac OS X uses swap files to store contents of the RAM (from currently unused documents or applications) in order to free RAM for more current use by a current application.
Using the RAM to store content of RAM instead of using swap files would be a bit paradox, would it not? Because what would be the purpose of freeing RAM and filling it again with the same content? If you do not have enough RAM, get more, depending on the Mac you have.

And using the SSD to store RAM is not harming the SSD.

Normally modern SSDs have a theoretical write/read limit of 10,000 to 100,000 cycles (P/E cycles), meaning if you had a 64 GB SSD and its cycle limit would be 10,000, you would have to write 625 TB to it, which would be 351 GB per day everyday for the next five years. Assuming those numbers vary and it would only be a tenth of that, it would still mean 35 GB per day, which under normal usage no average computer consumer does, not even with temporary files.
 

steviewhy

macrumors regular
Oct 12, 2011
112
2
It's not recommended but you could just disable paging/swapping.

http://osxdaily.com/2010/10/08/mac-virtual-memory-swap/

As an alternative you run 'purge" in the terminal manually whenever you want or set it up as a cron job. I think the wear on the SSD will be negligible by just leaving everything as is imo.

*EDIT*

I see you were already using the info from the link I posted. Do you have trim enabled?
 
Nov 28, 2010
22,670
31
located
Thanks, I know absolutely nothing about tech. :/

I followed these steps but it still uses 219 GB. :eek:

If you know nothing about tech, as you claim, then better leave the swapping on.** I never disabled it, because I do not need to, even if my 8 GB of RAM is limiting me sometimes.
As for the 219 GB number, that is Virtual Memory and not the size of your swap files.

Open Activity Monitor and go to the System Memory* tab and look for Page Outs and Swap used and report back.

** quote from that article
Disable Mac OS X Paging / Swap

Caution: I would highly recommend against modifying how Mac OS X handles memory management and swap files. Unless you know exactly what you’re doing and why, this is not a recommended adjustment. Again, if you don’t know what you’re doing, do not mess around with Mac OS X’s swapfiles or paging ability!


----------

It's not recommended but you could just disable paging/swapping.

http://osxdaily.com/2010/10/08/mac-virtual-memory-swap/

As an alternative you run 'purge" in the terminal manually whenever you want or set it up as a cron job. I think the wear on the SSD will be negligible by just leaving everything as is imo.

That is the article the OP is referring too and as far as I know, the PURGE command only works when the Developer Tools are installed, but I agree, to leave it as it is.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,484
16,201
California
I have 8 GB of RAM, is it possible to use part of it for the swap files? I don't want to use swap files with my SSD.

Don't worry about writing data to your SSD and wearing it out. While it is true the NAND cells in a SSD have a finite life (usage) span, you are not going to hit that limit for many years under even heavy usage. Here is a good article explaining how this is a non-issue.
 

dusk007

macrumors 68040
Dec 5, 2009
3,415
105
Don't disable the dynamic pager. It creates all sorts of problem including crashes.

NAND write cycles used to be a problem when SSD were 32GB or smaller. When controllers had wrote 10-20 MB for every single MB they should have written.
Today most nand is rated at 3000 cycles and the TLC in the new Samsung 840 probably at 1000 but that is still more than you ever need.

You can watch in activity monitor how much writes you have in the system. It includes all drives (external and internal afaik). Unless you are way past 50 GB writes a day ON AVERAGE (that means every day) your SSD ist not likely to die from too many writes, but rather form sudden controller death, heat or something.
With a drive 128GB and up you can safely say that is just a non issue.

All these idiotic tipps just don't apply anymore. The only sensible reason to disable swapping is to save space because you have too little and those files don't shrink again once they have grown until you restart.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.