I have 16GB RAM on my Mac. Instead of physically removing it, is there a software setting where I can make it think it only has 8GB RAM?
I would like to understand performance of my application with less RAM.
I have 16GB RAM on my Mac. Instead of physically removing it, is there a software setting where I can make it think it only has 8GB RAM?
I would like to understand performance of my application with less RAM.
You can set the maxmem
boot argument to the desired memory limit in MebiBytes, and then reboot.
First, see what boot arguments you already have:
nvram boot-args
Then, assuming you don't have any (this is probably the default), just add the maxmem
boot-arg. Here's how to set it for 8GiB:
sudo nvram boot-args="maxmem=8192"
…then reboot.
You can delete the boot-args
boot-time environment variable later like this:
sudo nvram -d boot-args
nvram -p
to read existing params? I get an error on nvram boot -args
... nvram: Error getting variable - 'boot': (iokit/common) data was not found
-p
to read existing variables. You do need to correctly type the name of the variable you want to read, which in this case is boot-args
, not boot
or -args
. The message you saw was what you get when the variable you asked for does not exist.
Create a virtual machine for testing, using VMware Fusion, Parallels, or VirtualBox. This would allow you to change the amount of memory, number of CPUs, network settings, video settings, software dependencies, operating systems, etc. You can change machine settings and reboot the virtual machine, without making any changes to your host computer.