VMware player on Arch Linux crash during windows installation

When installing windows on vmware player virtual machine at my Arch Linux host something strange happened. First the host computer would slow down considerably and practically freeze. Afterwards over time the player suddenly crashes without a reason.

So what happened was that the kernel seened to think that vmware was taking too much memory and in order to avoid whole system crash, killed the vmware process. At this point it should be noted that the quest operating system had 8GB of memory out of 16 so running out of memory was not the problem.

The solution that allowed the installation process complete smoothly to finish is a little bizarre to someone who doesn’t understand low-level stuff (among who I count myself). I’m sure there is an engineer out there who can say why this is but the solutions turns out to be adding a swapfile.

Swapfiles are essentailly hard disk space allocated to store some excess memory from RAM. This is to avoid all of RAM being used. As I understand it, RAM that is not actively used or is otherwise stagnant is allocated to swap until it is needed again. This is mostly relevant on systems with 2g or less actual RAM memory and since I have 16, I didn’t think I needed seperate swap. Also constant writing to swapfile tends to decrease the life of ssd drives.

So now that we know what solves the problem, how do we solve it? Few simple commands will suffice.