cpulimit

Limits the CPU usage of a process to a specified percentage

brewmacoslinux
Try with needOr install directly
Source

About

CPU usage limiter

Commands

cpulimit

Examples

Limit a process to 50% CPU usage by process ID$ cpulimit -p 1234 -l 50
Start a command and limit it to 25% CPU usage$ cpulimit -l 25 -- ./long-running-script.sh
Limit a process to 75% CPU with verbose output$ cpulimit -p 5678 -l 75 -v