Macbook Pro M3 using swap even though there is a lot of free memory available

I would like to disable swapping, but it seems like it is no longer possible with latest MacOS? Why is My Macbook Pro swapping when I there is 70GB+ of free memory?


MacBook Pro 16″, macOS 14.5

Posted on Jun 13, 2024 1:02 PM

Reply
6 replies

Jun 14, 2024 7:26 PM in response to PickingBlueberries

What does Activity Monitor show for Swap usage? The third party utility you are using may not be using the correct information within macOS especially if it is a Linux based utility. If the system is actually 18GB of Swap, then you have a major issue.


Edit: You can use the following macOS command to retrieve the Swap usage (the value is the one after "used = "):

sysctl  -a  |  grep  -i  'swapusage'



Or with a slight modification:

sysctl  -a  |  grep  -i  'swapusage'  |  awk '{print "Swap = "$7}'


Or if you just want to see that value without any text:

sysctl  -a  |  grep  -i  'swapusage'  |  awk  '{print $7}'



Results in the following output respectively:


vm.swapusage: total = 4096.00M used = 3160.25M free = 935.75M (encrypted)

Swap = 3160.25M

3160.25M

Jun 15, 2024 3:16 AM in response to PickingBlueberries

My uneducated guess would be either


A Badly behaving Third Party Application that is not using the 96 GB of Unified Memory coupled with a Memory Cleaner Application that is cleaning the Memory ( RAM )


Resulting in the Operating System being forced to create and use SWAP files


If the second of the two is used


Remove this application and then Test if the SWAP file are being created

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Macbook Pro M3 using swap even though there is a lot of free memory available

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.