stress is a useful tool to load your computer and stress test it 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
$ stress -c $(nproc)
Tried with: Stress 1.0.4 and Ubuntu 15.10