Brew install ffmpeg causes overheating

(f) #1

I have lots of formulas installed via homebrew, but the only one that gets me constantly worried about my computer’s health is ffmpeg.
When it starts compiling, my cpu overheats like crazy and reaches temperatures above 100°C. This can’t be good.
How can I make sure this does not happen?
If it is of any help, it’s compiling with clang.

tl;dr: is there any way, either in homebrew or clang to throttle CPU usage?

(Jonathan Chang) #2

You might have luck reducing the amount of parallelism during builds. This can be achieved by setting the HOMEBREW_MAKE_JOBS environment variable to a smaller number, like HOMEBREW_MAKE_JOBS=1 brew install ffmpeg or similar. See the manpage for more detail.

(f) #3

Thanks, I’ll try that.
How can I make it so the variable is global for all things brew?
Is there a brew config? Where should it be?

(Jonathan Chang) #4

You can permanently set environment variables in your shell dotfiles. Usually this is bash and I’ve found the Digital Ocean guide on this to be quite clear and useful as an introduction.

(f) #5

HOMEBREW_MAKE_JOBS=1 seems to have done the trick. It’s taking longer, but at least it’s staying at less insane temperatures.
I added export HOMEBREW_MAKE_JOBS=1 to my .bash_profile, hopefully that will solve any other overheating problems in the future.