Limiting cpu usage is important on shared environments. I have php programs that run long and can consume too much cpu. I searched for a solution and found cpulimit.
Install cpulimit: sudo apt-get install cpulimit
Usage of cpulimit:
By pid:
Find PID of program: ps ax | grep <program name>...