Speed Up Time Machine

If you’re using an Apple Mac computer, you may have observed that the fantastic backup system Time Machine, may run slowly. This is especially noticeable when you are doing the very first backup (when it has to backup the entire system).

I was frustrated by this a while ago when I purchased a new hard drive to do my backup’s on.

After a bit of digging, I found that time machine’s performance is throttled so as not to impact system performance.

There is a way to remove performance throttling using a system control statement.

debug.lowpri_throttle_enabled

If you use the sysctl command to set this to 0 (zero) then time machine will not be throttled. If it’s set to 1 (one), it will be throttled.

I created a little script called ‘speedup-timemachine’ that lets me turn the option on and off.

‘speedup-timemachine on’ will remove the throttling.

‘speedup-timemachine off’ will return the throttling.

Below is the script. Just copy the script, paste it into a text editor, save the script to a location on the path, and make it executable (chmod a+x scriptfile).

#!/bin/sh

printError() {
  echo "usage $0 <on|off>"
  exit 128
}

if [ $# != 1 ];then
  printError
fi

case $1 in
on)
  OPTION=0
  ;;
off)
  OPTION=1
  ;;
*)
  printError
  ;;
esac

sudo sysctl debug.lowpri_throttle_enabled=$OPTION
Code language: Bash (bash)

Leave a Reply

Your email address will not be published. Required fields are marked *