Install stress library (not complete commands maybe):

sudo apt-get install stress
sudo apt-get install htop

Run stress:

stress --cpu 6 --vm-bytes $(awk '/MemAvailable/{printf "%d\n", $2 * 0.75;}' < /proc/meminfo)k --vm-keep -m 1