@nightwatch I remember watching your vid a while back and it helped a great deal (2017 MBP, 2.8 GHz i7, 16GB RAM). But one aspect I never implemented was the manual RAM management starting at 20:53. How do you open that screen to enter the terminal command? And is that something I need to turn off afterwards? If so, how would I do that? Or is it OK to just exit?
Also, is there a RAM usage % I should try to stay under? Luckily I don't do full blown orchestral compositions like many of you, but I'm consistently tapping 11-12GB of my available 16GB. But I typically have breathing room on the CPU usage.
With computers that have under 32GBs of RAM I recommend manually (actively) taking control over the way macOS handles memory swapping.
Mainly for older systems like MacBook Pros and other systems who’s architecture only allowed for a max of 16GBs of RAM, Apple added “memory compression” and “cached memory” to the OS. These are great features for these systems. But I f you have a Mac Pro or any other Mac that can access 64GBs of RAM or more this isn’t something that needs to be considered (although I still purge a lot and I have 96GBs of RAM currently in my Mac Pros).
macOS uses memory compression and caching to re-launch recently used applications quickly and to instantly wake up from sleep.
However you may not care about these features. Even though macOS intelligently cleans up after itself and otherwise takes care of itself, you can, via the Terminal app, nuke data in memory that may either cause macOS to page files or slow down the time it take for macOS to clear the cache and allow that space to be reclaimed as memory not used.
Here are the instructions. DISCLAIMER: Using the “sudo” command makes you the root user, (the God of your computer that can destroy everything with one wrong keystroke - actually it’s not quite that bad but can be if you enter the right or wrong command). You have been warned. Only proceed with sudo if you understand the command you are entering. Sudo “tells” the OS to “just do it.”
1. In the Finder, under the Go menu open the Utilities Folder (or type Shift-Command-U).
2. Open the Activity Monitor and click on the Memory tab. Look at the bottom where “Memory Pressure” and “Cached Files” is listed. Move Activity Monitor to the side for a moment.
2. Open the Terminal app. Don’t be afraid.
3. Copy and paste this command into Terminal without the quotes, “sudo purge”. Terminal will ask for your User Password. Type your password (you won’t see any feedback), hit Enter and...
4. Within seconds the Cached Memory and Memory Pressure size in the Activity Monitor shrink depending on how many apps and files you’ve had open throughout the day.
You can quit Terminal if you like. There is no further action required after using sudo purge. Nothing to “turn off.” Just quit the Terminal or keep it running. Doesn’t matter. You have made no changes (like a preference setting). Purging WILL NOT affect any running apps, only Cached data. It’s perfectly safe. If you’re paranoid you could save every app that is currently open before purging but it’s not necessary. macOS is a “protected memory” OS. UNIX baby!
This will instantly and manually reclaim memory for inactive memory. Apple says you may experience a slight slow down in the Finder but you won’t. The Kernel and other System and User processes quickly reclaims what they need.
I hope this helps.
Regards,
Steve Steele