Flip off reminiscence swapping for Anaconda/Python

0
25
Flip off reminiscence swapping for Anaconda/Python


You might disable the swap reminiscence, offering that you’ve got oodles of bodily RAM to play with – though how smart that’s, is debatable.

sysctl -a vm.compressor_mode
sudo nvram boot-args="vm_compressor=2"

From How A lot Swap Reminiscence Is Mac Utilizing:

You’ll be able to disable swap reminiscence in Terminal in your Mac by typing the command strains sysctl -a vm.compressor_mode, and sudo nvram boot-args=”vm_compressor=2″ if the mode quantity is 4. After disabling swap reminiscence, it’s best to at all times monitor the utilization of the RAM to keep away from kernel panic in your Mac.

Some (barely) higher directions from Save your M1 SSD by turning off Swap Reminiscence

To begin, you might want to enter restoration mode (the next is for M1 chips solely)

Shut down your Mac, and when its off, maintain the facility button till it
says “loading restoration” or one thing alongside these strains.

After you have continued into choices, on the high, choose utilities,
then terminal, and enter the next:

csrutil disable

enter your password, watch for it to finish, then restart.

As soon as logged again in, open terminal once more, and enter the next:

sudo nvram boot-args="vm_compressor=2"

This can then flip the vm_compressor from 4 right down to 2.

Shut down your pc once more, maintain down the facility button and enter
the terminal (in restoration) as above.

This time as a substitute of disabling the csrutil, we are going to allow utilizing the
following command:

csrutil allow

As soon as that is carried out, restart, open terminal, and test that your
cm_compressor is definitely set to 2 by utilizing the next:

sysctl -a vm.compressor_mode

If this has labored, watch in exercise monitor that your swap reminiscence
has virtually gone to nothing!

(there are a couple of warnings about kernel panic mode, however I’ve had zero
points with 8gb of ram)

Word: I’ve not tried both of those strategies.

LEAVE A REPLY

Please enter your comment!
Please enter your name here