How can I put heavy load on my CPU for a long period of time?

Solution 1:

At the command line, run this command:

cat < /dev/urandom > /dev/null

(Open up a terminal window and type that into the window.)

This should keep your CPU loaded nicely for as long as you allow the command to run.

Solution 2:

Look at some distributed computing like Boinc. This runs compute intensive programs where tasks are taken and run across many machines thus allowing projects access to free computing power. In your case as the programs take up much compute power they will use the CPU heavily. Boinc runs multiple processes on your computer so will se all cores of your CPU.