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

TL24

macrumors 65816
Oct 20, 2011
1,402
1,263
No.

Swap is there for a reason; as above swapping things to SSD pro-actively means the machine can respond faster if a large memory allocation comes in.

It's swapping IDLE things to memory before it has to so that if/when it does get short of memory the idle non-changing portions of ram are already swapped out. All it has to do is de-alloc the real memory. If it waited until there was memory pressure before starting to swap, there would be a delay while you waited for things to page out.

Leave it to do its thing.

For 90% plus of people, trying to turn off swap or using memory cleaners, etc. is fighting against what the OS is doing to improve responsiveness and performance.

Unless you KNOW you have a performance problem that you can then objectively test with swap on vs. swap off, leave it be.

Roger that, I wasn't going to do it until I have a better understanding from folks that more than I do.
 

IamAppleFan

macrumors newbie
Jul 16, 2022
1
0
For years now, I've DISABLED VM disk swapping with the following terminal command:
sudo launchctl unload -wF /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
(reboot is necessary).

Then, check with this command:
sysctl vm.swapusage

If VM is off, report should be:
vm.swapusage: total = 0.00M used = 0.00M free = 0.00M

My Mac runs great and doesn't crash.
I have 16gb of RAM in my 2018 Mini, but this worked fine with my 2012 Mini that had 10gb of RAM as well.
Of course, I'm mindful of how many apps and files I have open, and close unneeded apps when I'm not using them.
Sorry for asking after years of the thread posted, but may I know hows your Mac's performance as of now?

And may I ask as well what is the command to re-enable the disk swapping? Thanks
 

Cide

macrumors member
Jul 11, 2022
92
59
Edmonton, AB
The best thing to with memory is ignore it. People go crazy when the RAM graph 'fills up' and the like...
Virtual memory, is allocated to every process that runs. Now, I know and love MacOS but I am much more familiar with Linux virtual memory mgmt, and I assume it is somewhat similar on the Mac. Linux's virtual memory (and yes, I know it's not exactly the same as swap) supports up to 64GB of virtual memory *per process*. Obviously that is over-subscribed since a low-end linux box might only have 2-4 GB of physical memory. But it shows on the resource monitor because that memory is mapped somewhere, usually on disk. It may never be needed or touched, but it is allocated, and if needed, the system will start swapping to those allocated addresses.

Anyway, instead of deep-diving modern memory management, let it suffice to say that your memory situation if completely normal and utterly not worth worrying about. MacOS will tell you when it's running out of memory and prompt you to close programs.

If you want to monitor which way your memory is trending, just watch the memory pressure indicator. Yours is extremely low, as your system is pretty much idling.
Memory issues, are a thing of the past.
Nothing to worry about, especially with 64GB Ram.

TLDR.
But your post was very insightful. :)

I just got baited into replying to a Necro'd thread. Oh well.
 

Piipperi

macrumors member
May 5, 2020
33
9
Computur
Hopping onto this old thread, my Mac mini with 64 GB of RAM is using just about half of it, yet it's starting to use SWAP. Makes no sense, also has anyone in this thread mentioned that these SSDs are not easily replaceable and SWAP is doing unnecessary wear on the drive?

1684176856651.png
 

chabig

macrumors G4
Sep 6, 2002
11,272
8,976
Makes no sense, also has anyone in this thread mentioned that these SSDs are not easily replaceable and SWAP is doing unnecessary wear on the drive?
That's just how macOS works. Everyone knows it, and there is nothing you can do about it. Also, it's nothing to worry about. SSDs can handle it, and in your particular case, it's not significantly different from zero.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.