Increase SWAP on macOS Big Sur (Macbook M1)
Is there possibility to increase swap on macOS Big Sur on Apple Silicon M1?
dynamic_pager has only -F parameter.
Is there possibility to increase swap on macOS Big Sur on Apple Silicon M1?
dynamic_pager has only -F parameter.
Thanks for posting the report. The stats in Activity Monitor are worrying.
Looking at the report, a runaway process is using significant amounts of CPU performance (likely also the memory hog). I recommend starting up in Safe Mode to diagnose the issue:
When in Safe Mode, no third party apps are permitted to run automatically. If the problem is related to an app, you should notice that initially (before any apps are opened), little to no swap is being used.
Now, open Activity Monitor, and proceed with the below test:
To leave Safe Mode, restart your Mac.
Thanks for posting the report. The stats in Activity Monitor are worrying.
Looking at the report, a runaway process is using significant amounts of CPU performance (likely also the memory hog). I recommend starting up in Safe Mode to diagnose the issue:
When in Safe Mode, no third party apps are permitted to run automatically. If the problem is related to an app, you should notice that initially (before any apps are opened), little to no swap is being used.
Now, open Activity Monitor, and proceed with the below test:
To leave Safe Mode, restart your Mac.
Possibly, but macOS will still try to first maximize RAM usage, since that is always faster (and safer) than the internal SSD.
The swapfile resides in a hidden APFS volume named "VM". This allows for the swapfile to grow or shrink as it needs.
Now, because APFS volumes can optionally have a minimum and/or maximum size, I wonder if somehow your VM volume has a maximum size of 8 GB. To resolve this issue, you'll need to erase your VM volume from macOS Recovery:
Thank you for the reply.
I think the CPU is not a problem here.
Current stats:
The computer is running slowly because of memory usage. On the Memory tab I can see the Safari cards with 2 opened pipedrive cards (https://pipedrive.com ), each taking 1-1.5 GB. Safari has killed that because of memory usage and now everything is OK.
I am using a lot of web-applications like Asana, Pipedrive, Microsoft Tasks or LinkedIn and I think that could be a problem.
Hi HNS-,
I'm not sure why you would want to increase swap usage, but it doesn't appear to have the controls needed to set a minimum or maximum size.
macOS first tries to use all of the available memory (RAM) in your Mac before resorting to swap. This is because using swap results in lots of reads and writes on the internal SSD, slowly shortening its lifetime.
Thank you.
I will check that today.
Could you please tell me, what is the risk?
For now I have checked: diskutil apfs list
Result:
APFS Volume Disk (Role): disk3s6 (VM)
Name: VM (Case-insensitive)
Mount Point: /System/Volumes/VM
Capacity Consumed: 8589979648 B (8.6 GB)
Sealed: No
FileVault: No
Maybe could I create the new VM volume with size 16GB or more?
If done correctly, there should be no risk. But definitely back up your data before proceeding. AFAIK if macOS can’t find the correct VM volume at startup it will make a new one.
Also, APFS volumes are dynamic by default - they have no fixed size. When you erase the VM volume, it will have an initial size of 0, and will automatically grow and/or shrink as macOS adjusts swap usage.
The true size limit of the VM volume is the amount of free space on your Mac, as your startup disk and VM share free space with each other.
I have done that command: diskutil apfs eraseVolume VM -name VM -role V
It is better, but I still have slowmotion, when too many swap is taken.
Current stats:
APFS Volume Disk (Role): disk3s6 (VM)
Name: VM (Case-insensitive)
Mount Point: /System/Volumes/VM
Capacity Consumed: 11811209216 B (11.8 GB)
Sealed: No
FileVault: No
Any ideas?
By definition, swap is always going to be slower than true memory (RAM).
Just out of curiosity, what process(es) is consuming that much memory? You might want to get EtreCheck from the App Store and post a text report here.
Start by completely removing CleanMyMac. It is unneeded because the macOS, catlike, has cleaned itself for the last two decades. ANY third-party app that claims to clean or maintain yourt Mac WILL slow it and can contribute the the problems you see. CCM is the likely cause of the "runaway process" flag.
Based on hundreds of other EtreCheck reports here, removing CMM improves performance. You also have a number of third party enhancements install. I would review those and see which you really need. Amphetamine an Insomniac may be fighting. More than one installed ad blocker has been suspected in slow computer reports here. Find the one you love and send the other to summer camp.
System Software:
    macOS Big Sur 11.1 (20C69)Â
    Time since boot: About 6 days
In the presence of a mere 8GB RAM, restarting the computer more often than every six days will nicely keep that SWAP issue under control.
Thanks.
The problem occured before installing CMM. It supposed to be the cure.
Insomniac and amphetamine have been inatalled after the problem occured.
But I will try to uninstall that.
The problem occurs 2h after reboot so that is not the cause.
I know.
The problem is, when macOS takes 8GB RAM and 8GB swap memory, it runs very slow.
The solution could be increasing swap memory.
I know that swap will be slower than RAM.
But if the swap is used less than 10GB (before it was 8GB), everything runs OK.
The report:
The biggest problem is now, look at stats.
Use the Activity Monitor's %CPU column sorted to show what process is hogging CPU usage:
The problem is not with just one application.
The problem occurs when I open too much applications.
So it could not help if I open applications step-by-step.
Increase SWAP on macOS Big Sur (Macbook M1)