Is Dropbox overheating your MacBook?

Find out how you can stop this

My MacBook was overheating, fans were blowing air like crazy and I noticed Dropbox was the main culprit.

Now, why is Dropbox doing this? Dropbox computes a hash of the files that it’s going to sync and this requires a lot of calculations which in turn require the CPU to do a lot of work. And the more stuff you store in Dropbox the more time it requires to do this.

But there’s a way to take the control back and tame Dropbox!

Install Homebrew

First of all, you need Homebrew, an open source package manager for macOS, copy the line below and paste it in your terminal. Homebrew will then go and install itself.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install cpulimit

Now use Homebrew to install cpulimit

brew install cpulimit

Get Dropbox’s Process ID

ps aux | grep Dropbox

This will return something like:

user 541 1.8 1.6 7186068 130052 ?? R 2:08PM 91:02.60 /Applications/Dropbox.app/Contents/MacOS/Dropbox

What we’re after is the number after the username in this case 541

Run cpulimit with the -p flag using the process ID:

cpulimit -p 541 -l 40

If you’re an administrator running this command should limit the CPU to about 40%

Since it’s quite cumbersome to look up the PID and since the process ID or PID can change between reboots we can automate this a bit further.

To get the PID automatically we use pgrep-f but this returns all processes involving Dropbox including all child processes to get the first one we add head -1

pgrep -f Dropbox | head -1

Combine it all in one command

cpulimit -p $(pgrep -f Dropbox | head -1) -i -l 40 &

the & starts it as a background process and -i includes the child processes.

--

--

πŸ…ΌπŸ…°πŸ…²πŸ†πŸ…ΎπŸ…ΏπŸ†„πŸ†‚
πŸ…ΌπŸ…°πŸ…²πŸ†πŸ…ΎπŸ…ΏπŸ†„πŸ†‚

Responses (1)