Classic swap fail. A good rule of thumb is that when a swapping OS runs out of RAM it literally cannot swap its way back to stability unless you kill some of the tasks.
Faster drives help a little, but the most practical option is to have enough RAM to use no swap at all.
I have a 64GB Mac and I'm regularly over 32GB. If I only had 32GB my ten core Mac would still grind to a halt.