Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

High Sierra Freezing - RAM Swap not working

Hey,

i have a big Freezing Problem on my iMac 27" Late 2012 (8GB Ram) since i've installed High Sierra. The problem is that my mac freezes about 5 Times per day. I am running macOS on an external SSD per Thunderbolt.

I've tried many different things to solve this problem (e.g. VRam Reset, using another Cable, unplug all other Devices, reinstall macOS), but nothing helped.


Now i think i have the main issue. In case my Mac is going out of Memory the swapping mechanism is not working. The activity monitor shows exactly 0 Byte swapped. I used the same Python script on my iMac and on my MacBook as well. The iMac freezes and my MacBook is swapping about 6 GB.


User uploaded file


I already tried deactivating the service by Terminal and activating it again. The Service is running, but it is not writing anything in a "swapfile -> /private/var/vm"


Is this a known issue? Is there anything i can do to fix this problem? I will not buy a ton of memory to solve this 🙂



Greetings

Posted on Dec 17, 2017 8:55 AM

Reply
Question marked as Best reply

Posted on Dec 20, 2017 1:17 PM

I had the exact same issue. But the solution to this is even more crazy:

Try to execute the following:

sudo diskutil mount -mountPoint /private/var/vm disk2s4

disk2s4 (in my case) is an identifier to the VM (virtual memory) volume of APFS container, which could be located by diskutil apfs list.


So far this has been working for me well, if anyone knows how it would be possible to automate this after every reboot, that would be awesome to know!

7 replies
Question marked as Best reply

Dec 20, 2017 1:17 PM in response to retone

I had the exact same issue. But the solution to this is even more crazy:

Try to execute the following:

sudo diskutil mount -mountPoint /private/var/vm disk2s4

disk2s4 (in my case) is an identifier to the VM (virtual memory) volume of APFS container, which could be located by diskutil apfs list.


So far this has been working for me well, if anyone knows how it would be possible to automate this after every reboot, that would be awesome to know!

Dec 17, 2017 2:40 PM in response to retone

The activity monitor shows exactly 0 Byte swapped.


That's OK since the screenshot shows an abundance of physical RAM. The swapfile was not being used because it was not yet required. Hover your cursor over the "Swap Used" text for an explanation of its purpose.


What do you do to recover from the freezes (in other words, is it necessary to force the Mac to shut down)?


Can you reproduce the freezing problem in "Safe Mode"?


Use safe mode to isolate issues with your Mac - Apple Support

Feb 18, 2018 10:16 PM in response to rezonanc

Wow, thank you so much!


I am also booting off an external SSD (I realised after I bought this Mac that Fusion Drive is pretty much unusable garbage), and I was pulling my hair out trying to figure out why it'd crash twice a day.


Eventually I also narrowed it down to it crashing when too much RAM had been used, and then discovering that the swapfile isn't working.


My assumption is this is occuring because macOS uses a separate VM volume when the booting off an APFS volume, and for some reason this doesn't get detected in time to be mounted.


I guess the best solution is to put that command into a plist file and throw it into /Library/LaunchDaemons/ so that it gets mounted every time you boot up.


Otherwise a non-fudgy solution would probably be to reformat the drive back to HFS+ or create a Fusion Drive.


We should probably file a bug report with Apple unless they're already aware of this problem.

High Sierra Freezing - RAM Swap not working

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