stress is a useful tool to load your computer with computation, IO, memory or disk work. This can be useful, for example, to examine how a CPU behaves when a different number of cores are loaded with computation.
$ sudo apt install stress
$ stress -c 2
Tried with: Stress 1.0.4 and Ubuntu 15.10