As such the presence of swap files is mandatory.īy eliminating swap files, you'll limit the system to only using physical memory that the Mac has, which should not be recommended for Macs with 4GB of RAM or lower. However, the benefits of more disk space cannot compensate for the resulting instability of the overall system, which is maintained by the use of virtual memory.
Swap files are essential for a stable system, but since they do occupy precious space you may well be looking to these files when trying to free up disk space – it's a no-brainer to remove such big files, right? Yes, it's possible to disable swap files, but it isn’t recommendeded. Under macOS High Sierra we've noticed 1GB swap files, but in earlier versions of OS X their size ranges from 64MB to 512MB. What applies to all versions of operating system, though, is that its numbering starts from 0, and the swap files are usually equal in size. The size of the swap file depends on the version of macOS (or OS X) you have installed.
Check the memory pressure graph and the information next to it, where you'll find the exact amount of swap being used.Getting fresh information on the state of your Mac's memory is easy: Swap is used by macOS as a space for better memory management, so as long as you don't disable it, it is normal to see a certain degree of activity there.
How to Check Whether the Swap Has Been Used If you aren't afraid of controlling the Mac via text commands, then paste the following into Terminal to find only the swap files and their sizes: Below the sleep image file you'll find swap files named successively in numerical order, beginning with swapfile0, then swapfile1, swapfile2, and so on. The virtual memory folder you'll open also contains the sleepimage file, which is essential because it contains the data the Mac has been storing in RAM before going to sleep. To check the swap file, launch Finder and press Command + Shift + G to open the Go To field, then copy and paste the following path: That's when the kernel reclaims physical space for the free list by swapping inactive pages out of memory. macOS will only do that when the number of pages in the free list dips below a computed threshold. When the virtual pages are written to disk, the associated physical pages appear as free space. If data is paged out, it also means it will be moved back to RAM, a process called paging in or swapping in. Moving data from the RAM to the backing store is called paging out or ‘swapping out’.
Sometimes referred to as a page or paging file, a swap file is space reserved on a computer's hard drive or SSD as a temporary location to store information that is not in use by the built-in physical memory.Īpple calls this space the ‘backing store’ and it contains a copy of the memory pages used by certain processes.
Those gigabytes of storage reserved as ‘swapfile0’, ‘swapfile1’, and so on appear to have no specific function, so you may well be wondering about their purpose and how to remove them, and even if it’s safe to do so. Users looking to free up space on their Mac might have noticed that the operating system sometimes reserves big chunks of space for files that apparently just sit there, occupying precious disk space.