Skip to content

Instantly share code, notes, and snippets.

@jacobrose
Created November 1, 2017 15:02
Show Gist options
  • Save jacobrose/eb03ebaca0b3c137a0f0052d2c7aa440 to your computer and use it in GitHub Desktop.
Save jacobrose/eb03ebaca0b3c137a0f0052d2c7aa440 to your computer and use it in GitHub Desktop.
Help Docker for Mac play nice on your computer, with 'renice'
# docker -- set hyperkit priority to 10 so it doesn't eat the CPU
alias dockerpri='echo -n "docker priority currently: "; ps alx | grep .app/Contents/MacOS/com.docker.hyperkit | grep -v grep | sed "s: *[0-9]* *[0-9]* *[0-9]* *[0-9]* *[0-9]* *\([0-9]*\) .*:\1:"'
alias dockernice='sudo renice 10 $(ps ax | grep .app/Contents/MacOS/com.docker.hyperkit | grep -v grep | sed "s: *\([0-9]*\) .*:\1:"); echo -n "dockerpri: "; dockerpri'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment