Home > Wiki Tips

[Explained]What Is Swap Memory on Mac

Updated on Friday, June 14, 2024

iBoysoft author Amanda Wong

Written by

Amanda Wong
Professional tech editor

Approved by

Jessica Shee


Summary: This post explains what is swap memory on Mac, the concepts of the swap file, swap space, etc., and how to check the swap used memory on your Mac computer.

swap memory mac

The combination of the RAM, the main memory, and the virtual memory, the secondary memory, on Mac makes you quickly access the files and applications. And swap memory is a portion of virtual memory used to store inactive data for later retrieval. After reading this post, you will have a deeper understanding of swap memory on Mac.

Explanation of swap memory

Memory swapping is a memory mechanism applied and enabled by default on modern computers. Given that the RAM and some programs or applications demand gigabytes of memory, the RAM is almost full at times. There is where the swap memory comes into being.

When the available RAM is not enough to run a new program, it swaps the inactive data or less used data out from the RAM to your internal SSD/HDD to release more RAM for the urgent process that needs RAM and swaps the data in when it is needed again. In this way, it makes sufficient RAM to run programs.

memory swapping

Swap space refers to the space on your hard disk used to keep swapped data, as a substitute for physical memory, it is also called a swap file. The swap space/swap memory is limited by the size of your hard disk. 

Share this useful post with your families and friends now!


How to check swap memory on Mac

You can check how much swap memory your Mac is using via the memory tab of Activity Monitor, the built-in macOS utility. And it also tells if your computer is using memory efficiently with the Memory Pressure graph. Here is how:

  1. Head to Finder > Applications > Utilities > Activity Monitor.
  2. Double-click Activity Monitor to open it.
  3. Choose the Memory tab on the toolbar.
  4. On the bottom, Swap Used tells how much swap memory the Mac is using.

swap used on mac

The size of the swap used on my Mac is 5 GB, a normal amount. Usually, the number less than the amount of the RAM is a reasonable one. By the way, if the memory pressure is in the green range, it means your Mac is operating normally. If it shows yellow or even red color, the RAM is insufficient, you can free up space on Mac.

Pros and cons of swap memory

Due to the limitation of the RAM of your MacBook Air/Pro/iMac, the memory swapping mechanism seemingly extends the physical memory on your computer so that it can run more applications simultaneously. You don't have to close some apps to run a new one because it swaps out idle data from RAM to give space to the new process.

However, some Mac users report that the Mac runs slowly when it is using swap memory. It does, indeed. When the less used data located on your hard disk is needed, it swaps the data from the hard disk to the RAM so that the CPU can access it. Such a process slows down the operation. And frequent swapping in and out on the SSD could cause excessive SSD wear and shorten the lifespan of the SSD.

You can disable swap memory in Terminal on your Mac by typing the command lines sysctl -a vm.compressor_mode, and sudo nvram boot-args="vm_compressor=2" if the mode number is 4. After disabling swap memory, you should always monitor the usage of the RAM to avoid kernel panic on your Mac.

disable swap memory on Mac

How to clear swap memory on Mac

Too much swap memory used could slow down the performance o your Mac. If you find the size of swap memory is extremely large in Activity Monitor, you can free up swap memory with the following tips: 

  • Quit unused applications/programs.
  • Close less-used tabs and windows in your web browser.
  • Don't run multiple memory-intensive programs simultaneously.
  • Restart your Mac.

Know more about swap memory on Mac after reading this post? Share it now!